feat: add experimental game engine & demo game, fix ACPI events
This commit is contained in:
@@ -79,8 +79,7 @@ namespace Hal {
|
||||
KernelLogStream(INFO, "ACPI") << "Sleep button pressed";
|
||||
}
|
||||
|
||||
// Send EOI
|
||||
LocalApic::SendEOI();
|
||||
// Note: EOI is sent by HalIrqDispatch after this handler returns.
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -88,7 +87,13 @@ namespace Hal {
|
||||
// Initialize
|
||||
|
||||
// ============================================================================
|
||||
void Initialize(const FADT::ParsedFADT& fadt) {
|
||||
void Initialize(ACPI::CommonSDTHeader* xsdt) {
|
||||
FADT::ParsedFADT fadt{};
|
||||
if (!FADT::Parse(xsdt, fadt) || !fadt.Valid) {
|
||||
KernelLogStream(ERROR, "ACPI") << "Failed to parse FADT - ACPI events unavailable";
|
||||
return;
|
||||
}
|
||||
|
||||
g_pm1aEventBlock = fadt.PM1aEventBlock;
|
||||
g_pm1bEventBlock = fadt.PM1bEventBlock;
|
||||
g_pm1EventLength = fadt.PM1EventLength;
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Hal {
|
||||
|
||||
// Initialize ACPI event handling: route the SCI interrupt,
|
||||
// register the handler, and enable fixed events (power button).
|
||||
// Must be called after APIC and FADT initialization.
|
||||
void Initialize(const FADT::ParsedFADT& fadt);
|
||||
// Must be called after APIC initialization.
|
||||
void Initialize(ACPI::CommonSDTHeader* xsdt);
|
||||
|
||||
// Re-enable ACPI events after S3 resume.
|
||||
void Reinitialize();
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace Hal {
|
||||
// Initialize S3 suspend support (reads FACS and \_S3_ from namespace)
|
||||
AcpiSleep::Initialize(xsdt);
|
||||
|
||||
// Initialize ACPI event handling (SCI interrupt, power button)
|
||||
AcpiEvents::Initialize(fadt);
|
||||
// Note: ACPI event handling (SCI, power button) is initialized
|
||||
// from Main.cpp after the APIC subsystem is ready.
|
||||
}
|
||||
|
||||
bool IsAvailable() {
|
||||
|
||||
Reference in New Issue
Block a user