acpi: Fix length of RSDP calculation
This commit is contained in:
parent
0ab68fa83e
commit
ab441fecda
|
@ -78,7 +78,10 @@ void *acpi_get_table(const char *signature, int index) {
|
|||
else
|
||||
rsdt = (struct rsdt *)(uintptr_t)rsdp->rsdt_addr;
|
||||
|
||||
for (size_t i = 0; i < rsdt->length - sizeof(struct sdt); i++) {
|
||||
size_t entry_count =
|
||||
(rsdt->length - sizeof(struct sdt)) / (use_xsdt ? 8 : 4);
|
||||
|
||||
for (size_t i = 0; i < entry_count; i++) {
|
||||
struct sdt *ptr;
|
||||
if (use_xsdt)
|
||||
ptr = (struct sdt *)(uintptr_t)((uint64_t *)rsdt->ptrs_start)[i];
|
||||
|
|
Loading…
Reference in New Issue