* [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
@ 2019-09-16 18:16 Sinha, Ankit
2019-09-16 20:50 ` Nate DeSimone
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sinha, Ankit @ 2019-09-16 18:16 UTC (permalink / raw)
To: devel; +Cc: Michael Kubacki, Chasel Chiu, Nate DeSimone, Liming Gao
1. Default APIC NMI structure in MADT changed to expose
Level-Triggered interrupts.
2. x2APIC NMI structure won't be exposed to OS if x2APIC is not enabled.
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ankit Sinha <ankit.sinha@intel.com>
---
Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 52 ++++++++++----------
1 file changed, 27 insertions(+), 25 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 78838e01e76b..2b51c34ef2fd 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -1055,7 +1055,7 @@ InstallMadtFromScratch (
LocalApciNmiStruct.Type = EFI_ACPI_4_0_LOCAL_APIC_NMI;
LocalApciNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE);
LocalApciNmiStruct.AcpiProcessorId = 0xFF; // Applies to all processors
- LocalApciNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
+ LocalApciNmiStruct.Flags = 0x0005; // Flags - Edge-tiggered, Active High
LocalApciNmiStruct.LocalApicLint = 0x1;
ASSERT (MadtStructsIndex < MaxMadtStructCount);
@@ -1072,24 +1072,26 @@ InstallMadtFromScratch (
//
// Build Local x2APIC NMI Structure
//
- LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
- LocalX2ApicNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
- LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
- LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all processors
- LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
- LocalX2ApicNmiStruct.Reserved[0] = 0x00;
- LocalX2ApicNmiStruct.Reserved[1] = 0x00;
- LocalX2ApicNmiStruct.Reserved[2] = 0x00;
+ if (mX2ApicEnabled) {
+ LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
+ LocalX2ApicNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
+ LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
+ LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all processors
+ LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
+ LocalX2ApicNmiStruct.Reserved[0] = 0x00;
+ LocalX2ApicNmiStruct.Reserved[1] = 0x00;
+ LocalX2ApicNmiStruct.Reserved[2] = 0x00;
- ASSERT (MadtStructsIndex < MaxMadtStructCount);
- Status = CopyStructure (
- &MadtTableHeader.Header,
- (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
- &MadtStructs[MadtStructsIndex++]
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "CopyMadtStructure (x2APIC NMI) failed: %r\n", Status));
- goto Done;
+ ASSERT (MadtStructsIndex < MaxMadtStructCount);
+ Status = CopyStructure (
+ &MadtTableHeader.Header,
+ (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
+ &MadtStructs[MadtStructsIndex++]
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "CopyMadtStructure (x2APIC NMI) failed: %r\n", Status));
+ goto Done;
+ }
}
//
@@ -1174,7 +1176,7 @@ InstallMcfgFromScratch (
//
// Set MCFG table "Length" field based on the number of PCIe segments enumerated so far
//
- McfgTable->Header.Length = (UINT32)(sizeof (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER) +
+ McfgTable->Header.Length = (UINT32)(sizeof (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER) +
sizeof (EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE) * SegmentCount);
Segment = (VOID *)(McfgTable + 1);
@@ -1336,11 +1338,11 @@ PlatformUpdateTables (
HpetCapabilities.Uint64 = HpetCapabilitiesData;
HpetCapabilitiesData = MmioRead32 (HpetBaseAddress + HPET_GENERAL_CAPABILITIES_ID_OFFSET + 4);
HpetCapabilities.Uint64 |= LShiftU64 (HpetCapabilitiesData, 32);
- HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
- HpetBlockId.Bits.NumberOfTimers = HpetCapabilities.Bits.NumberOfTimers;
- HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
- HpetBlockId.Bits.Reserved = 0;
- HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
+ HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
+ HpetBlockId.Bits.NumberOfTimers = HpetCapabilities.Bits.NumberOfTimers;
+ HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
+ HpetBlockId.Bits.Reserved = 0;
+ HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
HpetBlockId.Bits.VendorId = HpetCapabilities.Bits.VendorId;
HpetTable->EventTimerBlockId = HpetBlockId.Uint32;
HpetTable->MainCounterMinimumClockTickInPeriodicMode = (UINT16)HpetCapabilities.Bits.CounterClockPeriod;
@@ -1466,7 +1468,7 @@ UpdateLocalTable (
for (Index = 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]); Index++) {
CurrentTable = mLocalTable[Index];
-
+
PlatformUpdateTables (CurrentTable, &Version);
TableHandle = 0;
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
2019-09-16 18:16 [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Sinha, Ankit
@ 2019-09-16 20:50 ` Nate DeSimone
[not found] ` <15C5065C577F62D2.15275@groups.io>
2019-09-16 22:41 ` Kubacki, Michael A
2 siblings, 0 replies; 4+ messages in thread
From: Nate DeSimone @ 2019-09-16 20:50 UTC (permalink / raw)
To: Sinha, Ankit, devel@edk2.groups.io
Cc: Kubacki, Michael A, Chiu, Chasel, Gao, Liming
Hi Ankit,
This patch looks identical to PATCH V3 with the exception that you took away the update on the copyright year. May I ask why?
Thanks,
Nate
-----Original Message-----
From: Sinha, Ankit <ankit.sinha@intel.com>
Sent: Monday, September 16, 2019 11:16 AM
To: devel@edk2.groups.io
Cc: Kubacki, Michael A <michael.a.kubacki@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
1. Default APIC NMI structure in MADT changed to expose
Level-Triggered interrupts.
2. x2APIC NMI structure won't be exposed to OS if x2APIC is not enabled.
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ankit Sinha <ankit.sinha@intel.com>
---
Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 52 ++++++++++----------
1 file changed, 27 insertions(+), 25 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 78838e01e76b..2b51c34ef2fd 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -1055,7 +1055,7 @@ InstallMadtFromScratch (
LocalApciNmiStruct.Type = EFI_ACPI_4_0_LOCAL_APIC_NMI;
LocalApciNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE);
LocalApciNmiStruct.AcpiProcessorId = 0xFF; // Applies to all processors
- LocalApciNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
+ LocalApciNmiStruct.Flags = 0x0005; // Flags - Edge-tiggered, Active High
LocalApciNmiStruct.LocalApicLint = 0x1;
ASSERT (MadtStructsIndex < MaxMadtStructCount); @@ -1072,24 +1072,26 @@ InstallMadtFromScratch (
//
// Build Local x2APIC NMI Structure
//
- LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
- LocalX2ApicNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
- LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
- LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all processors
- LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
- LocalX2ApicNmiStruct.Reserved[0] = 0x00;
- LocalX2ApicNmiStruct.Reserved[1] = 0x00;
- LocalX2ApicNmiStruct.Reserved[2] = 0x00;
+ if (mX2ApicEnabled) {
+ LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
+ LocalX2ApicNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
+ LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
+ LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all processors
+ LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
+ LocalX2ApicNmiStruct.Reserved[0] = 0x00;
+ LocalX2ApicNmiStruct.Reserved[1] = 0x00;
+ LocalX2ApicNmiStruct.Reserved[2] = 0x00;
- ASSERT (MadtStructsIndex < MaxMadtStructCount);
- Status = CopyStructure (
- &MadtTableHeader.Header,
- (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
- &MadtStructs[MadtStructsIndex++]
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "CopyMadtStructure (x2APIC NMI) failed: %r\n", Status));
- goto Done;
+ ASSERT (MadtStructsIndex < MaxMadtStructCount);
+ Status = CopyStructure (
+ &MadtTableHeader.Header,
+ (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
+ &MadtStructs[MadtStructsIndex++]
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "CopyMadtStructure (x2APIC NMI) failed: %r\n", Status));
+ goto Done;
+ }
}
//
@@ -1174,7 +1176,7 @@ InstallMcfgFromScratch (
//
// Set MCFG table "Length" field based on the number of PCIe segments enumerated so far
//
- McfgTable->Header.Length = (UINT32)(sizeof (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER) +
+ McfgTable->Header.Length = (UINT32)(sizeof
+ (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER) +
sizeof (EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE) * SegmentCount);
Segment = (VOID *)(McfgTable + 1);
@@ -1336,11 +1338,11 @@ PlatformUpdateTables (
HpetCapabilities.Uint64 = HpetCapabilitiesData;
HpetCapabilitiesData = MmioRead32 (HpetBaseAddress + HPET_GENERAL_CAPABILITIES_ID_OFFSET + 4);
HpetCapabilities.Uint64 |= LShiftU64 (HpetCapabilitiesData, 32);
- HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
- HpetBlockId.Bits.NumberOfTimers = HpetCapabilities.Bits.NumberOfTimers;
- HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
- HpetBlockId.Bits.Reserved = 0;
- HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
+ HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
+ HpetBlockId.Bits.NumberOfTimers = HpetCapabilities.Bits.NumberOfTimers;
+ HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
+ HpetBlockId.Bits.Reserved = 0;
+ HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
HpetBlockId.Bits.VendorId = HpetCapabilities.Bits.VendorId;
HpetTable->EventTimerBlockId = HpetBlockId.Uint32;
HpetTable->MainCounterMinimumClockTickInPeriodicMode = (UINT16)HpetCapabilities.Bits.CounterClockPeriod;
@@ -1466,7 +1468,7 @@ UpdateLocalTable (
for (Index = 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]); Index++) {
CurrentTable = mLocalTable[Index];
-
+
PlatformUpdateTables (CurrentTable, &Version);
TableHandle = 0;
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
[not found] ` <15C5065C577F62D2.15275@groups.io>
@ 2019-09-16 20:53 ` Nate DeSimone
0 siblings, 0 replies; 4+ messages in thread
From: Nate DeSimone @ 2019-09-16 20:53 UTC (permalink / raw)
To: devel@edk2.groups.io, Desimone, Nathaniel L, Sinha, Ankit
Cc: Kubacki, Michael A, Chiu, Chasel, Gao, Liming
Never mind, I was looking at the wrong patch, sorry about that.
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Monday, September 16, 2019 1:51 PM
To: Sinha, Ankit <ankit.sinha@intel.com>; devel@edk2.groups.io
Cc: Kubacki, Michael A <michael.a.kubacki@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
Hi Ankit,
This patch looks identical to PATCH V3 with the exception that you took away the update on the copyright year. May I ask why?
Thanks,
Nate
-----Original Message-----
From: Sinha, Ankit <ankit.sinha@intel.com>
Sent: Monday, September 16, 2019 11:16 AM
To: devel@edk2.groups.io
Cc: Kubacki, Michael A <michael.a.kubacki@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
1. Default APIC NMI structure in MADT changed to expose
Level-Triggered interrupts.
2. x2APIC NMI structure won't be exposed to OS if x2APIC is not enabled.
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ankit Sinha <ankit.sinha@intel.com>
---
Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 52 ++++++++++----------
1 file changed, 27 insertions(+), 25 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 78838e01e76b..2b51c34ef2fd 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -1055,7 +1055,7 @@ InstallMadtFromScratch (
LocalApciNmiStruct.Type = EFI_ACPI_4_0_LOCAL_APIC_NMI;
LocalApciNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE);
LocalApciNmiStruct.AcpiProcessorId = 0xFF; // Applies to all processors
- LocalApciNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
+ LocalApciNmiStruct.Flags = 0x0005; // Flags - Edge-tiggered, Active High
LocalApciNmiStruct.LocalApicLint = 0x1;
ASSERT (MadtStructsIndex < MaxMadtStructCount); @@ -1072,24 +1072,26 @@ InstallMadtFromScratch (
//
// Build Local x2APIC NMI Structure
//
- LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
- LocalX2ApicNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
- LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
- LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all processors
- LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
- LocalX2ApicNmiStruct.Reserved[0] = 0x00;
- LocalX2ApicNmiStruct.Reserved[1] = 0x00;
- LocalX2ApicNmiStruct.Reserved[2] = 0x00;
+ if (mX2ApicEnabled) {
+ LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
+ LocalX2ApicNmiStruct.Length = sizeof (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
+ LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active High
+ LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all processors
+ LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
+ LocalX2ApicNmiStruct.Reserved[0] = 0x00;
+ LocalX2ApicNmiStruct.Reserved[1] = 0x00;
+ LocalX2ApicNmiStruct.Reserved[2] = 0x00;
- ASSERT (MadtStructsIndex < MaxMadtStructCount);
- Status = CopyStructure (
- &MadtTableHeader.Header,
- (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
- &MadtStructs[MadtStructsIndex++]
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((EFI_D_ERROR, "CopyMadtStructure (x2APIC NMI) failed: %r\n", Status));
- goto Done;
+ ASSERT (MadtStructsIndex < MaxMadtStructCount);
+ Status = CopyStructure (
+ &MadtTableHeader.Header,
+ (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
+ &MadtStructs[MadtStructsIndex++]
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "CopyMadtStructure (x2APIC NMI) failed: %r\n", Status));
+ goto Done;
+ }
}
//
@@ -1174,7 +1176,7 @@ InstallMcfgFromScratch (
//
// Set MCFG table "Length" field based on the number of PCIe segments enumerated so far
//
- McfgTable->Header.Length = (UINT32)(sizeof (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER) +
+ McfgTable->Header.Length = (UINT32)(sizeof
+ (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER) +
sizeof (EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE) * SegmentCount);
Segment = (VOID *)(McfgTable + 1);
@@ -1336,11 +1338,11 @@ PlatformUpdateTables (
HpetCapabilities.Uint64 = HpetCapabilitiesData;
HpetCapabilitiesData = MmioRead32 (HpetBaseAddress + HPET_GENERAL_CAPABILITIES_ID_OFFSET + 4);
HpetCapabilities.Uint64 |= LShiftU64 (HpetCapabilitiesData, 32);
- HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
- HpetBlockId.Bits.NumberOfTimers = HpetCapabilities.Bits.NumberOfTimers;
- HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
- HpetBlockId.Bits.Reserved = 0;
- HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
+ HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
+ HpetBlockId.Bits.NumberOfTimers = HpetCapabilities.Bits.NumberOfTimers;
+ HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
+ HpetBlockId.Bits.Reserved = 0;
+ HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
HpetBlockId.Bits.VendorId = HpetCapabilities.Bits.VendorId;
HpetTable->EventTimerBlockId = HpetBlockId.Uint32;
HpetTable->MainCounterMinimumClockTickInPeriodicMode = (UINT16)HpetCapabilities.Bits.CounterClockPeriod;
@@ -1466,7 +1468,7 @@ UpdateLocalTable (
for (Index = 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]); Index++) {
CurrentTable = mLocalTable[Index];
-
+
PlatformUpdateTables (CurrentTable, &Version);
TableHandle = 0;
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
2019-09-16 18:16 [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Sinha, Ankit
2019-09-16 20:50 ` Nate DeSimone
[not found] ` <15C5065C577F62D2.15275@groups.io>
@ 2019-09-16 22:41 ` Kubacki, Michael A
2 siblings, 0 replies; 4+ messages in thread
From: Kubacki, Michael A @ 2019-09-16 22:41 UTC (permalink / raw)
To: devel@edk2.groups.io, Sinha, Ankit
Cc: Chiu, Chasel, Desimone, Nathaniel L, Gao, Liming
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sinha,
> Ankit
> Sent: Monday, September 16, 2019 11:16 AM
> To: devel@edk2.groups.io
> Cc: Kubacki, Michael A <michael.a.kubacki@intel.com>; Chiu, Chasel
> <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-devel] [edk2-platforms] [PATCH v4 1/1]
> MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
>
> 1. Default APIC NMI structure in MADT changed to expose
> Level-Triggered interrupts.
> 2. x2APIC NMI structure won't be exposed to OS if x2APIC is not enabled.
>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
>
> Signed-off-by: Ankit Sinha <ankit.sinha@intel.com>
> ---
> Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 52
> ++++++++++----------
> 1 file changed, 27 insertions(+), 25 deletions(-)
>
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 78838e01e76b..2b51c34ef2fd 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -1055,7 +1055,7 @@ InstallMadtFromScratch (
> LocalApciNmiStruct.Type = EFI_ACPI_4_0_LOCAL_APIC_NMI;
> LocalApciNmiStruct.Length = sizeof
> (EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE);
> LocalApciNmiStruct.AcpiProcessorId = 0xFF; // Applies to all processors
> - LocalApciNmiStruct.Flags = 0x000D; // Flags - Level-tiggered, Active
> High
> + LocalApciNmiStruct.Flags = 0x0005; // Flags - Edge-tiggered, Active
> High
> LocalApciNmiStruct.LocalApicLint = 0x1;
>
> ASSERT (MadtStructsIndex < MaxMadtStructCount); @@ -1072,24 +1072,26
> @@ InstallMadtFromScratch (
> //
> // Build Local x2APIC NMI Structure
> //
> - LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
> - LocalX2ApicNmiStruct.Length = sizeof
> (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
> - LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered,
> Active High
> - LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all
> processors
> - LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
> - LocalX2ApicNmiStruct.Reserved[0] = 0x00;
> - LocalX2ApicNmiStruct.Reserved[1] = 0x00;
> - LocalX2ApicNmiStruct.Reserved[2] = 0x00;
> + if (mX2ApicEnabled) {
> + LocalX2ApicNmiStruct.Type = EFI_ACPI_4_0_LOCAL_X2APIC_NMI;
> + LocalX2ApicNmiStruct.Length = sizeof
> (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE);
> + LocalX2ApicNmiStruct.Flags = 0x000D; // Flags - Level-tiggered,
> Active High
> + LocalX2ApicNmiStruct.AcpiProcessorUid = 0xFFFFFFFF; // Applies to all
> processors
> + LocalX2ApicNmiStruct.LocalX2ApicLint = 0x01;
> + LocalX2ApicNmiStruct.Reserved[0] = 0x00;
> + LocalX2ApicNmiStruct.Reserved[1] = 0x00;
> + LocalX2ApicNmiStruct.Reserved[2] = 0x00;
>
> - ASSERT (MadtStructsIndex < MaxMadtStructCount);
> - Status = CopyStructure (
> - &MadtTableHeader.Header,
> - (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
> - &MadtStructs[MadtStructsIndex++]
> - );
> - if (EFI_ERROR (Status)) {
> - DEBUG ((EFI_D_ERROR, "CopyMadtStructure (x2APIC NMI) failed: %r\n",
> Status));
> - goto Done;
> + ASSERT (MadtStructsIndex < MaxMadtStructCount);
> + Status = CopyStructure (
> + &MadtTableHeader.Header,
> + (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct,
> + &MadtStructs[MadtStructsIndex++]
> + );
> + if (EFI_ERROR (Status)) {
> + DEBUG ((DEBUG_ERROR, "CopyMadtStructure (x2APIC NMI) failed:
> %r\n", Status));
> + goto Done;
> + }
> }
>
> //
> @@ -1174,7 +1176,7 @@ InstallMcfgFromScratch (
> //
> // Set MCFG table "Length" field based on the number of PCIe segments
> enumerated so far
> //
> - McfgTable->Header.Length = (UINT32)(sizeof
> (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_H
> EADER) +
> + McfgTable->Header.Length = (UINT32)(sizeof
> +
> (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_H
> EADER) +
> sizeof
> (EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE
> _ADDRESS_ALLOCATION_STRUCTURE) * SegmentCount);
>
> Segment = (VOID *)(McfgTable + 1);
> @@ -1336,11 +1338,11 @@ PlatformUpdateTables (
> HpetCapabilities.Uint64 = HpetCapabilitiesData;
> HpetCapabilitiesData = MmioRead32 (HpetBaseAddress +
> HPET_GENERAL_CAPABILITIES_ID_OFFSET + 4);
> HpetCapabilities.Uint64 |= LShiftU64 (HpetCapabilitiesData, 32);
> - HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
> - HpetBlockId.Bits.NumberOfTimers =
> HpetCapabilities.Bits.NumberOfTimers;
> - HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
> - HpetBlockId.Bits.Reserved = 0;
> - HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
> + HpetBlockId.Bits.Revision = HpetCapabilities.Bits.Revision;
> + HpetBlockId.Bits.NumberOfTimers =
> HpetCapabilities.Bits.NumberOfTimers;
> + HpetBlockId.Bits.CounterSize = HpetCapabilities.Bits.CounterSize;
> + HpetBlockId.Bits.Reserved = 0;
> + HpetBlockId.Bits.LegacyRoute = HpetCapabilities.Bits.LegacyRoute;
> HpetBlockId.Bits.VendorId = HpetCapabilities.Bits.VendorId;
> HpetTable->EventTimerBlockId = HpetBlockId.Uint32;
> HpetTable->MainCounterMinimumClockTickInPeriodicMode =
> (UINT16)HpetCapabilities.Bits.CounterClockPeriod;
> @@ -1466,7 +1468,7 @@ UpdateLocalTable (
>
> for (Index = 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]);
> Index++) {
> CurrentTable = mLocalTable[Index];
> -
> +
> PlatformUpdateTables (CurrentTable, &Version);
>
> TableHandle = 0;
> --
> 2.16.2.windows.1
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-16 22:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-16 18:16 [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Sinha, Ankit
2019-09-16 20:50 ` Nate DeSimone
[not found] ` <15C5065C577F62D2.15275@groups.io>
2019-09-16 20:53 ` [edk2-devel] " Nate DeSimone
2019-09-16 22:41 ` Kubacki, Michael A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox