Path: blob/master/arch/powerpc/include/uapi/asm/bootx.h
26516 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* This file describes the structure passed from the BootX application3* (for MacOS) when it is used to boot Linux.4*5* Written by Benjamin Herrenschmidt.6*/789#ifndef _UAPI__ASM_BOOTX_H__10#define _UAPI__ASM_BOOTX_H__1112#include <linux/types.h>1314#ifdef macintosh15#include <Types.h>16#include "linux_type_defs.h"17#endif1819#ifdef macintosh20/* All this requires PowerPC alignment */21#pragma options align=power22#endif2324/* On kernel entry:25*26* r3 = 0x426f6f58 ('BooX')27* r4 = pointer to boot_infos28* r5 = NULL29*30* Data and instruction translation disabled, interrupts31* disabled, kernel loaded at physical 0x00000000 on PCI32* machines (will be different on NuBus).33*/3435#define BOOT_INFO_VERSION 536#define BOOT_INFO_COMPATIBLE_VERSION 13738/* Bit in the architecture flag mask. More to be defined in39future versions. Note that either BOOT_ARCH_PCI or40BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are41set additionally when BOOT_ARCH_NUBUS is set.42*/43#define BOOT_ARCH_PCI 0x00000001UL44#define BOOT_ARCH_NUBUS 0x00000002UL45#define BOOT_ARCH_NUBUS_PDM 0x00000010UL46#define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL47#define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL4849/* Maximum number of ranges in phys memory map */50#define MAX_MEM_MAP_SIZE 265152/* This is the format of an element in the physical memory map. Note that53the map is optional and current BootX will only build it for pre-PCI54machines */55typedef struct boot_info_map_entry56{57__u32 physAddr; /* Physical starting address */58__u32 size; /* Size in bytes */59} boot_info_map_entry_t;606162/* Here are the boot informations that are passed to the bootstrap63* Note that the kernel arguments and the device tree are appended64* at the end of this structure. */65typedef struct boot_infos66{67/* Version of this structure */68__u32 version;69/* backward compatible down to version: */70__u32 compatible_version;7172/* NEW (vers. 2) this holds the current _logical_ base addr of73the frame buffer (for use by early boot message) */74__u8* logicalDisplayBase;7576/* NEW (vers. 4) Apple's machine identification */77__u32 machineID;7879/* NEW (vers. 4) Detected hw architecture */80__u32 architecture;8182/* The device tree (internal addresses relative to the beginning of the tree,83* device tree offset relative to the beginning of this structure).84* On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this85* field is 0.86*/87__u32 deviceTreeOffset; /* Device tree offset */88__u32 deviceTreeSize; /* Size of the device tree */8990/* Some infos about the current MacOS display */91__u32 dispDeviceRect[4]; /* left,top,right,bottom */92__u32 dispDeviceDepth; /* (8, 16 or 32) */93__u8* dispDeviceBase; /* base address (physical) */94__u32 dispDeviceRowBytes; /* rowbytes (in bytes) */95__u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */96/* Optional offset in the registry to the current97* MacOS display. (Can be 0 when not detected) */98__u32 dispDeviceRegEntryOffset;99100/* Optional pointer to boot ramdisk (offset from this structure) */101__u32 ramDisk;102__u32 ramDiskSize; /* size of ramdisk image */103104/* Kernel command line arguments (offset from this structure) */105__u32 kernelParamsOffset;106107/* ALL BELOW NEW (vers. 4) */108109/* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag110(non-PCI) only. On PCI, memory is contiguous and its size is in the111device-tree. */112boot_info_map_entry_t113physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */114__u32 physMemoryMapSize; /* How many entries in map */115116117/* The framebuffer size (optional, currently 0) */118__u32 frameBufferSize; /* Represents a max size, can be 0. */119120/* NEW (vers. 5) */121122/* Total params size (args + colormap + device tree + ramdisk) */123__u32 totalParamsSize;124125} boot_infos_t;126127128#ifdef macintosh129#pragma options align=reset130#endif131132#endif /* _UAPI__ASM_BOOTX_H__ */133134135