| 1 |
|
| 2 | |
| 3 | * This file describes the structure passed from the BootX application
|
| 4 | * (for MacOS) when it is used to boot Linux.
|
| 5 | *
|
| 6 | * Written by Benjamin Herrenschmidt.
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 | #ifndef _UAPI__ASM_BOOTX_H__
|
| 11 | #define _UAPI__ASM_BOOTX_H__
|
| 12 |
|
| 13 | #include <linux/types.h>
|
| 14 |
|
| 15 | #ifdef macintosh
|
| 16 | #include <Types.h>
|
| 17 | #include "linux_type_defs.h"
|
| 18 | #endif
|
| 19 |
|
| 20 | #ifdef macintosh
|
| 21 |
|
| 22 | #pragma options align=power
|
| 23 | #endif
|
| 24 |
|
| 25 | |
| 26 | *
|
| 27 | * r3 = 0x426f6f58 ('BooX')
|
| 28 | * r4 = pointer to boot_infos
|
| 29 | * r5 = NULL
|
| 30 | *
|
| 31 | * Data and instruction translation disabled, interrupts
|
| 32 | * disabled, kernel loaded at physical 0x00000000 on PCI
|
| 33 | * machines (will be different on NuBus).
|
| 34 |
|
| 35 |
|
| 36 | #define BOOT_INFO_VERSION 5
|
| 37 | #define BOOT_INFO_COMPATIBLE_VERSION 1
|
| 38 |
|
| 39 | |
| 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.
|
| 43 |
|
| 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
|
| 49 |
|
| 50 |
|
| 51 | #define MAX_MEM_MAP_SIZE 26
|
| 52 |
|
| 53 | |
| 54 | the map is optional and current BootX will only build it for pre-PCI
|
| 55 | machines
|
| 56 | typedef struct boot_info_map_entry
|
| 57 | {
|
| 58 | __u32 physAddr;
|
| 59 | __u32 size;
|
| 60 | } boot_info_map_entry_t;
|
| 61 |
|
| 62 |
|
| 63 | |
| 64 | * Note that the kernel arguments and the device tree are appended
|
| 65 | * at the end of this structure.
|
| 66 | typedef struct boot_infos
|
| 67 | {
|
| 68 |
|
| 69 | __u32 version;
|
| 70 |
|
| 71 | __u32 compatible_version;
|
| 72 |
|
| 73 | |
| 74 | the frame buffer (for use by early boot message)
|
| 75 | __u8* logicalDisplayBase;
|
| 76 |
|
| 77 |
|
| 78 | __u32 machineID;
|
| 79 |
|
| 80 |
|
| 81 | __u32 architecture;
|
| 82 |
|
| 83 | |
| 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
|
| 86 | * field is 0.
|
| 87 |
|
| 88 | __u32 deviceTreeOffset;
|
| 89 | __u32 deviceTreeSize;
|
| 90 |
|
| 91 |
|
| 92 | __u32 dispDeviceRect[4];
|
| 93 | __u32 dispDeviceDepth;
|
| 94 | __u8* dispDeviceBase;
|
| 95 | __u32 dispDeviceRowBytes;
|
| 96 | __u32 dispDeviceColorsOffset;
|
| 97 | |
| 98 | * MacOS display. (Can be 0 when not detected)
|
| 99 | __u32 dispDeviceRegEntryOffset;
|
| 100 |
|
| 101 |
|
| 102 | __u32 ramDisk;
|
| 103 | __u32 ramDiskSize;
|
| 104 |
|
| 105 |
|
| 106 | __u32 kernelParamsOffset;
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 | |
| 111 | (non-PCI) only. On PCI, memory is contiguous and its size is in the
|
| 112 | device-tree.
|
| 113 | boot_info_map_entry_t
|
| 114 | physMemoryMap[MAX_MEM_MAP_SIZE];
|
| 115 | __u32 physMemoryMapSize;
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 | __u32 frameBufferSize;
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 | __u32 totalParamsSize;
|
| 125 |
|
| 126 | } boot_infos_t;
|
| 127 |
|
| 128 |
|
| 129 | #ifdef macintosh
|
| 130 | #pragma options align=reset
|
| 131 | #endif
|
| 132 |
|
| 133 | #endif
|