📄 map.h
字号:
/***************************************************************************
** File name : map.h
** Author : x.cheng
** Create date :
**
** Comment:
** 内存映射头文件
**
** Revisions:
** $Log: map.h,v $
** Revision 1.3 2005/08/19 15:00:32 x.cheng
** using vector to store free page, so change free memory start address
**
** Revision 1.2 2005/07/27 08:04:01 x.cheng
** KernelEnd_...bug fixing...
**
** Revision 1.1.1.1 2005/07/27 06:53:15 x.cheng
** add into repositories
**
**
***************************************************************************/
#ifndef __MAP_H__
#define __MAP_H__
// --- V86-required address space ------------------------------------- //
//! BIOS Interrupt Vector Table (IVT) start address.
#define BIOS_IVT_START 0x00000000
//! BIOS Interrupt Vector Table (IVT) end address.
#define BIOS_IVT_END 0x00001000
//! Video Buffer area start address.
#define VIDEO_BUF_START 0x000A0000
//! Video Buffer area end address.
#define VIDEO_BUF_END 0x000C0000
//! ROM BIOS memory start address.
#define BIOS_ROM_START 0x000C0000
//! ROM BIOS memory end address.
#define BIOS_ROM_END 0x00100000
// --- Kernel virtual address space ----------------------------------- //
#define KERNEL_VIRTUAL_START 0xC0000000
//! Kernel virtual start address.
//! \note Must be (PAGE_SIZE*1024) aligned!!!
#define KERNEL_LINK_VIRTUAL_ADDRESS_START 0xC0100000
extern unsigned char* g_pucMemoryBitmapEnd;
#define KERNEL_FREE_MEMORY_START g_pucMemoryBitmapEnd
// Kernel virtual address linkage end
extern unsigned long KernelEnd_;
#define KERNEL_LINK_VIRTUAL_ADDRESS_END &KernelEnd_
#define KERNEL_HEAP_START_ADDRESS 0xD0000000 // Kernel heap start address.
#define KERNEL_HEAP_END_ADDRESS 0xE0000000 // Kernel heap end address.
//! Some physical memory (first 16MB of physical memory are mapped here)
//! start address.
#define KERNEL_PHYS_MEM_START 0xE0000000
//! Some physical memory (first 16MB of physical memory are mapped here)
//! end address.
#define KERNEL_PHYS_MEM_END 0xE1000000
//! Temporary memory area start address.
#define KERNEL_TEMP_START_ADDRESS 0xE1000000
//! Temporary memory area end address.
#define KERNEL_TEMP_END_ADDRESS 0xFFC00000
//! Page tables area(4MB) start address.
#define PAGE_TABLE_AREA_START_ADDRESS (0xFFC00000)
#define PAGE_TABLE_MAP (0xFFC00000)
//! Page tables area end address. 0xFFC00000+0x3FF000 = 0xFFFFF000
//因为我们把页目录映射到了最后
#define PAGE_DIR_TABLE_START_ADDRESS \
(PAGE_TABLE_AREA_START_ADDRESS + (PAGE_TABLE_AREA_START_ADDRESS / (1024)))
#define PAGE_DIR_MAP (0xFFC00000 + (PAGE_TABLE_MAP / (1024)))
#endif /* end of __MAP_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -