import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / Documentation / i386 / zero-page.txt
1 Summary of empty_zero_page layout (kernel point of view)
2      ( collected by Hans Lermen and Martin Mares )
3  
4 The contents of empty_zero_page are used to pass parameters from the
5 16-bit realmode code of the kernel to the 32-bit part. References/settings
6 to it mainly are in:
7
8   arch/i386/boot/setup.S
9   arch/i386/boot/video.S
10   arch/i386/kernel/head.S
11   arch/i386/kernel/setup.c
12  
13
14 Offset  Type            Description
15 ------  ----            -----------
16     0   32 bytes        struct screen_info, SCREEN_INFO
17                         ATTENTION, overlaps the following !!!
18     2   unsigned short  EXT_MEM_K, extended memory size in Kb (from int 0x15)
19  0x20   unsigned short  CL_MAGIC, commandline magic number (=0xA33F)
20  0x22   unsigned short  CL_OFFSET, commandline offset
21                         Address of commandline is calculated:
22                           0x90000 + contents of CL_OFFSET
23                         (only taken, when CL_MAGIC = 0xA33F)
24  0x40   20 bytes        struct apm_bios_info, APM_BIOS_INFO
25  0x80   16 bytes        hd0-disk-parameter from intvector 0x41
26  0x90   16 bytes        hd1-disk-parameter from intvector 0x46
27
28  0xa0   16 bytes        System description table truncated to 16 bytes.
29                         ( struct sys_desc_table_struct )
30  0xb0 - 0x1df           Free. Add more parameters here if you really need them.
31
32 0x1e0   unsigned long   ALT_MEM_K, alternative mem check, in Kb
33 0x1e8   char            number of entries in E820MAP (below)
34 0x1e9   unsigned char   number of entries in EDDBUF (below)
35 0x1f1   char            size of setup.S, number of sectors
36 0x1f2   unsigned short  MOUNT_ROOT_RDONLY (if !=0)
37 0x1f4   unsigned short  size of compressed kernel-part in the
38                         (b)zImage-file (in 16 byte units, rounded up)
39 0x1f6   unsigned short  swap_dev (unused AFAIK)
40 0x1f8   unsigned short  RAMDISK_FLAGS
41 0x1fa   unsigned short  VGA-Mode (old one)
42 0x1fc   unsigned short  ORIG_ROOT_DEV (high=Major, low=minor)
43 0x1ff   char            AUX_DEVICE_INFO
44
45 0x200   short jump to start of setup code aka "reserved" field.
46 0x202   4 bytes         Signature for SETUP-header, ="HdrS"
47 0x206   unsigned short  Version number of header format
48                         Current version is 0x0201...
49 0x208   8 bytes         (used by setup.S for communication with boot loaders,
50                          look there)
51 0x210   char            LOADER_TYPE, = 0, old one
52                         else it is set by the loader:
53                         0xTV: T=0 for LILO
54                                 1 for Loadlin
55                                 2 for bootsect-loader
56                                 3 for SYSLINUX
57                                 4 for ETHERBOOT
58                                 V = version
59 0x211   char            loadflags:
60                         bit0 = 1: kernel is loaded high (bzImage)
61                         bit7 = 1: Heap and pointer (see below) set by boot
62                                   loader.
63 0x212   unsigned short  (setup.S)
64 0x214   unsigned long   KERNEL_START, where the loader started the kernel
65 0x218   unsigned long   INITRD_START, address of loaded ramdisk image
66 0x21c   unsigned long   INITRD_SIZE, size in bytes of ramdisk image
67 0x220   4 bytes         (setup.S)
68 0x224   unsigned short  setup.S heap end pointer
69 0x228   4 bytes         unknown, but writing this in setup.S makes
70                         kernel fail to decompress on some systems
71 0x2cc   4 bytes         DISK80_SIG_BUFFER (setup.S)
72 0x2d0 - 0x600           E820MAP
73 0x600 - 0x7ff           EDDBUF (setup.S) for disk signature read sector
74 0x600 - 0x7de           EDDBUF (setup.S)
75
76 0x800   string, 2K max  COMMAND_LINE, the kernel commandline as
77                         copied using CL_OFFSET.
78                         Note: this will be copied once more by setup.c
79                         into a local buffer which is only 256 bytes long.
80                         ( #define COMMAND_LINE_SIZE 256 )