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.h
+++ new/usr/src/uts/armv6/loader/fakeloader.h
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
↓ 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) 2013 Joyent, Inc. All rights reserved.
14 + * Copyright (c) 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
14 15 */
15 16
16 17 #ifndef _FAKELOADER_H
17 18 #define _FAKELOADER_H
18 19
19 20 /*
20 21 * The hacky version of arm uniboot that is exactly for a few systems.
21 22 */
22 23
23 24 #include <sys/stdint.h>
24 25 #include <sys/atag.h>
25 26
26 27 #ifdef __cplusplus
27 28 extern "C" {
28 29 #endif
29 30
30 31 typedef struct fakeloader_hdr {
31 32 unsigned char fh_magic[4]; /* Magic! */
32 33 uint32_t fh_unix_size; /* How large is unix */
33 34 uint32_t fh_unix_offset; /* Offset from start to unix */
34 35 uint32_t fh_archive_size; /* How large is the archive */
35 36 uint32_t fh_archive_offset; /* Offset from start to archive */
36 37 } fakeloader_hdr_t;
37 38
38 39 #define FH_MAGIC0 'i'
39 40 #define FH_MAGIC1 'f'
40 41 #define FH_MAGIC2 'b'
41 42 #define FH_MAGIC3 'h'
42 43
43 44 /*
44 45 * Backend operations, eg. what a given board must implement at the moment
45 46 */
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
46 47 extern void fakeload_backend_init(void);
47 48 extern void fakeload_backend_putc(int);
48 49 extern void fakeload_backend_addmaps(atag_header_t *);
49 50
50 51 /*
51 52 * ASM operations
52 53 */
53 54 extern void fakeload_unaligned_enable(void);
54 55 extern void fakeload_mmu_enable(void);
55 56 extern void fakeload_pt_setup(uintptr_t);
56 -extern void fakeload_exec(uintptr_t);
57 +extern void fakeload_exec(void *, void *, atag_header_t *, uintptr_t);
57 58
58 59 extern void armv6_dcache_disable(void);
59 60 extern void armv6_dcache_enable(void);
60 61 extern void armv6_dcache_inval(void);
61 62 extern void armv6_dcache_flush(void);
62 63
63 64 extern void armv6_icache_disable(void);
64 65 extern void armv6_icache_enable(void);
65 66 extern void armv6_icache_inval(void);
66 67
67 68 #ifdef __cplusplus
68 69 }
69 70 #endif
70 71
71 72 #endif /* _FAKELOADER_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX