X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/48b4a227035048fdebcd32532deb7a857c6199ac..0067bc210e621ccda286092d081a7890d65e1c18:/lunaix-os/includes/lunaix/mm/page.h?ds=sidebyside diff --git a/lunaix-os/includes/lunaix/mm/page.h b/lunaix-os/includes/lunaix/mm/page.h index a6b3162..5755a46 100644 --- a/lunaix-os/includes/lunaix/mm/page.h +++ b/lunaix-os/includes/lunaix/mm/page.h @@ -95,11 +95,17 @@ typedef struct extern void __pg_mount_point; -/* 三个页挂载点: 用于临时创建&编辑页表 */ - -#define PG_MOUNT_1 (&__pg_mount_point) -#define PG_MOUNT_2 (&__pg_mount_point + 0x1000) -#define PG_MOUNT_3 (&__pg_mount_point + 0x2000) - +/* 四个页挂载点,两个页目录挂载点: 用于临时创建&编辑页表 */ + +#define PD_MOUNT_1 0xAFC00000 +#define PD_MOUNT_2 0xAF800000 +#define PG_MOUNT_BASE 0xAF7FF000 +#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 PD_REFERENCED L2_BASE_VADDR + +#define CURPROC_PTE(vpn) (&((x86_page_table*)(PD_MOUNT_1 | (((vpn) & 0xffc00) << 2)))->entry[(vpn) & 0x3ff]) #endif /* __LUNAIX_PAGE_H */