Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Store ACPI RSDP addr
  • Loading branch information
djphoenix committed May 26, 2019
1 parent 2c0f2f4 commit 9400184
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/platform/acpi.cpp
Expand Up @@ -158,6 +158,8 @@ bool ACPI::ParseRsdp(const void *ptr) {
if (sum)
return false;

rsdpAddr = ptr;

char oem[7];
Memory::copy(oem, p + 9, 6);
oem[6] = 0;
Expand Down Expand Up @@ -240,6 +242,9 @@ ACPI::IOApicRedir ACPI::IOapicReadMap(uint32_t idx) {
a.raw[1] = IOapicIn(IOAPIC_REDTBL + idx * 2 + 1);
return a;
}
const void* ACPI::getRSDPAddr() {
return rsdpAddr;
}
void* ACPI::getLapicAddr() {
return localApicAddr;
}
Expand Down
2 changes: 2 additions & 0 deletions src/platform/include/acpi.hpp
Expand Up @@ -108,6 +108,7 @@ class ACPI {
static volatile ACPI *controller;

char *localApicAddr, *ioApicAddr;
const void *rsdpAddr;
uint8_t ioApicMaxCount;
uint32_t acpiCpuIds[256];
uint8_t acpiCpuCount;
Expand All @@ -126,6 +127,7 @@ class ACPI {
static ACPI* getController();
uint32_t getLapicID();
uint32_t getCPUID();
const void* getRSDPAddr() PURE;
void* getLapicAddr() PURE;
uint32_t getCPUCount() PURE;
uint32_t getActiveCPUCount() PURE;
Expand Down

0 comments on commit 9400184

Please sign in to comment.