zero-page.txt
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

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