Skip to content

Commit da89bfd

Browse files
rizlikdanielinux
authored andcommitted
x86/paging: reduce the number of pages for identity mapping
7 pages are enough to map the low memory (4GB)
1 parent 1650569 commit da89bfd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/x86/paging.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525

2626
#define PAGE_TABLE_PAGE_SIZE (0x1000)
2727
#ifndef PAGE_TABLE_PAGE_NUM
28-
#define PAGE_TABLE_PAGE_NUM 100
28+
/* 7 pages are enough to identity map al 4GB */
29+
#define PAGE_TABLE_PAGE_NUM 7
2930
#endif /* PAGE_TABLE_PAGE_NUM */
3031

3132
#define PAGE_TABLE_SIZE (PAGE_TABLE_PAGE_SIZE * PAGE_TABLE_PAGE_NUM)

0 commit comments

Comments
 (0)