diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-11-09 20:45:52 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-11-09 20:45:52 +0100 |
| commit | 89a0b8efb6491b93a8a373ad36c0a3872cd2ed44 (patch) | |
| tree | e75227186c7b5e1e99aa9b09da4cead2f6dfd3cc /dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm | |
| parent | c72867a43cdedd28783e188b1d44d566b92b6a37 (diff) | |
IMP: PosixKit, to communicate with pureDarwin correctly.
IMP: Breakpoint interrupt has been implemented.
IMP: Interrupts handlers have been improved for AMD64 HAL.
Diffstat (limited to 'dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm')
| -rw-r--r-- | dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm b/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm index 9121edb9..293dafde 100644 --- a/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm +++ b/dev/ZKAKit/HALKit/AMD64/HalInterruptAPI.asm @@ -50,15 +50,42 @@ extern idt_handle_pf extern ke_io_write extern idt_handle_ud extern idt_handle_generic +extern idt_handle_breakpoint section .text IntNormal 0 IntNormal 1 - IntNormal 2 -IntNormal 3 +section .data + +__ZKA_INT_3_GET_RIP: + dq 0 +__ZKA_INT_3_GET_RIP_END: + +section .text + +;; @brief Triggers a breakpoint and freeze the process. RIP is also fetched. +__ZKA_INT_3: + cli + + mov al, 0x20 + out 0x20, al + out 0xA0, al + + push rax + mov rax, idt_handle_breakpoint + + lea rcx, [rel __ZKA_INT_3_GET_RIP] + mov [rcx], rcx + + call rax + pop rax + + sti + o64 iret + IntNormal 4 IntNormal 5 |
