mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +00:00
Kernel: Support loading the kernel at almost arbitrary virtual addresses
This enables further work on implementing KASLR by adding relocation support to the pre-kernel and updating the kernel to be less dependent on specific virtual memory layouts.
This commit is contained in:
parent
e3d2ca6bd2
commit
57417a3d6e
20 changed files with 123 additions and 87 deletions
|
@ -109,7 +109,7 @@ apic_ap_start32_2:
|
|||
|
||||
/* push the Processor pointer this CPU is going to use */
|
||||
movl (ap_cpu_init_processor_info_array - apic_ap_start)(%ebp), %eax
|
||||
addl kernel_base, %eax
|
||||
addl kernel_load_base, %eax
|
||||
movl 0(%eax, %esi, 4), %eax
|
||||
push %eax
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ apic_ap_start64:
|
|||
|
||||
/* push the Processor pointer this CPU is going to use */
|
||||
movq (ap_cpu_init_processor_info_array - apic_ap_start)(%ebp), %rax
|
||||
leaq kernel_base(%rip), %r8
|
||||
leaq kernel_load_base(%rip), %r8
|
||||
movq (%r8), %r8
|
||||
addq %r8, %rax
|
||||
movq 0(%rax, %rsi, 4), %rax
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue