add KePanic instead of splattering _disable __halt everywhere, implement a DMA + interrupts path to the IDE driver, move the dynamic arrays from kmain.c to ke_utils.h, remove weird unicode chars
This commit is contained in:
1 parent
83d48e09bb
commit
4b57738fe3
15 files changed
+673
-219
No files matched your search
+6
-6
@@ -7,7 +7,7 @@
|
||||
//
|
||||
// HalDiskDispatch is the one bridge: it calls the driver's SubmitIrp (async)
|
||||
// or runs the sync callbacks inline and writes irp->Status. It does not
|
||||
// touch irp->CompletionEvent — that is ke_irp.c's responsibility.
|
||||
// touch irp->CompletionEvent - that is ke_irp.c's responsibility.
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@@ -29,18 +29,18 @@ __declspec(dllexport) KSTATUS IoRegisterDisk(uint8_t index, const DISK_DRIVER *d
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// HalDiskDispatch — called exclusively by ke_irp.c::IoSubmitIrp()
|
||||
// HalDiskDispatch - called exclusively by ke_irp.c::IoSubmitIrp()
|
||||
// -------------------------------------------------------------------------
|
||||
// Separating dispatch here keeps hal_disk.c free of event primitives while
|
||||
// still allowing ke_irp.c (kernel layer) to fire completion hooks after we
|
||||
// return.
|
||||
//
|
||||
// Returns STATUS_PENDING — driver accepted the IRP asynchronously.
|
||||
// Returns STATUS_PENDING - driver accepted the IRP asynchronously.
|
||||
// ke_irp.c must NOT touch irp->CompletionEvent
|
||||
// yet; the driver will fire it.
|
||||
// Returns STATUS_SUCCESS — sync fallback ran; irp->Status is already
|
||||
// Returns STATUS_SUCCESS - sync fallback ran; irp->Status is already
|
||||
// written. ke_irp.c should fire completion hooks.
|
||||
// Returns STATUS_NOT_FOUND — drive not registered.
|
||||
// Returns STATUS_NOT_FOUND - drive not registered.
|
||||
|
||||
__declspec(dllexport) KSTATUS HalDiskDispatch(uint8_t drive, IRP *irp) {
|
||||
if (drive >= MAX_DRIVES || !gPresent[drive]) return STATUS_NOT_FOUND;
|
||||
@@ -60,7 +60,7 @@ __declspec(dllexport) KSTATUS HalDiskDispatch(uint8_t drive, IRP *irp) {
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Legacy HAL_DISK vtable — direct sync calls, no IRP involvement.
|
||||
// Legacy HAL_DISK vtable - direct sync calls, no IRP involvement.
|
||||
// Existing callers (FAT32, shell) use this path unchanged.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
typedef KSTATUS (*DRIVER_ENTRY_FN)(const HAL_API* hal);
|
||||
typedef void (*DRIVER_UNLOAD_FN)(void);
|
||||
|
||||
// Forward declaration only — avoids dragging ke_event.h into the HAL layer.
|
||||
// Forward declaration only - avoids dragging ke_event.h into the HAL layer.
|
||||
struct IRP;
|
||||
|
||||
typedef struct DISK_DRIVER {
|
||||
|
||||
Reference in new issue
Block a user