mirror of
https://github.com/reactos/reactos.git
synced 2024-06-24 06:51:47 +00:00
[ACPICA] Update to version 20221020. CORE-17905
This commit is contained in:
parent
03b24380a7
commit
f0dd1e7b57
|
@ -137,6 +137,7 @@ list(APPEND ACPICA_SOURCE
|
|||
acpica/utilities/utascii.c
|
||||
acpica/utilities/utbuffer.c
|
||||
acpica/utilities/utcache.c
|
||||
acpica/utilities/utcksum.c
|
||||
# acpica/utilities/utclib.c
|
||||
acpica/utilities/utcopy.c
|
||||
# acpica/utilities/utdebug.c
|
||||
|
|
|
@ -204,7 +204,8 @@ AcpiEvFixedEventInitialize (
|
|||
{
|
||||
Status = AcpiWriteBitRegister (
|
||||
AcpiGbl_FixedEventInfo[i].EnableRegisterId,
|
||||
ACPI_DISABLE_EVENT);
|
||||
(i == ACPI_EVENT_PCIE_WAKE) ?
|
||||
ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
|
@ -253,6 +254,11 @@ AcpiEvFixedEventDetect (
|
|||
return (IntStatus);
|
||||
}
|
||||
|
||||
if (FixedEnable & ACPI_BITMASK_PCIEXP_WAKE_DISABLE)
|
||||
FixedEnable &= ~ACPI_BITMASK_PCIEXP_WAKE_DISABLE;
|
||||
else
|
||||
FixedEnable |= ACPI_BITMASK_PCIEXP_WAKE_DISABLE;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
|
||||
"Fixed Event Block: Enable %08X Status %08X\n",
|
||||
FixedEnable, FixedStatus));
|
||||
|
@ -323,7 +329,8 @@ AcpiEvFixedEventDispatch (
|
|||
{
|
||||
(void) AcpiWriteBitRegister (
|
||||
AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
|
||||
ACPI_DISABLE_EVENT);
|
||||
(Event == ACPI_EVENT_PCIE_WAKE) ?
|
||||
ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT);
|
||||
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"No installed handler for fixed event - %s (%u), disabling",
|
||||
|
|
|
@ -221,6 +221,14 @@ AcpiEvAddressSpaceDispatch (
|
|||
Ctx->SubspaceId = (UINT8) RegionObj->Region.Address;
|
||||
}
|
||||
|
||||
if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)
|
||||
{
|
||||
ACPI_FFH_INFO *Ctx = HandlerDesc->AddressSpace.Context;
|
||||
|
||||
Ctx->Length = RegionObj->Region.Length;
|
||||
Ctx->Offset = RegionObj->Region.Address;
|
||||
}
|
||||
|
||||
/*
|
||||
* We must exit the interpreter because the region setup will
|
||||
* potentially execute control methods (for example, the _REG method
|
||||
|
|
|
@ -362,7 +362,7 @@ AcpiExLoadOp (
|
|||
}
|
||||
if (Target->Common.Type != ACPI_TYPE_INTEGER)
|
||||
{
|
||||
fprintf (stderr, "Type not integer: %X\n", Target->Common.Type);
|
||||
ACPI_ERROR ((AE_INFO, "Type not integer: %X", Target->Common.Type));
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||
}
|
||||
|
||||
|
|
|
@ -188,7 +188,8 @@ AcpiExReadDataFromField (
|
|||
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT))
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
|
||||
{
|
||||
/* SMBus, GSBus, IPMI serial */
|
||||
|
||||
|
@ -361,7 +362,8 @@ AcpiExWriteDataToField (
|
|||
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT))
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
|
||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
|
||||
{
|
||||
/* SMBus, GSBus, IPMI serial */
|
||||
|
||||
|
|
|
@ -376,6 +376,12 @@ AcpiExWriteSerialBus (
|
|||
Function = ACPI_WRITE;
|
||||
break;
|
||||
|
||||
case ACPI_ADR_SPACE_FIXED_HARDWARE:
|
||||
|
||||
BufferLength = ACPI_FFH_INPUT_BUFFER_SIZE;
|
||||
Function = ACPI_WRITE;
|
||||
break;
|
||||
|
||||
default:
|
||||
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
|
||||
}
|
||||
|
|
|
@ -230,18 +230,6 @@ AcpiExSystemDoSleep (
|
|||
|
||||
AcpiExExitInterpreter ();
|
||||
|
||||
/*
|
||||
* Warn users about excessive sleep times, so ASL code can be improved to
|
||||
* use polling or similar techniques.
|
||||
*/
|
||||
if (HowLongMs > 10)
|
||||
{
|
||||
ACPI_WARNING ((AE_INFO,
|
||||
"Firmware issue: Excessive sleep time (0x%8.8X%8.8X ms > 10 ms)"
|
||||
" in ACPI Control Method",
|
||||
ACPI_FORMAT_UINT64 (HowLongMs)));
|
||||
}
|
||||
|
||||
/*
|
||||
* For compatibility with other ACPI implementations and to prevent
|
||||
* accidental deep sleeps, limit the sleep time to something reasonable.
|
||||
|
|
|
@ -367,6 +367,16 @@ AcpiHwLegacyWake (
|
|||
AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].StatusRegisterId,
|
||||
ACPI_CLEAR_STATUS);
|
||||
|
||||
/* Enable pcie wake event if support */
|
||||
if ((AcpiGbl_FADT.Flags & ACPI_FADT_PCI_EXPRESS_WAKE)) {
|
||||
(void) AcpiWriteBitRegister (
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].EnableRegisterId,
|
||||
ACPI_DISABLE_EVENT);
|
||||
(void) AcpiWriteBitRegister (
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_PCIE_WAKE].StatusRegisterId,
|
||||
ACPI_CLEAR_STATUS);
|
||||
}
|
||||
|
||||
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
|
|
@ -227,6 +227,8 @@
|
|||
|
||||
#define ACPI_PRM_INPUT_BUFFER_SIZE 26
|
||||
|
||||
#define ACPI_FFH_INPUT_BUFFER_SIZE 256
|
||||
|
||||
/* _SxD and _SxW control methods */
|
||||
|
||||
#define ACPI_NUM_SxD_METHODS 4
|
||||
|
|
|
@ -152,6 +152,7 @@ typedef enum
|
|||
ACPI_DMT_AEST_XRUPT,
|
||||
ACPI_DMT_AGDI,
|
||||
ACPI_DMT_ASF,
|
||||
ACPI_DMT_CDAT,
|
||||
ACPI_DMT_CEDT,
|
||||
ACPI_DMT_DMAR,
|
||||
ACPI_DMT_DMAR_SCOPE,
|
||||
|
@ -294,6 +295,16 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoBdat[];
|
|||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCcel[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatTableHdr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatHeader[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat3[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat4[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdat5[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCdatEntries[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedtHdr[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCedt1[];
|
||||
|
@ -639,6 +650,14 @@ void
|
|||
AcpiDmDumpAsf (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpCcel (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpCdat (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
||||
void
|
||||
AcpiDmDumpCedt (
|
||||
ACPI_TABLE_HEADER *Table);
|
||||
|
|
|
@ -59,6 +59,7 @@ ACPI_GLOBAL (ACPI_TABLE_LIST, AcpiGbl_RootTableList);
|
|||
|
||||
ACPI_GLOBAL (ACPI_TABLE_HEADER *, AcpiGbl_DSDT);
|
||||
ACPI_GLOBAL (ACPI_TABLE_HEADER, AcpiGbl_OriginalDsdtHeader);
|
||||
ACPI_INIT_GLOBAL (char *, AcpiGbl_CDAT, NULL);
|
||||
ACPI_INIT_GLOBAL (UINT32, AcpiGbl_DsdtIndex, ACPI_INVALID_TABLE_INDEX);
|
||||
ACPI_INIT_GLOBAL (UINT32, AcpiGbl_FacsIndex, ACPI_INVALID_TABLE_INDEX);
|
||||
ACPI_INIT_GLOBAL (UINT32, AcpiGbl_XFacsIndex, ACPI_INVALID_TABLE_INDEX);
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20220331
|
||||
#define ACPI_CA_VERSION 0x20221020
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
|
|
|
@ -237,16 +237,6 @@ AcpiTbPrintTableHeader(
|
|||
ACPI_PHYSICAL_ADDRESS Address,
|
||||
ACPI_TABLE_HEADER *Header);
|
||||
|
||||
UINT8
|
||||
AcpiTbChecksum (
|
||||
UINT8 *Buffer,
|
||||
UINT32 Length);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbVerifyChecksum (
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 Length);
|
||||
|
||||
void
|
||||
AcpiTbCheckDsdtHeader (
|
||||
void);
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f)
|
||||
#define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f)
|
||||
#define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
|
||||
#define ACPI_CCEL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CCEL,f)
|
||||
#define ACPI_CPEP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
|
||||
#define ACPI_DBG2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBG2,f)
|
||||
#define ACPI_DBGP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
|
||||
|
@ -125,6 +126,15 @@
|
|||
#define ACPI_ASF2a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f)
|
||||
#define ACPI_ASF3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_RMCP,f)
|
||||
#define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
|
||||
#define ACPI_CDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CDAT,f)
|
||||
#define ACPI_CDATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_HEADER,f)
|
||||
#define ACPI_CDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSMAS,f)
|
||||
#define ACPI_CDAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSLBIS,f)
|
||||
#define ACPI_CDAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSMSCIS,f)
|
||||
#define ACPI_CDAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSIS,f)
|
||||
#define ACPI_CDAT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_DSEMTS,f)
|
||||
#define ACPI_CDAT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_SSLBIS,f)
|
||||
#define ACPI_CDATE_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CDAT_SSLBE,f)
|
||||
#define ACPI_CEDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_HEADER, f)
|
||||
#define ACPI_CEDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CHBS, f)
|
||||
#define ACPI_CEDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CEDT_CFMWS, f)
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
#define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */
|
||||
#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
|
||||
#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
|
||||
#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table*/
|
||||
|
||||
#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
|
||||
#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
|
||||
|
@ -386,12 +387,154 @@ typedef struct acpi_table_boot
|
|||
} ACPI_TABLE_BOOT;
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* CDAT - Coherent Device Attribute Table
|
||||
* Version 1
|
||||
*
|
||||
* Conforms to the "Coherent Device Attribute Table (CDAT) Specification
|
||||
" (Revision 1.01, October 2020.)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_cdat
|
||||
{
|
||||
UINT32 Length; /* Length of table in bytes, including this header */
|
||||
UINT8 Revision; /* ACPI Specification minor version number */
|
||||
UINT8 Checksum; /* To make sum of entire table == 0 */
|
||||
UINT8 Reserved[6];
|
||||
UINT32 Sequence; /* Used to detect runtime CDAT table changes */
|
||||
|
||||
} ACPI_TABLE_CDAT;
|
||||
|
||||
|
||||
/* CDAT common subtable header */
|
||||
|
||||
typedef struct acpi_cdat_header
|
||||
{
|
||||
UINT8 Type;
|
||||
UINT8 Reserved;
|
||||
UINT16 Length;
|
||||
|
||||
} ACPI_CDAT_HEADER;
|
||||
|
||||
/* Values for Type field above */
|
||||
|
||||
enum AcpiCdatType
|
||||
{
|
||||
ACPI_CDAT_TYPE_DSMAS = 0,
|
||||
ACPI_CDAT_TYPE_DSLBIS = 1,
|
||||
ACPI_CDAT_TYPE_DSMSCIS = 2,
|
||||
ACPI_CDAT_TYPE_DSIS = 3,
|
||||
ACPI_CDAT_TYPE_DSEMTS = 4,
|
||||
ACPI_CDAT_TYPE_SSLBIS = 5,
|
||||
ACPI_CDAT_TYPE_RESERVED = 6 /* 6 through 0xFF are reserved */
|
||||
};
|
||||
|
||||
|
||||
/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */
|
||||
|
||||
typedef struct acpi_cadt_dsmas
|
||||
{
|
||||
UINT8 DsmadHandle;
|
||||
UINT8 Flags;
|
||||
UINT16 Reserved;
|
||||
UINT64 DpaBaseAddress;
|
||||
UINT64 DpaLength;
|
||||
|
||||
} ACPI_CDAT_DSMAS;
|
||||
|
||||
/* Flags for subtable above */
|
||||
|
||||
#define ACPI_CEDT_DSMAS_NON_VOLATILE (1 << 2)
|
||||
|
||||
|
||||
/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */
|
||||
|
||||
typedef struct acpi_cdat_dslbis
|
||||
{
|
||||
UINT8 Handle;
|
||||
UINT8 Flags; /* If Handle matches a DSMAS handle, the definition of this field matches
|
||||
* Flags field in HMAT System Locality Latency */
|
||||
UINT8 DataType;
|
||||
UINT8 Reserved;
|
||||
UINT64 EntryBaseUnit;
|
||||
UINT16 Entry[3];
|
||||
UINT16 Reserved2;
|
||||
|
||||
} ACPI_CDAT_DSLBIS;
|
||||
|
||||
|
||||
/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */
|
||||
|
||||
typedef struct acpi_cdat_dsmscis
|
||||
{
|
||||
UINT8 DsmasHandle;
|
||||
UINT8 Reserved[3];
|
||||
UINT64 SideCacheSize;
|
||||
UINT32 CacheAttributes;
|
||||
|
||||
} ACPI_CDAT_DSMSCIS;
|
||||
|
||||
|
||||
/* Subtable 3: Device Scoped Initiator Structure (DSIS) */
|
||||
|
||||
typedef struct acpi_cdat_dsis
|
||||
{
|
||||
UINT8 Flags;
|
||||
UINT8 Handle;
|
||||
UINT16 Reserved;
|
||||
|
||||
} ACPI_CDAT_DSIS;
|
||||
|
||||
/* Flags for above subtable */
|
||||
|
||||
#define ACPI_CDAT_DSIS_MEM_ATTACHED (1 << 0)
|
||||
|
||||
|
||||
/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */
|
||||
|
||||
typedef struct acpi_cdat_dsemts
|
||||
{
|
||||
UINT8 DsmasHandle;
|
||||
UINT8 MemoryType;
|
||||
UINT16 Reserved;
|
||||
UINT64 DpaOffset;
|
||||
UINT64 RangeLength;
|
||||
|
||||
} ACPI_CDAT_DSEMTS;
|
||||
|
||||
|
||||
/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */
|
||||
|
||||
typedef struct acpi_cdat_sslbis
|
||||
{
|
||||
UINT8 DataType;
|
||||
UINT8 Reserved[3];
|
||||
UINT64 EntryBaseUnit;
|
||||
|
||||
} ACPI_CDAT_SSLBIS;
|
||||
|
||||
|
||||
/* Sub-subtable for above, SslbeEntries field */
|
||||
|
||||
typedef struct acpi_cdat_sslbe
|
||||
{
|
||||
UINT16 PortxId;
|
||||
UINT16 PortyId;
|
||||
UINT16 LatencyOrBandwidth;
|
||||
UINT16 Reserved;
|
||||
|
||||
} ACPI_CDAT_SSLBE;
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* CEDT - CXL Early Discovery Table
|
||||
* Version 1
|
||||
*
|
||||
* Conforms to the "CXL Early Discovery Table" (CXL 2.0)
|
||||
* Conforms to the "CXL Early Discovery Table" (CXL 2.0, October 2020)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -417,7 +560,9 @@ enum AcpiCedtType
|
|||
{
|
||||
ACPI_CEDT_TYPE_CHBS = 0,
|
||||
ACPI_CEDT_TYPE_CFMWS = 1,
|
||||
ACPI_CEDT_TYPE_RESERVED = 2,
|
||||
ACPI_CEDT_TYPE_CXIMS = 2,
|
||||
ACPI_CEDT_TYPE_RDPAS = 3,
|
||||
ACPI_CEDT_TYPE_RESERVED = 4,
|
||||
};
|
||||
|
||||
/* Values for version field above */
|
||||
|
@ -475,6 +620,7 @@ typedef struct acpi_cedt_cfmws_target_element
|
|||
/* Values for Interleave Arithmetic field above */
|
||||
|
||||
#define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0)
|
||||
#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1)
|
||||
|
||||
/* Values for Restrictions field above */
|
||||
|
||||
|
@ -484,6 +630,35 @@ typedef struct acpi_cedt_cfmws_target_element
|
|||
#define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3)
|
||||
#define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4)
|
||||
|
||||
/* 2: CXL XOR Interleave Math Structure */
|
||||
|
||||
struct acpi_cedt_cxims {
|
||||
ACPI_CEDT_HEADER Header;
|
||||
UINT16 Reserved1;
|
||||
UINT8 Hbig;
|
||||
UINT8 NrXormaps;
|
||||
UINT64 XormapList[];
|
||||
};
|
||||
|
||||
/* 3: CXL RCEC Downstream Port Association Structure */
|
||||
|
||||
struct acpi_cedt_rdpas {
|
||||
ACPI_CEDT_HEADER Header;
|
||||
UINT8 Reserved1;
|
||||
UINT16 Length;
|
||||
UINT16 Segment;
|
||||
UINT16 Bdf;
|
||||
UINT8 Protocol;
|
||||
UINT64 Address;
|
||||
};
|
||||
|
||||
/* Masks for bdf field above */
|
||||
#define ACPI_CEDT_RDPAS_BUS_MASK 0xff00
|
||||
#define ACPI_CEDT_RDPAS_DEVICE_MASK 0x00f8
|
||||
#define ACPI_CEDT_RDPAS_FUNCTION_MASK 0x0007
|
||||
|
||||
#define ACPI_CEDT_RDPAS_PROTOCOL_IO (0)
|
||||
#define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM (1)
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
|
|
|
@ -63,6 +63,8 @@
|
|||
#define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
|
||||
#define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */
|
||||
#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
|
||||
#define ACPI_SIG_CCEL "CCEL" /* CC Event Log Table */
|
||||
#define ACPI_SIG_CDAT "CDAT" /* Coherent Device Attribute Table */
|
||||
#define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
|
||||
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
|
||||
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
|
||||
|
@ -70,7 +72,6 @@
|
|||
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
||||
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
|
||||
#define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
|
||||
#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
|
||||
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
|
||||
#define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
|
||||
#define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */
|
||||
|
@ -413,13 +414,31 @@ typedef struct acpi_table_bdat
|
|||
|
||||
} ACPI_TABLE_BDAT;
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* CCEL - CC-Event Log
|
||||
* From: "Guest-Host-Communication Interface (GHCI) for Intel
|
||||
* Trust Domain Extensions (Intel TDX)". Feb 2022
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
typedef struct acpi_table_ccel
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT8 CCType;
|
||||
UINT8 CCSubType;
|
||||
UINT16 Reserved;
|
||||
UINT64 LogAreaMinimumLength;
|
||||
UINT64 LogAreaStartAddress;
|
||||
|
||||
} ACPI_TABLE_CCEL;
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* IORT - IO Remapping Table
|
||||
*
|
||||
* Conforms to "IO Remapping Table System Software on ARM Platforms",
|
||||
* Document number: ARM DEN 0049E.d, Feb 2022
|
||||
* Document number: ARM DEN 0049E.e, Sep 2022
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
@ -617,6 +636,7 @@ typedef struct acpi_iort_smmu_v3
|
|||
#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
|
||||
#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1)
|
||||
#define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
|
||||
#define ACPI_IORT_SMMU_V3_DEVICEID_VALID (1<<4)
|
||||
|
||||
typedef struct acpi_iort_pmcg
|
||||
{
|
||||
|
@ -999,7 +1019,14 @@ enum AcpiMadtType
|
|||
ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14,
|
||||
ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15,
|
||||
ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16,
|
||||
ACPI_MADT_TYPE_RESERVED = 17, /* 17 to 0x7F are reserved */
|
||||
ACPI_MADT_TYPE_CORE_PIC = 17,
|
||||
ACPI_MADT_TYPE_LIO_PIC = 18,
|
||||
ACPI_MADT_TYPE_HT_PIC = 19,
|
||||
ACPI_MADT_TYPE_EIO_PIC = 20,
|
||||
ACPI_MADT_TYPE_MSI_PIC = 21,
|
||||
ACPI_MADT_TYPE_BIO_PIC = 22,
|
||||
ACPI_MADT_TYPE_LPC_PIC = 23,
|
||||
ACPI_MADT_TYPE_RESERVED = 24, /* 24 to 0x7F are reserved */
|
||||
ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */
|
||||
};
|
||||
|
||||
|
@ -1283,7 +1310,135 @@ typedef struct acpi_madt_multiproc_wakeup_mailbox
|
|||
|
||||
#define ACPI_MP_WAKE_COMMAND_WAKEUP 1
|
||||
|
||||
/* 17: OEM data */
|
||||
/* 17: CPU Core Interrupt Controller (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_madt_core_pic {
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT8 Version;
|
||||
UINT32 ProcessorId;
|
||||
UINT32 CoreId;
|
||||
UINT32 Flags;
|
||||
} ACPI_MADT_CORE_PIC;
|
||||
|
||||
/* Values for Version field above */
|
||||
|
||||
enum AcpiMadtCorePicVersion {
|
||||
ACPI_MADT_CORE_PIC_VERSION_NONE = 0,
|
||||
ACPI_MADT_CORE_PIC_VERSION_V1 = 1,
|
||||
ACPI_MADT_CORE_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
/* 18: Legacy I/O Interrupt Controller (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_madt_lio_pic {
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT8 Version;
|
||||
UINT64 Address;
|
||||
UINT16 Size;
|
||||
UINT8 Cascade[2];
|
||||
UINT32 CascadeMap[2];
|
||||
} ACPI_MADT_LIO_PIC;
|
||||
|
||||
/* Values for Version field above */
|
||||
|
||||
enum AcpiMadtLioPicVersion {
|
||||
ACPI_MADT_LIO_PIC_VERSION_NONE = 0,
|
||||
ACPI_MADT_LIO_PIC_VERSION_V1 = 1,
|
||||
ACPI_MADT_LIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
/* 19: HT Interrupt Controller (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_madt_ht_pic {
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT8 Version;
|
||||
UINT64 Address;
|
||||
UINT16 Size;
|
||||
UINT8 Cascade[8];
|
||||
} ACPI_MADT_HT_PIC;
|
||||
|
||||
/* Values for Version field above */
|
||||
|
||||
enum AcpiMadtHtPicVersion {
|
||||
ACPI_MADT_HT_PIC_VERSION_NONE = 0,
|
||||
ACPI_MADT_HT_PIC_VERSION_V1 = 1,
|
||||
ACPI_MADT_HT_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
/* 20: Extend I/O Interrupt Controller (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_madt_eio_pic {
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT8 Version;
|
||||
UINT8 Cascade;
|
||||
UINT8 Node;
|
||||
UINT64 NodeMap;
|
||||
} ACPI_MADT_EIO_PIC;
|
||||
|
||||
/* Values for Version field above */
|
||||
|
||||
enum AcpiMadtEioPicVersion {
|
||||
ACPI_MADT_EIO_PIC_VERSION_NONE = 0,
|
||||
ACPI_MADT_EIO_PIC_VERSION_V1 = 1,
|
||||
ACPI_MADT_EIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
/* 21: MSI Interrupt Controller (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_madt_msi_pic {
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT8 Version;
|
||||
UINT64 MsgAddress;
|
||||
UINT32 Start;
|
||||
UINT32 Count;
|
||||
} ACPI_MADT_MSI_PIC;
|
||||
|
||||
/* Values for Version field above */
|
||||
|
||||
enum AcpiMadtMsiPicVersion {
|
||||
ACPI_MADT_MSI_PIC_VERSION_NONE = 0,
|
||||
ACPI_MADT_MSI_PIC_VERSION_V1 = 1,
|
||||
ACPI_MADT_MSI_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
/* 22: Bridge I/O Interrupt Controller (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_madt_bio_pic {
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT8 Version;
|
||||
UINT64 Address;
|
||||
UINT16 Size;
|
||||
UINT16 Id;
|
||||
UINT16 GsiBase;
|
||||
} ACPI_MADT_BIO_PIC;
|
||||
|
||||
/* Values for Version field above */
|
||||
|
||||
enum AcpiMadtBioPicVersion {
|
||||
ACPI_MADT_BIO_PIC_VERSION_NONE = 0,
|
||||
ACPI_MADT_BIO_PIC_VERSION_V1 = 1,
|
||||
ACPI_MADT_BIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
/* 23: LPC Interrupt Controller (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_madt_lpc_pic {
|
||||
ACPI_SUBTABLE_HEADER Header;
|
||||
UINT8 Version;
|
||||
UINT64 Address;
|
||||
UINT16 Size;
|
||||
UINT8 Cascade;
|
||||
} ACPI_MADT_LPC_PIC;
|
||||
|
||||
/* Values for Version field above */
|
||||
|
||||
enum AcpiMadtLpcPicVersion {
|
||||
ACPI_MADT_LPC_PIC_VERSION_NONE = 0,
|
||||
ACPI_MADT_LPC_PIC_VERSION_V1 = 1,
|
||||
ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */
|
||||
};
|
||||
|
||||
/* 80: OEM data */
|
||||
|
||||
typedef struct acpi_madt_oem_data
|
||||
{
|
||||
|
|
|
@ -765,7 +765,8 @@ typedef UINT32 ACPI_EVENT_TYPE;
|
|||
#define ACPI_EVENT_POWER_BUTTON 2
|
||||
#define ACPI_EVENT_SLEEP_BUTTON 3
|
||||
#define ACPI_EVENT_RTC 4
|
||||
#define ACPI_EVENT_MAX 4
|
||||
#define ACPI_EVENT_PCIE_WAKE 5
|
||||
#define ACPI_EVENT_MAX 5
|
||||
#define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1
|
||||
|
||||
/*
|
||||
|
@ -1227,6 +1228,12 @@ typedef struct acpi_pcc_info {
|
|||
UINT8 *InternalBuffer;
|
||||
} ACPI_PCC_INFO;
|
||||
|
||||
/* Special Context data for FFH Opregion (ACPI 6.5) */
|
||||
|
||||
typedef struct acpi_ffh_info {
|
||||
UINT64 Offset;
|
||||
UINT64 Length;
|
||||
} ACPI_FFH_INFO;
|
||||
|
||||
typedef
|
||||
ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) (
|
||||
|
|
|
@ -209,6 +209,31 @@ AcpiUtCheckAndRepairAscii (
|
|||
UINT32 Count);
|
||||
|
||||
|
||||
/*
|
||||
* utcksum - Checksum utilities
|
||||
*/
|
||||
UINT8
|
||||
AcpiUtGenerateChecksum (
|
||||
void *Table,
|
||||
UINT32 Length,
|
||||
UINT8 OriginalChecksum);
|
||||
|
||||
UINT8
|
||||
AcpiUtChecksum (
|
||||
UINT8 *Buffer,
|
||||
UINT32 Length);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtVerifyCdatChecksum (
|
||||
ACPI_TABLE_CDAT *CdatTable,
|
||||
UINT32 Length);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtVerifyChecksum (
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 Length);
|
||||
|
||||
|
||||
/*
|
||||
* utnonansi - Non-ANSI C library functions
|
||||
*/
|
||||
|
|
|
@ -103,5 +103,6 @@
|
|||
#define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b"
|
||||
#define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd"
|
||||
#define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a"
|
||||
|
||||
#define UUID_1ST_FUNCTION_ID "893f00a6-660c-494e-bcfd-3043f4fb67c0"
|
||||
#define UUID_2ND_FUNCTION_ID "107ededd-d381-4fd7-8da9-08e9a6c79644"
|
||||
#endif /* __ACUUID_H__ */
|
||||
|
|
|
@ -58,6 +58,9 @@
|
|||
|
||||
#define ACPI_UINTPTR_T uintptr_t
|
||||
|
||||
#define ACPI_TO_INTEGER(p) ((uintptr_t)(p))
|
||||
#define ACPI_OFFSET(d, f) __offsetof(d, f)
|
||||
|
||||
#define ACPI_USE_DO_WHILE_0
|
||||
#define ACPI_USE_LOCAL_CACHE
|
||||
#define ACPI_USE_NATIVE_DIVIDE
|
||||
|
@ -103,6 +106,7 @@
|
|||
|
||||
#if __STDC_HOSTED__
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (pthread))
|
||||
|
|
|
@ -616,7 +616,7 @@ AcpiTbVerifyTempTable (
|
|||
{
|
||||
/* Verify the checksum */
|
||||
|
||||
Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
|
||||
Status = AcpiUtVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
|
||||
|
|
|
@ -364,7 +364,7 @@ AcpiTbParseFadt (
|
|||
* Validate the FADT checksum before we copy the table. Ignore
|
||||
* checksum error as we want to try to get the DSDT and FACS.
|
||||
*/
|
||||
(void) AcpiTbVerifyChecksum (Table, Length);
|
||||
(void) AcpiUtVerifyChecksum (Table, Length);
|
||||
|
||||
/* Create a local copy of the FADT in common ACPI 2.0+ format */
|
||||
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
#include "acpi.h"
|
||||
#include "accommon.h"
|
||||
#include "actables.h"
|
||||
#include "acdisasm.h"
|
||||
#include "acutils.h"
|
||||
|
||||
#define _COMPONENT ACPI_TABLES
|
||||
ACPI_MODULE_NAME ("tbprint")
|
||||
|
@ -84,7 +86,7 @@ AcpiTbFixString (
|
|||
|
||||
while (Length && *String)
|
||||
{
|
||||
if (!isprint ((int) *String))
|
||||
if (!isprint ((int) (UINT8) *String))
|
||||
{
|
||||
*String = '?';
|
||||
}
|
||||
|
@ -185,89 +187,3 @@ AcpiTbPrintTableHeader (
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiTbValidateChecksum
|
||||
*
|
||||
* PARAMETERS: Table - ACPI table to verify
|
||||
* Length - Length of entire table
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
|
||||
* exception on bad checksum.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiTbVerifyChecksum (
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 Length)
|
||||
{
|
||||
UINT8 Checksum;
|
||||
|
||||
|
||||
/*
|
||||
* FACS/S3PT:
|
||||
* They are the odd tables, have no standard ACPI header and no checksum
|
||||
*/
|
||||
|
||||
if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) ||
|
||||
ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Compute the checksum on the table */
|
||||
|
||||
Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Length);
|
||||
|
||||
/* Checksum ok? (should be zero) */
|
||||
|
||||
if (Checksum)
|
||||
{
|
||||
ACPI_BIOS_WARNING ((AE_INFO,
|
||||
"Incorrect checksum in table [%4.4s] - 0x%2.2X, "
|
||||
"should be 0x%2.2X",
|
||||
Table->Signature, Table->Checksum,
|
||||
(UINT8) (Table->Checksum - Checksum)));
|
||||
|
||||
#if (ACPI_CHECKSUM_ABORT)
|
||||
return (AE_BAD_CHECKSUM);
|
||||
#endif
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiTbChecksum
|
||||
*
|
||||
* PARAMETERS: Buffer - Pointer to memory region to be checked
|
||||
* Length - Length of this memory region
|
||||
*
|
||||
* RETURN: Checksum (UINT8)
|
||||
*
|
||||
* DESCRIPTION: Calculates circular checksum of memory region.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT8
|
||||
AcpiTbChecksum (
|
||||
UINT8 *Buffer,
|
||||
UINT32 Length)
|
||||
{
|
||||
UINT8 Sum = 0;
|
||||
UINT8 *End = Buffer + Length;
|
||||
|
||||
|
||||
while (Buffer < End)
|
||||
{
|
||||
Sum = (UINT8) (Sum + *(Buffer++));
|
||||
}
|
||||
|
||||
return (Sum);
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ AcpiTbParseRootTable (
|
|||
|
||||
/* Validate the root table checksum */
|
||||
|
||||
Status = AcpiTbVerifyChecksum (Table, Length);
|
||||
Status = AcpiUtVerifyChecksum (Table, Length);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsUnmapMemory (Table, Length);
|
||||
|
|
|
@ -119,7 +119,7 @@ AcpiTbValidateRsdp (
|
|||
|
||||
/* Check the standard checksum */
|
||||
|
||||
if (AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0)
|
||||
if (AcpiUtChecksum ((UINT8 *) Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0)
|
||||
{
|
||||
return (AE_BAD_CHECKSUM);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ AcpiTbValidateRsdp (
|
|||
/* Check extended checksum if table version >= 2 */
|
||||
|
||||
if ((Rsdp->Revision >= 2) &&
|
||||
(AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0))
|
||||
(AcpiUtChecksum ((UINT8 *) Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0))
|
||||
{
|
||||
return (AE_BAD_CHECKSUM);
|
||||
}
|
||||
|
@ -163,6 +163,7 @@ AcpiFindRootPointer (
|
|||
UINT8 *TablePtr;
|
||||
UINT8 *MemRover;
|
||||
UINT32 PhysicalAddress;
|
||||
UINT32 EbdaWindowSize;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiFindRootPointer);
|
||||
|
@ -191,27 +192,40 @@ AcpiFindRootPointer (
|
|||
|
||||
/* EBDA present? */
|
||||
|
||||
if (PhysicalAddress > 0x400)
|
||||
/*
|
||||
* Check that the EBDA pointer from memory is sane and does not point
|
||||
* above valid low memory
|
||||
*/
|
||||
if (PhysicalAddress > 0x400 &&
|
||||
PhysicalAddress < 0xA0000)
|
||||
{
|
||||
/*
|
||||
* 1b) Search EBDA paragraphs (EBDA is required to be a
|
||||
* minimum of 1K length)
|
||||
* Calculate the scan window size
|
||||
* The EBDA is not guaranteed to be larger than a KiB and in case
|
||||
* that it is smaller, the scanning function would leave the low
|
||||
* memory and continue to the VGA range.
|
||||
*/
|
||||
EbdaWindowSize = ACPI_MIN(ACPI_EBDA_WINDOW_SIZE,
|
||||
0xA0000 - PhysicalAddress);
|
||||
|
||||
/*
|
||||
* 1b) Search EBDA paragraphs
|
||||
*/
|
||||
TablePtr = AcpiOsMapMemory (
|
||||
(ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
|
||||
ACPI_EBDA_WINDOW_SIZE);
|
||||
EbdaWindowSize);
|
||||
if (!TablePtr)
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Could not map memory at 0x%8.8X for length %u",
|
||||
PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
|
||||
PhysicalAddress, EbdaWindowSize));
|
||||
|
||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
MemRover = AcpiTbScanMemoryForRsdp (
|
||||
TablePtr, ACPI_EBDA_WINDOW_SIZE);
|
||||
AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE);
|
||||
TablePtr, EbdaWindowSize);
|
||||
AcpiOsUnmapMemory (TablePtr, EbdaWindowSize);
|
||||
|
||||
if (MemRover)
|
||||
{
|
||||
|
|
227
drivers/bus/acpi/acpica/utilities/utcksum.c
Normal file
227
drivers/bus/acpi/acpica/utilities/utcksum.c
Normal file
|
@ -0,0 +1,227 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Module Name: utcksum - Support generating table checksums
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2000 - 2022, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions, and the following disclaimer,
|
||||
* without modification.
|
||||
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
||||
* substantially similar to the "NO WARRANTY" disclaimer below
|
||||
* ("Disclaimer") and any redistribution must be conditioned upon
|
||||
* including a substantially similar Disclaimer requirement for further
|
||||
* binary redistribution.
|
||||
* 3. Neither the names of the above-listed copyright holders nor the names
|
||||
* of any contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2 as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* NO WARRANTY
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#include "acpi.h"
|
||||
#include "accommon.h"
|
||||
#include "acdisasm.h"
|
||||
#include "acutils.h"
|
||||
|
||||
|
||||
/* This module used for application-level code only */
|
||||
|
||||
#define _COMPONENT ACPI_CA_DISASSEMBLER
|
||||
ACPI_MODULE_NAME ("utcksum")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtVerifyChecksum
|
||||
*
|
||||
* PARAMETERS: Table - ACPI table to verify
|
||||
* Length - Length of entire table
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
|
||||
* exception on bad checksum.
|
||||
* Note: We don't have to check for a CDAT here, since CDAT is
|
||||
* not in the RSDT/XSDT, and the CDAT table is never installed
|
||||
* via ACPICA.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtVerifyChecksum (
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 Length)
|
||||
{
|
||||
UINT8 Checksum;
|
||||
|
||||
|
||||
/*
|
||||
* FACS/S3PT:
|
||||
* They are the odd tables, have no standard ACPI header and no checksum
|
||||
*/
|
||||
if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) ||
|
||||
ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Compute the checksum on the table */
|
||||
|
||||
Length = Table->Length;
|
||||
Checksum = AcpiUtGenerateChecksum (ACPI_CAST_PTR (UINT8, Table), Length, Table->Checksum);
|
||||
|
||||
/* Computed checksum matches table? */
|
||||
|
||||
if (Checksum != Table->Checksum)
|
||||
{
|
||||
ACPI_BIOS_WARNING ((AE_INFO,
|
||||
"Incorrect checksum in table [%4.4s] - 0x%2.2X, "
|
||||
"should be 0x%2.2X",
|
||||
Table->Signature, Table->Checksum,
|
||||
Table->Checksum - Checksum));
|
||||
|
||||
#if (ACPI_CHECKSUM_ABORT)
|
||||
return (AE_BAD_CHECKSUM);
|
||||
#endif
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtVerifyCdatChecksum
|
||||
*
|
||||
* PARAMETERS: Table - CDAT ACPI table to verify
|
||||
* Length - Length of entire table
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Verifies that the CDAT table checksums to zero. Optionally
|
||||
* returns an exception on bad checksum.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtVerifyCdatChecksum (
|
||||
ACPI_TABLE_CDAT *CdatTable,
|
||||
UINT32 Length)
|
||||
{
|
||||
UINT8 Checksum;
|
||||
|
||||
|
||||
/* Compute the checksum on the table */
|
||||
|
||||
Checksum = AcpiUtGenerateChecksum (ACPI_CAST_PTR (UINT8, CdatTable),
|
||||
CdatTable->Length, CdatTable->Checksum);
|
||||
|
||||
/* Computed checksum matches table? */
|
||||
|
||||
if (Checksum != CdatTable->Checksum)
|
||||
{
|
||||
ACPI_BIOS_WARNING ((AE_INFO,
|
||||
"Incorrect checksum in table [%4.4s] - 0x%2.2X, "
|
||||
"should be 0x%2.2X",
|
||||
AcpiGbl_CDAT, CdatTable->Checksum, Checksum));
|
||||
|
||||
#if (ACPI_CHECKSUM_ABORT)
|
||||
return (AE_BAD_CHECKSUM);
|
||||
#endif
|
||||
}
|
||||
|
||||
CdatTable->Checksum = Checksum;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtGenerateChecksum
|
||||
*
|
||||
* PARAMETERS: Table - Pointer to table to be checksummed
|
||||
* Length - Length of the table
|
||||
* OriginalChecksum - Value of the checksum field
|
||||
*
|
||||
* RETURN: 8 bit checksum of buffer
|
||||
*
|
||||
* DESCRIPTION: Computes an 8 bit checksum of the table.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT8
|
||||
AcpiUtGenerateChecksum (
|
||||
void *Table,
|
||||
UINT32 Length,
|
||||
UINT8 OriginalChecksum)
|
||||
{
|
||||
UINT8 Checksum;
|
||||
|
||||
|
||||
/* Sum the entire table as-is */
|
||||
|
||||
Checksum = AcpiUtChecksum ((UINT8 *) Table, Length);
|
||||
|
||||
/* Subtract off the existing checksum value in the table */
|
||||
|
||||
Checksum = (UINT8) (Checksum - OriginalChecksum);
|
||||
|
||||
/* Compute and return the final checksum */
|
||||
|
||||
Checksum = (UINT8) (0 - Checksum);
|
||||
return (Checksum);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtChecksum
|
||||
*
|
||||
* PARAMETERS: Buffer - Pointer to memory region to be checked
|
||||
* Length - Length of this memory region
|
||||
*
|
||||
* RETURN: Checksum (UINT8)
|
||||
*
|
||||
* DESCRIPTION: Calculates circular checksum of memory region.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT8
|
||||
AcpiUtChecksum (
|
||||
UINT8 *Buffer,
|
||||
UINT32 Length)
|
||||
{
|
||||
UINT8 Sum = 0;
|
||||
UINT8 *End = Buffer + Length;
|
||||
|
||||
|
||||
while (Buffer < End)
|
||||
{
|
||||
Sum = (UINT8) (Sum + *(Buffer++));
|
||||
}
|
||||
|
||||
return (Sum);
|
||||
}
|
|
@ -179,6 +179,7 @@ ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
|
|||
/* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_ENABLE},
|
||||
/* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
|
||||
/* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE},
|
||||
/* ACPI_EVENT_PCIE_WAKE */ {ACPI_BITREG_PCIEXP_WAKE_STATUS, ACPI_BITREG_PCIEXP_WAKE_DISABLE, ACPI_BITMASK_PCIEXP_WAKE_STATUS, ACPI_BITMASK_PCIEXP_WAKE_DISABLE},
|
||||
};
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ AcpiUtRepairName (
|
|||
return;
|
||||
}
|
||||
|
||||
ACPI_COPY_NAMESEG (&OriginalName, Name);
|
||||
ACPI_COPY_NAMESEG (&OriginalName, &Name[0]);
|
||||
|
||||
/* Check each character in the name */
|
||||
|
||||
|
@ -213,10 +213,10 @@ AcpiUtRepairName (
|
|||
|
||||
/*
|
||||
* Replace a bad character with something printable, yet technically
|
||||
* still invalid. This prevents any collisions with existing "good"
|
||||
* "odd". This prevents any collisions with existing "good"
|
||||
* names in the namespace.
|
||||
*/
|
||||
Name[i] = '*';
|
||||
Name[i] = '_';
|
||||
FoundBadChar = TRUE;
|
||||
}
|
||||
|
||||
|
@ -227,8 +227,8 @@ AcpiUtRepairName (
|
|||
if (!AcpiGbl_EnableInterpreterSlack)
|
||||
{
|
||||
ACPI_WARNING ((AE_INFO,
|
||||
"Invalid character(s) in name (0x%.8X), repaired: [%4.4s]",
|
||||
OriginalName, Name));
|
||||
"Invalid character(s) in name (0x%.8X) %p, repaired: [%4.4s]",
|
||||
OriginalName, Name, &Name[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ URL: https://gitlab.freedesktop.org/mesa/glu, ftp://ftp.freedesktop.org/pub/mesa
|
|||
|
||||
Title: ACPICA
|
||||
Path: drivers/bus/acpi/acpica
|
||||
Used Version: 20220331
|
||||
Used Version: 20221020
|
||||
License: GPL-2.0 (https://spdx.org/licenses/GPL-2.0.html)
|
||||
URL: https://acpica.org/
|
||||
|
||||
|
|
Loading…
Reference in a new issue