mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
hw_x86_64: Use mtc relative addressing for _mt_buffer in crt0.s
Until the kernel page tables are active, labels can't be used directly because the associated pages are not mapped for non-core threads.
This commit is contained in:
parent
09c90e5751
commit
080d7d5f8b
@ -32,6 +32,8 @@
|
||||
/* tss segment limit */
|
||||
.set TSS_LIMIT, 0x68
|
||||
|
||||
/* mtc virt addresses */
|
||||
.set MT_BUFFER, _mt_buffer - _mt_begin
|
||||
.macro _isr_entry
|
||||
.align 4, 0x90
|
||||
.endm
|
||||
@ -126,7 +128,7 @@
|
||||
_mt_kernel_entry_pic:
|
||||
|
||||
/* Copy client context RAX to buffer */
|
||||
mov %rax, _mt_buffer
|
||||
mov %rax, MT_BUFFER
|
||||
|
||||
/* Switch to kernel page tables */
|
||||
mov _mt_master_context_begin+CR3_OFFSET, %rax
|
||||
@ -235,7 +237,7 @@
|
||||
mov %rax, %cr3
|
||||
|
||||
/* Set stack back to mt buffer and restore client RAX */
|
||||
mov $_mt_buffer, %rsp
|
||||
mov $MT_BUFFER, %rsp
|
||||
popq %rax
|
||||
|
||||
iretq
|
||||
|
Loading…
x
Reference in New Issue
Block a user