diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-ppc/bootx.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-ppc/bootx.h')
-rw-r--r-- | include/asm-ppc/bootx.h | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/include/asm-ppc/bootx.h b/include/asm-ppc/bootx.h new file mode 100644 index 000000000000..b0c51b45d7a2 --- /dev/null +++ b/include/asm-ppc/bootx.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * This file describes the structure passed from the BootX application | ||
3 | * (for MacOS) when it is used to boot Linux. | ||
4 | * | ||
5 | * Written by Benjamin Herrenschmidt. | ||
6 | */ | ||
7 | |||
8 | |||
9 | #ifndef __ASM_BOOTX_H__ | ||
10 | #define __ASM_BOOTX_H__ | ||
11 | |||
12 | #ifdef macintosh | ||
13 | #include <Types.h> | ||
14 | #include "linux_type_defs.h" | ||
15 | #endif | ||
16 | |||
17 | #ifdef macintosh | ||
18 | /* All this requires PowerPC alignment */ | ||
19 | #pragma options align=power | ||
20 | #endif | ||
21 | |||
22 | /* On kernel entry: | ||
23 | * | ||
24 | * r3 = 0x426f6f58 ('BooX') | ||
25 | * r4 = pointer to boot_infos | ||
26 | * r5 = NULL | ||
27 | * | ||
28 | * Data and instruction translation disabled, interrupts | ||
29 | * disabled, kernel loaded at physical 0x00000000 on PCI | ||
30 | * machines (will be different on NuBus). | ||
31 | */ | ||
32 | |||
33 | #define BOOT_INFO_VERSION 5 | ||
34 | #define BOOT_INFO_COMPATIBLE_VERSION 1 | ||
35 | |||
36 | /* Bit in the architecture flag mask. More to be defined in | ||
37 | future versions. Note that either BOOT_ARCH_PCI or | ||
38 | BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are | ||
39 | set additionally when BOOT_ARCH_NUBUS is set. | ||
40 | */ | ||
41 | #define BOOT_ARCH_PCI 0x00000001UL | ||
42 | #define BOOT_ARCH_NUBUS 0x00000002UL | ||
43 | #define BOOT_ARCH_NUBUS_PDM 0x00000010UL | ||
44 | #define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL | ||
45 | #define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL | ||
46 | |||
47 | /* Maximum number of ranges in phys memory map */ | ||
48 | #define MAX_MEM_MAP_SIZE 26 | ||
49 | |||
50 | /* This is the format of an element in the physical memory map. Note that | ||
51 | the map is optional and current BootX will only build it for pre-PCI | ||
52 | machines */ | ||
53 | typedef struct boot_info_map_entry | ||
54 | { | ||
55 | __u32 physAddr; /* Physical starting address */ | ||
56 | __u32 size; /* Size in bytes */ | ||
57 | } boot_info_map_entry_t; | ||
58 | |||
59 | |||
60 | /* Here are the boot informations that are passed to the bootstrap | ||
61 | * Note that the kernel arguments and the device tree are appended | ||
62 | * at the end of this structure. */ | ||
63 | typedef struct boot_infos | ||
64 | { | ||
65 | /* Version of this structure */ | ||
66 | __u32 version; | ||
67 | /* backward compatible down to version: */ | ||
68 | __u32 compatible_version; | ||
69 | |||
70 | /* NEW (vers. 2) this holds the current _logical_ base addr of | ||
71 | the frame buffer (for use by early boot message) */ | ||
72 | __u8* logicalDisplayBase; | ||
73 | |||
74 | /* NEW (vers. 4) Apple's machine identification */ | ||
75 | __u32 machineID; | ||
76 | |||
77 | /* NEW (vers. 4) Detected hw architecture */ | ||
78 | __u32 architecture; | ||
79 | |||
80 | /* The device tree (internal addresses relative to the beginning of the tree, | ||
81 | * device tree offset relative to the beginning of this structure). | ||
82 | * On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this | ||
83 | * field is 0. | ||
84 | */ | ||
85 | __u32 deviceTreeOffset; /* Device tree offset */ | ||
86 | __u32 deviceTreeSize; /* Size of the device tree */ | ||
87 | |||
88 | /* Some infos about the current MacOS display */ | ||
89 | __u32 dispDeviceRect[4]; /* left,top,right,bottom */ | ||
90 | __u32 dispDeviceDepth; /* (8, 16 or 32) */ | ||
91 | __u8* dispDeviceBase; /* base address (physical) */ | ||
92 | __u32 dispDeviceRowBytes; /* rowbytes (in bytes) */ | ||
93 | __u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */ | ||
94 | /* Optional offset in the registry to the current | ||
95 | * MacOS display. (Can be 0 when not detected) */ | ||
96 | __u32 dispDeviceRegEntryOffset; | ||
97 | |||
98 | /* Optional pointer to boot ramdisk (offset from this structure) */ | ||
99 | __u32 ramDisk; | ||
100 | __u32 ramDiskSize; /* size of ramdisk image */ | ||
101 | |||
102 | /* Kernel command line arguments (offset from this structure) */ | ||
103 | __u32 kernelParamsOffset; | ||
104 | |||
105 | /* ALL BELOW NEW (vers. 4) */ | ||
106 | |||
107 | /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag | ||
108 | (non-PCI) only. On PCI, memory is contiguous and it's size is in the | ||
109 | device-tree. */ | ||
110 | boot_info_map_entry_t | ||
111 | physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */ | ||
112 | __u32 physMemoryMapSize; /* How many entries in map */ | ||
113 | |||
114 | |||
115 | /* The framebuffer size (optional, currently 0) */ | ||
116 | __u32 frameBufferSize; /* Represents a max size, can be 0. */ | ||
117 | |||
118 | /* NEW (vers. 5) */ | ||
119 | |||
120 | /* Total params size (args + colormap + device tree + ramdisk) */ | ||
121 | __u32 totalParamsSize; | ||
122 | |||
123 | } boot_infos_t; | ||
124 | |||
125 | /* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index is represented | ||
126 | * by 3 short words containing a 16 bits (unsigned) color component. | ||
127 | * Later versions may contain the gamma table for direct-color devices here. | ||
128 | */ | ||
129 | #define BOOTX_COLORTABLE_SIZE (256UL*3UL*2UL) | ||
130 | |||
131 | #ifdef macintosh | ||
132 | #pragma options align=reset | ||
133 | #endif | ||
134 | |||
135 | #endif | ||