Replace trap dispatch wrappers with direct symbol mapping
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user