mirror of
https://github.com/justinian/jsix.git
synced 2025-12-11 08:54:31 -08:00
In order to implement capabilities on system resources like IRQs so that they may be restricted to drivers only, add a new 'system' kobject type, and move the bind_irq functionality from endpoint to system. Also fix some stack bugs passing the initial handles to a program.
25 lines
604 B
ArmAsm
25 lines
604 B
ArmAsm
%include "push_all.inc"
|
|
|
|
extern load_process_image
|
|
|
|
global preloaded_process_init
|
|
preloaded_process_init:
|
|
|
|
; create_process already pushed the arguments for load_process_image and
|
|
; the following iretq onto the stack for us
|
|
|
|
pop rdi ; the physical address of the program image
|
|
pop rsi ; the virtual address of the program image
|
|
pop rdx ; the size in bytes of the program image
|
|
pop rcx ; the address of this thread's TCB
|
|
|
|
call load_process_image
|
|
|
|
; user rsp is now in rax, put it in the right place for iret
|
|
mov [rsp + 0x18], rax
|
|
|
|
; the entrypoint should already be on the stack
|
|
swapgs
|
|
iretq
|
|
|