I'm following the tutorial on creating a higher half kernel, but I can't figure out why, when accessing each symbol in the code, 0xC0000000 is subtracted
In the first line in the _start function, when accessing the boot page table, 0xC0000000 is subtracted from it
Code: Select all
# Physical address of boot_page_table1.
movl $(boot_page_table1 - 0xC0000000), %edi
Code: Select all
# Map the page table to both virtual addresses 0x00000000 and 0xC0000000.
movl $(boot_page_table1 - 0xC0000000 + 0x003), boot_page_directory - 0xC0000000 + 0
movl $(boot_page_table1 - 0xC0000000 + 0x003), boot_page_directory - 0xC0000000 + 768 * 4
I assume that the changed
Code: Select all
. += 0xC0000000;