add CatchAllDebugBucket as a syscall for debugging, add a basic network card plus ethernet driver (wip)
This commit is contained in:
1 parent
bf34d63ea3
commit
0d7f71b693
22 files changed
+2248
-25
No files matched your search
@@ -53,6 +53,7 @@
|
||||
// HAL pointer - set once at boot by KeSyscallSetHal()
|
||||
// ---------------------------------------------------------------------------
|
||||
static const HAL_API* gHal;
|
||||
static uint64_t (*gCatchAllDebugBucket)(uint64_t a0, uint64_t a1, uint64_t a2, uint64_t a3, uint64_t a4, uint64_t a5);
|
||||
|
||||
typedef struct SYS_IO_STATUS_BLOCK_K {
|
||||
volatile uint32_t Status;
|
||||
@@ -84,7 +85,10 @@ typedef struct SYS_USER_ASYNC_APC_CONTEXT {
|
||||
void* UserContext;
|
||||
} SYS_USER_ASYNC_APC_CONTEXT;
|
||||
|
||||
void KeSyscallSetHal(const HAL_API* hal) { gHal = hal; }
|
||||
void KeSyscallInit(const HAL_API* hal, uint64_t (*CatchAllDebugBucket)(uint64_t a0, uint64_t a1, uint64_t a2, uint64_t a3, uint64_t a4, uint64_t a5)) {
|
||||
gHal = hal;
|
||||
gCatchAllDebugBucket = CatchAllDebugBucket;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Helper: look up a handle and type-check it in one call.
|
||||
@@ -1494,6 +1498,11 @@ static uint64_t SyscallRemoveDir(uint64_t a0, uint64_t a1, uint64_t a2,
|
||||
return IoRemoveDir(path);
|
||||
}
|
||||
|
||||
static uint64_t SyscallCatchAllDebugBucket(uint64_t a0, uint64_t a1, uint64_t a2,
|
||||
uint64_t a3, uint64_t a4, uint64_t a5) {
|
||||
return gCatchAllDebugBucket(a0, a1, a2, a3, a4, a5);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// Dispatch table - index must match SYS_* in syscall_nr.h exactly.
|
||||
// ===========================================================================
|
||||
@@ -1576,6 +1585,7 @@ static const SYSCALL_HANDLER gSyscallTable[SYS_MAX] = {
|
||||
/* 73 SYS_GET_TICK */ SyscallGetTick,
|
||||
/* 74 SYS_DEBUG_PRINT */ SyscallDebugPrint,
|
||||
/* 75 SYS_QUERY_TRAP_FRAME */ SyscallQueryTrapFrame,
|
||||
/* 76 SYS_CATCHALLDEBUGBUCKET */ SyscallCatchAllDebugBucket
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user