Print this page
loader: pass args along to unix in C
There's no reason why we can't pass the args gotten from the bootloader to
unix in C.
Note: loader's _start sets the ATAG pointer to 0x100.  This change simply
propagates it to unix.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/armv6/loader/fakeloader.c
          +++ new/usr/src/uts/armv6/loader/fakeloader.c
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright (c) 2014 Joyent, Inc.  All rights reserved.
       14 + * Copyright (c) 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
  14   15   */
  15   16  
  16   17  #include "fakeloader.h"
  17   18  
  18   19  #include <sys/types.h>
  19   20  #include <sys/param.h>
  20   21  #include <sys/elf.h>
  21   22  #include <sys/atag.h>
  22   23  #include <sys/sysmacros.h>
  23   24  #include <sys/machparam.h>
↓ open down ↓ 676 lines elided ↑ open up ↑
 700  701          FAKELOAD_DPRINTF("see you on the other side\n");
 701  702          fakeload_mmu_enable();
 702  703  
 703  704          FAKELOAD_DPRINTF("why helo thar\n");
 704  705  
 705  706          /* Renable caches */
 706  707          armv6_dcache_enable();
 707  708          armv6_icache_enable();
 708  709  
 709  710          /* we should never come back */
 710      -        fakeload_exec(unix_start);
      711 +        fakeload_exec(ident, ident2, chain, unix_start);
 711  712          fakeload_panic("hit the end of the world\n");
 712  713  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX