mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +00:00
Kernel: Add debug register handling
This patch adds functions to read/write from the debug registers, and implements storing/loading them across context switches.
This commit is contained in:
parent
c84107a1ab
commit
97a4c627cb
Notes:
sideshowbarker
2024-07-18 19:26:52 +09:00
Author: https://github.com/FalseHonesty
Commit: 97a4c627cb
Pull-request: https://github.com/SerenityOS/serenity/pull/6353
Reviewed-by: https://github.com/bgianfo ✅
3 changed files with 97 additions and 11 deletions
|
@ -763,6 +763,9 @@ public:
|
|||
RegisterState& get_register_dump_from_stack();
|
||||
const RegisterState& get_register_dump_from_stack() const { return const_cast<Thread*>(this)->get_register_dump_from_stack(); }
|
||||
|
||||
DebugRegisterState& debug_register_state() { return m_debug_register_state; }
|
||||
const DebugRegisterState& debug_register_state() const { return m_debug_register_state; }
|
||||
|
||||
TSS& tss() { return m_tss; }
|
||||
const TSS& tss() const { return m_tss; }
|
||||
State state() const { return m_state; }
|
||||
|
@ -1200,6 +1203,7 @@ private:
|
|||
NonnullRefPtr<Process> m_process;
|
||||
ThreadID m_tid { -1 };
|
||||
TSS m_tss {};
|
||||
DebugRegisterState m_debug_register_state {};
|
||||
TrapFrame* m_current_trap { nullptr };
|
||||
u32 m_saved_critical { 1 };
|
||||
IntrusiveListNode<Thread> m_ready_queue_node;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue