-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arch: Move Context struct into its own header
- Loading branch information
Showing
5 changed files
with
74 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#include <menix/common.h> | ||
|
||
struct Context | ||
{ | ||
u64 x31; | ||
u64 x30; | ||
u64 x29; | ||
u64 x28; | ||
u64 x27; | ||
u64 x26; | ||
u64 x25; | ||
u64 x24; | ||
u64 x23; | ||
u64 x22; | ||
u64 x21; | ||
u64 x20; | ||
u64 x19; | ||
u64 x18; | ||
u64 x17; | ||
u64 x16; | ||
u64 x15; | ||
u64 x14; | ||
u64 x13; | ||
u64 x12; | ||
u64 x11; | ||
u64 x10; | ||
u64 x9; | ||
u64 x8; | ||
u64 x7; | ||
u64 x6; | ||
u64 x5; | ||
u64 x4; | ||
u64 x3; | ||
u64 x2; | ||
u64 x1; | ||
|
||
u64 pc; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
#include <menix/common.h> | ||
|
||
struct Context | ||
{ | ||
u64 r15; | ||
u64 r14; | ||
u64 r13; | ||
u64 r12; | ||
u64 r11; | ||
u64 r10; | ||
u64 r9; | ||
u64 r8; | ||
u64 rsi; | ||
u64 rdi; | ||
u64 rbp; | ||
u64 rdx; | ||
u64 rcx; | ||
u64 rbx; | ||
u64 rax; | ||
|
||
// Pushed onto the stack by the interrupt handler stub. | ||
u64 core; | ||
u64 isr; | ||
// Pushed onto the stack by the CPU if exception has an error code. | ||
u64 error; | ||
// Pushed onto the stack by the CPU during an interrupt. | ||
u64 rip; | ||
u64 cs; | ||
u64 rflags; | ||
u64 rsp; | ||
u64 ss; | ||
}; |