Replace trap dispatch wrappers with direct symbol mapping
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 30s
Builds / ExectOS (i686, debug) (push) Successful in 30s
Builds / ExectOS (i686, release) (push) Successful in 49s
Builds / ExectOS (amd64, release) (push) Successful in 51s

This commit is contained in:
2026-04-07 12:56:33 +02:00
parent 9935d2d26b
commit a0d5ee17c2
5 changed files with 5 additions and 40 deletions

View File

@@ -18,6 +18,7 @@
#define NULLPTR nullptr #define NULLPTR nullptr
#define VIRTUAL virtual #define VIRTUAL virtual
#define XTCLINK extern "C" #define XTCLINK extern "C"
#define XTSYMBOL(Name) __asm__(Name)
/* C++ boolean type */ /* C++ boolean type */
typedef bool BOOLEAN, *PBOOLEAN; typedef bool BOOLEAN, *PBOOLEAN;
@@ -31,6 +32,7 @@
#define NULLPTR ((void *)0) #define NULLPTR ((void *)0)
#define VIRTUAL #define VIRTUAL
#define XTCLINK #define XTCLINK
#define XTSYMBOL(Name)
/* C boolean type */ /* C boolean type */
typedef enum _BOOLEAN typedef enum _BOOLEAN

View File

@@ -227,7 +227,6 @@ VOID
AR::Traps::HandleTrap02(IN PKTRAP_FRAME TrapFrame) AR::Traps::HandleTrap02(IN PKTRAP_FRAME TrapFrame)
{ {
DebugPrint(L"Handled Non-Maskable-Interrupt (0x02)!\n"); DebugPrint(L"Handled Non-Maskable-Interrupt (0x02)!\n");
KE::Crash::Panic(0x02);
} }
/** /**
@@ -643,21 +642,3 @@ AR::Traps::InitializeSystemCallMsrs(VOID)
/* Enable system call extensions (SCE) in EFER MSR */ /* Enable system call extensions (SCE) in EFER MSR */
CpuFunc::WriteModelSpecificRegister(X86_MSR_EFER, CpuFunc::ReadModelSpecificRegister(X86_MSR_EFER) | X86_MSR_EFER_SCE); CpuFunc::WriteModelSpecificRegister(X86_MSR_EFER, CpuFunc::ReadModelSpecificRegister(X86_MSR_EFER) | X86_MSR_EFER_SCE);
} }
/**
* C-linkage wrapper for dispatching the trap provided by common trap handler.
*
* @param TrapFrame
* Supplies a kernel trap frame pushed by common trap handler on the stack.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCLINK
XTCDECL
VOID
ArDispatchTrap(IN PKTRAP_FRAME TrapFrame)
{
AR::Traps::DispatchTrap(TrapFrame);
}

View File

@@ -589,21 +589,3 @@ AR::Traps::HandleTrapFF(IN PKTRAP_FRAME TrapFrame)
DebugPrint(L"Handled Unexpected-Interrupt (0xFF)!\n"); DebugPrint(L"Handled Unexpected-Interrupt (0xFF)!\n");
KE::Crash::Panic(0xFF); KE::Crash::Panic(0xFF);
} }
/**
* C-linkage wrapper for dispatching the trap provided by common trap handler.
*
* @param TrapFrame
* Supplies a kernel trap frame pushed by common trap handler on the stack.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCLINK
XTCDECL
VOID
ArDispatchTrap(IN PKTRAP_FRAME TrapFrame)
{
AR::Traps::DispatchTrap(TrapFrame);
}

View File

@@ -18,7 +18,7 @@ namespace AR
class Traps class Traps
{ {
public: public:
STATIC XTCDECL VOID DispatchTrap(IN PKTRAP_FRAME TrapFrame); STATIC XTCDECL VOID DispatchTrap(IN PKTRAP_FRAME TrapFrame) XTSYMBOL("ArDispatchTrap");
STATIC XTCDECL VOID InitializeSystemCallMsrs(VOID); STATIC XTCDECL VOID InitializeSystemCallMsrs(VOID);
private: private:

View File

@@ -1,4 +1,4 @@
/**@s /**
* PROJECT: ExectOS * PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory * COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/includes/ar/i686/traps.hh * FILE: xtoskrnl/includes/ar/i686/traps.hh
@@ -18,7 +18,7 @@ namespace AR
class Traps class Traps
{ {
public: public:
STATIC XTCDECL VOID DispatchTrap(IN PKTRAP_FRAME TrapFrame); STATIC XTCDECL VOID DispatchTrap(IN PKTRAP_FRAME TrapFrame) XTSYMBOL("_ArDispatchTrap");
private: private:
STATIC XTCDECL VOID HandleTrap00(IN PKTRAP_FRAME TrapFrame); STATIC XTCDECL VOID HandleTrap00(IN PKTRAP_FRAME TrapFrame);