mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
avoid memory access by preloading image_size into r11
This commit is contained in:
parent
23a98157b2
commit
c7ce8fc81b
1 changed files with 2 additions and 1 deletions
|
@ -194,6 +194,7 @@ Lno_mbinfo:
|
|||
xor rcx, rcx
|
||||
mov rsi, 510*0x200000
|
||||
sub rsi, kernel_start
|
||||
mov r11, QWORD [image_size]
|
||||
Lremap:
|
||||
mov QWORD [rdi], rax
|
||||
add rax, 0x200000
|
||||
|
@ -202,7 +203,7 @@ Lremap:
|
|||
; note: the whole code segement has to fit in the first pgd
|
||||
cmp rcx, rsi
|
||||
jnb Lno_pml4_init
|
||||
cmp rcx, QWORD [image_size]
|
||||
cmp rcx, r11
|
||||
jb Lremap
|
||||
|
||||
Lno_pml4_init:
|
||||
|
|
Loading…
Add table
Reference in a new issue