?? boot.h
字號:
/*
* structures and definitions for the int 15, ax=e820 memory map
* scheme.
*
* In a nutshell, arch/i386/boot/setup.S populates a scratch table
* in the empty_zero_block that contains a list of usable address/size
* duples. In arch/i386/kernel/setup.c, this information is
* transferred into the e820map, and in arch/i386/mm/init.c, that
* new information is used to mark pages reserved or not.
*
*/
#ifndef __boot_HEADER
#define __boot_HEADER
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//;
//; 定義啟動過程參數
//;
//; fsector.s 軟驅啟動記錄,自舉到0x90000
//; setup.s 由fsector.s 加載到 0x10000,長2048 字節,
//; 其后是以head.s 開始的內核.
//; kernel/head.s 內核被setup.s 裝載到 0x100000 (1M).
#define BOOTSEG 0x07c0
#define INITSEG 0x9000
#define SYSSEG 0x1000 //; system loaded at 0x10000 (65536).
#define ENDSEG SYSSEG + 0x8000 //;SYSSIZE, 448k
/*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
* E820 sruct
*
*
*/
#define E820MAP 0x2d0 /* our map */
#define E820MAX 32 /* number of entries in E820MAP */
#define E820NR 0x1e8 /* # entries in E820MAP */
#define E820_RAM 1
#define E820_RESERVED 2
#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
#define E820_NVS 4
#define HIGH_MEMORY (1024*1024)
#pragma pack(1)
struct e820map {
struct e820entry {
unsigned long long addr; /* start of memory segment */
unsigned long long size; /* size of memory segment */
unsigned long type; /* type of memory segment */
} map[E820MAX];
};
extern struct e820map e820;
/*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
* boot parameter
*
*/
#define BTPASEG INITSEG //;傳遞給內核的參數覆蓋引導記錄
struct boot{
char e820nr;
struct e820map e820;
};
#pragma pack(0)
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -