X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/75339638bc5f21f13d3475374ecbd91065a427c3..87067c7f16425837971f5c1b5fd0fc5338757377:/lunaix-os/includes/lunaix/mm/page.h diff --git a/lunaix-os/includes/lunaix/mm/page.h b/lunaix-os/includes/lunaix/mm/page.h index 8720e1c..9afb2ed 100644 --- a/lunaix-os/includes/lunaix/mm/page.h +++ b/lunaix-os/includes/lunaix/mm/page.h @@ -86,7 +86,7 @@ typedef struct // 物理页地址(如果不存在映射,则为0) ptr_t pa; // 映射的flags - uint16_t flags; + u16_t flags; // PTE地址 x86_pte_t* pte; } v_mapping; @@ -94,19 +94,22 @@ typedef struct typedef struct { x86_pte_t entry[PG_MAX_ENTRIES]; -} __attribute__((packed)) x86_page_table; +} __attribute__((packed, aligned(4))) x86_page_table; extern void __pg_mount_point; /* 四个页挂载点,两个页目录挂载点: 用于临时创建&编辑页表 */ #define PG_MOUNT_RANGE(l1_index) (701 <= l1_index && l1_index <= 703) -#define VMS_MOUNT_1 (KERNEL_MM_BASE + MEM_4MB) +#define VMS_MOUNT_1 (KERNEL_MM_BASE + KSIZE) #define PG_MOUNT_BASE (VMS_MOUNT_1 + MEM_4MB) #define PG_MOUNT_1 (PG_MOUNT_BASE) #define PG_MOUNT_2 (PG_MOUNT_BASE + 0x1000) #define PG_MOUNT_3 (PG_MOUNT_BASE + 0x2000) #define PG_MOUNT_4 (PG_MOUNT_BASE + 0x3000) +/* + 当前进程内存空间挂载点 +*/ #define VMS_SELF L2_BASE_VADDR #define CURPROC_PTE(vpn) \