* better
[mascara-docs.git] / i386 / linux-2.3.21 / include / asm-ppc / bootx.h
blob5674bd0f9e511b3492cca62b9f642d8a7117ca20
1 /*
2 * This file describes the structure passed from the BootX application
3 * (for MacOS) when it is used to boot Linux.
5 * Written by Benjamin Herrenschmidt.
6 */
9 #ifndef __ASM_BOOTX_H__
10 #define __ASM_BOOTX_H__
12 #ifdef macintosh
13 #include <Types.h>
14 #include "linux_type_defs.h"
15 #endif
17 #ifdef macintosh
18 /* All this requires PowerPC alignment */
19 #pragma options align=power
20 #endif
22 /* On kernel entry:
24 * r3 = 0x426f6f58 ('BooX')
25 * r4 = pointer to boot_infos
26 * r5 = NULL
28 * Data and instruction translation disabled, interrupts
29 * disabled, kernel loaded at physical 0x00000000 on PCI
30 * machines (will be different on NuBus).
33 #define BOOT_INFO_VERSION 5
34 #define BOOT_INFO_COMPATIBLE_VERSION 1
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.
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
47 /* Maximum number of ranges in phys memory map */
48 #define MAX_MEM_MAP_SIZE 26
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
55 __u32 physAddr; /* Physical starting address */
56 __u32 size; /* Size in bytes */
57 } boot_info_map_entry_t;
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
65 /* Version of this structure */
66 __u32 version;
67 /* backward compatible down to version: */
68 __u32 compatible_version;
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;
74 /* NEW (vers. 4) Apple's machine identification */
75 __u32 machineID;
77 /* NEW (vers. 4) Detected hw architecture */
78 __u32 architecture;
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.
85 __u32 deviceTreeOffset; /* Device tree offset */
86 __u32 deviceTreeSize; /* Size of the device tree */
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;
98 /* Optional pointer to boot ramdisk (offset from this structure) */
99 __u32 ramDisk;
100 __u32 ramDiskSize; /* size of ramdisk image */
102 /* Kernel command line arguments (offset from this structure) */
103 __u32 kernelParamsOffset;
105 /* ALL BELOW NEW (vers. 4) */
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 */
115 /* The framebuffer size (optional, currently 0) */
116 __u32 frameBufferSize; /* Represents a max size, can be 0. */
118 /* NEW (vers. 5) */
120 /* Total params size (args + colormap + device tree + ramdisk) */
121 __u32 totalParamsSize;
123 } boot_infos_t;
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.
129 #define BOOTX_COLORTABLE_SIZE (256UL*3UL*2UL)
131 #ifdef macintosh
132 #pragma options align=reset
133 #endif
135 #endif