1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * This file describes the structure passed from the BootX application
4 * (for MacOS) when it is used to boot Linux.
6 * Written by Benjamin Herrenschmidt.
10 #ifndef _UAPI__ASM_BOOTX_H__
11 #define _UAPI__ASM_BOOTX_H__
13 #include <linux/types.h>
17 #include "linux_type_defs.h"
21 /* All this requires PowerPC alignment */
22 #pragma options align=power
27 * r3 = 0x426f6f58 ('BooX')
28 * r4 = pointer to boot_infos
31 * Data and instruction translation disabled, interrupts
32 * disabled, kernel loaded at physical 0x00000000 on PCI
33 * machines (will be different on NuBus).
36 #define BOOT_INFO_VERSION 5
37 #define BOOT_INFO_COMPATIBLE_VERSION 1
39 /* Bit in the architecture flag mask. More to be defined in
40 future versions. Note that either BOOT_ARCH_PCI or
41 BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are
42 set additionally when BOOT_ARCH_NUBUS is set.
44 #define BOOT_ARCH_PCI 0x00000001UL
45 #define BOOT_ARCH_NUBUS 0x00000002UL
46 #define BOOT_ARCH_NUBUS_PDM 0x00000010UL
47 #define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL
48 #define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL
50 /* Maximum number of ranges in phys memory map */
51 #define MAX_MEM_MAP_SIZE 26
53 /* This is the format of an element in the physical memory map. Note that
54 the map is optional and current BootX will only build it for pre-PCI
56 typedef struct boot_info_map_entry
58 __u32 physAddr
; /* Physical starting address */
59 __u32 size
; /* Size in bytes */
60 } boot_info_map_entry_t
;
63 /* Here are the boot informations that are passed to the bootstrap
64 * Note that the kernel arguments and the device tree are appended
65 * at the end of this structure. */
66 typedef struct boot_infos
68 /* Version of this structure */
70 /* backward compatible down to version: */
71 __u32 compatible_version
;
73 /* NEW (vers. 2) this holds the current _logical_ base addr of
74 the frame buffer (for use by early boot message) */
75 __u8
* logicalDisplayBase
;
77 /* NEW (vers. 4) Apple's machine identification */
80 /* NEW (vers. 4) Detected hw architecture */
83 /* The device tree (internal addresses relative to the beginning of the tree,
84 * device tree offset relative to the beginning of this structure).
85 * On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this
88 __u32 deviceTreeOffset
; /* Device tree offset */
89 __u32 deviceTreeSize
; /* Size of the device tree */
91 /* Some infos about the current MacOS display */
92 __u32 dispDeviceRect
[4]; /* left,top,right,bottom */
93 __u32 dispDeviceDepth
; /* (8, 16 or 32) */
94 __u8
* dispDeviceBase
; /* base address (physical) */
95 __u32 dispDeviceRowBytes
; /* rowbytes (in bytes) */
96 __u32 dispDeviceColorsOffset
; /* Colormap (8 bits only) or 0 (*) */
97 /* Optional offset in the registry to the current
98 * MacOS display. (Can be 0 when not detected) */
99 __u32 dispDeviceRegEntryOffset
;
101 /* Optional pointer to boot ramdisk (offset from this structure) */
103 __u32 ramDiskSize
; /* size of ramdisk image */
105 /* Kernel command line arguments (offset from this structure) */
106 __u32 kernelParamsOffset
;
108 /* ALL BELOW NEW (vers. 4) */
110 /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag
111 (non-PCI) only. On PCI, memory is contiguous and it's size is in the
113 boot_info_map_entry_t
114 physMemoryMap
[MAX_MEM_MAP_SIZE
]; /* Where the phys memory is */
115 __u32 physMemoryMapSize
; /* How many entries in map */
118 /* The framebuffer size (optional, currently 0) */
119 __u32 frameBufferSize
; /* Represents a max size, can be 0. */
123 /* Total params size (args + colormap + device tree + ramdisk) */
124 __u32 totalParamsSize
;
130 #pragma options align=reset
133 #endif /* _UAPI__ASM_BOOTX_H__ */