mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2024-11-23 08:26:23 -06:00
Various minor cosmetic changes on acpi.c/h (mainly comments and code format)
This commit is contained in:
parent
a5576974cf
commit
231b389b3c
@ -37,7 +37,7 @@
|
||||
#define CPEPSignature ('C' | ('P' << 8) | ('E' << 16) | ('P' << 24)) // Corrected Platform Error Polling Table
|
||||
#define HESTSignature ('H' | ('E' << 8) | ('S' << 16) | ('T' << 24)) // Hardware Error Source Table
|
||||
|
||||
#define SLITSignature ('S' | ('L' << 8) | ('I' << 16) | ('T' << 24)) // System Locality System Information Table (NUMA)
|
||||
#define SLITSignature ('S' | ('L' << 8) | ('I' << 16) | ('T' << 24)) // System Locality Information Table (NUMA)
|
||||
#define SRATSignature ('S' | ('R' << 8) | ('A' << 16) | ('T' << 24)) // System Resource Affinity Table (NUMA)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -326,20 +326,19 @@ int acpi_checksum(const void *data, int length)
|
||||
|
||||
void acpi_init(void)
|
||||
{
|
||||
// Find ACPI RDST Table Address
|
||||
acpi_config.rsdp_addr = find_rsdp();
|
||||
|
||||
// Find ACPI MADT Table Address
|
||||
if (acpi_config.rsdp_addr == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
acpi_config.madt_addr = find_acpi_table(MADTSignature);
|
||||
|
||||
// Find ACPI FADT Table Address
|
||||
acpi_config.fadt_addr = find_acpi_table(FADTSignature);
|
||||
|
||||
// Parse FADT
|
||||
if (acpi_config.fadt_addr) {
|
||||
parse_fadt(acpi_config.fadt_addr);
|
||||
}
|
||||
|
||||
// Find ACPI HPET Table Address
|
||||
acpi_config.hpet_addr = find_acpi_table(HPETSignature);
|
||||
}
|
||||
|
@ -4,11 +4,11 @@
|
||||
/**
|
||||
* \file
|
||||
*
|
||||
* Provides support for multi-threaded operation.
|
||||
* Provides support for ACPI (Find & parse tables)
|
||||
*
|
||||
*//*
|
||||
* Copyright (C) 2020-2022 Martin Whitaker.
|
||||
* Copyright (C) 2020-2022 Sam Whitaker.
|
||||
* Copyright (C) 2004-2022 Sam Demeulemeester.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
@ -49,7 +49,8 @@ extern acpi_t acpi_config;
|
||||
int acpi_checksum(const void *data, int length);
|
||||
|
||||
/**
|
||||
* Initialises the SMP state and detects the number of available CPU cores.
|
||||
* Look for specific ACPI Tables Addresses (RSDP, MADT, ...)
|
||||
* and parse some of the tables
|
||||
*/
|
||||
void acpi_init(void);
|
||||
|
||||
|
@ -376,7 +376,9 @@ static bool find_cpus_in_floating_mp_struct(void)
|
||||
|
||||
static bool find_cpus_in_madt(void)
|
||||
{
|
||||
if(acpi_config.madt_addr == 0) return false;
|
||||
if (acpi_config.madt_addr == 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
madt_table_header_t *mpc = (madt_table_header_t *)map_region(acpi_config.madt_addr, sizeof(madt_table_header_t), true);
|
||||
if (mpc == NULL) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user