x86: unify a.out{,_32,_64}.h
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / Documentation / i386 / zero-page.txt
CommitLineData
43fb2387
AK
1---------------------------------------------------------------------------
2!!!!!!!!!!!!!!!WARNING!!!!!!!!
3The zero page is a kernel internal data structure, not a stable ABI. It might change
4without warning and the kernel has no way to detect old version of it.
5If you're writing some external code like a boot loader you should only use
6the stable versioned real mode boot protocol described in boot.txt. Otherwise the kernel
7might break you at any time.
8!!!!!!!!!!!!!WARNING!!!!!!!!!!!
9----------------------------------------------------------------------------
10
1da177e4
LT
11Summary of boot_params layout (kernel point of view)
12 ( collected by Hans Lermen and Martin Mares )
13
14The contents of boot_params are used to pass parameters from the
1516-bit realmode code of the kernel to the 32-bit part. References/settings
16to it mainly are in:
17
18 arch/i386/boot/setup.S
19 arch/i386/boot/video.S
20 arch/i386/kernel/head.S
21 arch/i386/kernel/setup.c
22
23
24Offset Type Description
25------ ---- -----------
26 0 32 bytes struct screen_info, SCREEN_INFO
27 ATTENTION, overlaps the following !!!
28 2 unsigned short EXT_MEM_K, extended memory size in Kb (from int 0x15)
29 0x20 unsigned short CL_MAGIC, commandline magic number (=0xA33F)
30 0x22 unsigned short CL_OFFSET, commandline offset
31 Address of commandline is calculated:
32 0x90000 + contents of CL_OFFSET
33 (only taken, when CL_MAGIC = 0xA33F)
34 0x40 20 bytes struct apm_bios_info, APM_BIOS_INFO
35 0x60 16 bytes Intel SpeedStep (IST) BIOS support information
36 0x80 16 bytes hd0-disk-parameter from intvector 0x41
37 0x90 16 bytes hd1-disk-parameter from intvector 0x46
38
39 0xa0 16 bytes System description table truncated to 16 bytes.
40 ( struct sys_desc_table_struct )
41 0xb0 - 0x13f Free. Add more parameters here if you really need them.
42 0x140- 0x1be EDID_INFO Video mode setup
43
440x1c4 unsigned long EFI system table pointer
450x1c8 unsigned long EFI memory descriptor size
460x1cc unsigned long EFI memory descriptor version
470x1d0 unsigned long EFI memory descriptor map pointer
480x1d4 unsigned long EFI memory descriptor map size
490x1e0 unsigned long ALT_MEM_K, alternative mem check, in Kb
85414b69 500x1e4 unsigned long Scratch field for the kernel setup code
1da177e4
LT
510x1e8 char number of entries in E820MAP (below)
520x1e9 unsigned char number of entries in EDDBUF (below)
530x1ea unsigned char number of entries in EDD_MBR_SIG_BUFFER (below)
540x1f1 char size of setup.S, number of sectors
550x1f2 unsigned short MOUNT_ROOT_RDONLY (if !=0)
560x1f4 unsigned short size of compressed kernel-part in the
57 (b)zImage-file (in 16 byte units, rounded up)
580x1f6 unsigned short swap_dev (unused AFAIK)
590x1f8 unsigned short RAMDISK_FLAGS
600x1fa unsigned short VGA-Mode (old one)
610x1fc unsigned short ORIG_ROOT_DEV (high=Major, low=minor)
620x1ff char AUX_DEVICE_INFO
63
640x200 short jump to start of setup code aka "reserved" field.
650x202 4 bytes Signature for SETUP-header, ="HdrS"
660x206 unsigned short Version number of header format
67 Current version is 0x0201...
680x208 8 bytes (used by setup.S for communication with boot loaders,
69 look there)
700x210 char LOADER_TYPE, = 0, old one
71 else it is set by the loader:
72 0xTV: T=0 for LILO
73 1 for Loadlin
74 2 for bootsect-loader
75 3 for SYSLINUX
76 4 for ETHERBOOT
354332ee
JF
77 5 for ELILO
78 7 for GRuB
79 8 for U-BOOT
80 9 for Xen
1da177e4
LT
81 V = version
820x211 char loadflags:
83 bit0 = 1: kernel is loaded high (bzImage)
84 bit7 = 1: Heap and pointer (see below) set by boot
85 loader.
860x212 unsigned short (setup.S)
870x214 unsigned long KERNEL_START, where the loader started the kernel
880x218 unsigned long INITRD_START, address of loaded ramdisk image
890x21c unsigned long INITRD_SIZE, size in bytes of ramdisk image
900x220 4 bytes (setup.S)
910x224 unsigned short setup.S heap end pointer
920x226 unsigned short zero_pad
930x228 unsigned long cmd_line_ptr
940x22c unsigned long ramdisk_max
950x230 16 bytes trampoline
960x290 - 0x2cf EDD_MBR_SIG_BUFFER (edd.S)
f9ba7053
VP
970x2d0 - 0xd00 E820MAP
980xd00 - 0xeff EDDBUF (edd.S) for disk signature read sector
990xd00 - 0xeeb EDDBUF (edd.S) for edd data