mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
Kernel/riscv64: Add register state related headers
This commit is contained in:
parent
978cc1c197
commit
24e64cac7e
10 changed files with 260 additions and 0 deletions
32
Kernel/Arch/riscv64/TrapFrame.h
Normal file
32
Kernel/Arch/riscv64/TrapFrame.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Sönke Holz <sholz8530@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/Arch/RegisterState.h>
|
||||
|
||||
#include <AK/Platform.h>
|
||||
VALIDATE_IS_RISCV64()
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
struct TrapFrame {
|
||||
TrapFrame* next_trap;
|
||||
RegisterState* regs;
|
||||
|
||||
TrapFrame() = delete;
|
||||
TrapFrame(TrapFrame const&) = delete;
|
||||
TrapFrame(TrapFrame&&) = delete;
|
||||
TrapFrame& operator=(TrapFrame const&) = delete;
|
||||
TrapFrame& operator=(TrapFrame&&) = delete;
|
||||
};
|
||||
|
||||
#define TRAP_FRAME_SIZE (2 * 8)
|
||||
static_assert(AssertSize<TrapFrame, TRAP_FRAME_SIZE>());
|
||||
|
||||
extern "C" void exit_trap(TrapFrame*) __attribute__((used));
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue