From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: michael.a.kubacki@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Mon, 16 Sep 2019 15:41:44 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2019 15:41:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,514,1559545200"; d="scan'208";a="187278446" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga007.fm.intel.com with ESMTP; 16 Sep 2019 15:41:41 -0700 Received: from orsmsx153.amr.corp.intel.com (10.22.226.247) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Sep 2019 15:41:41 -0700 Received: from orsmsx121.amr.corp.intel.com ([169.254.10.57]) by ORSMSX153.amr.corp.intel.com ([169.254.12.237]) with mapi id 14.03.0439.000; Mon, 16 Sep 2019 15:41:41 -0700 From: "Kubacki, Michael A" To: "devel@edk2.groups.io" , "Sinha, Ankit" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" , "Gao, Liming" Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Thread-Topic: [edk2-devel] [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Thread-Index: AQHVbLrVxVAOehYhW0WL4l6s4Ml8ZacuzDvA Date: Mon, 16 Sep 2019 22:41:41 +0000 Message-ID: <49AB4ACB9627B8468F29D589A27B745588AC933A@ORSMSX121.amr.corp.intel.com> References: <20190916181608.22692-1-ankit.sinha@intel.com> In-Reply-To: <20190916181608.22692-1-ankit.sinha@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGI5M2I5MzgtM2YwZS00MmY0LTlmN2EtY2NlOWM1MmM2OTM5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYUl5eWRSSWpLRDB1QXZnSmV4dzlob3ZmelJoNkdLeUk0cVE4OHlVaE1KUlhIK0lWdXpma0dkYkhjVFBuVWhsbyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Return-Path: michael.a.kubacki@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael Kubacki > -----Original Message----- > From: 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 ; Chiu, Chasel > ; Desimone, Nathaniel L > ; Gao, Liming > Subject: [edk2-devel] [edk2-platforms] [PATCH v4 1/1] > MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered >=20 > 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. >=20 > Cc: Michael Kubacki > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Liming Gao >=20 > Signed-off-by: Ankit Sinha > --- > Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 52 > ++++++++++---------- > 1 file changed, 27 insertions(+), 25 deletions(-) >=20 > 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 =3D EFI_ACPI_4_0_LOCAL_APIC_NMI; > LocalApciNmiStruct.Length =3D sizeof > (EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE); > LocalApciNmiStruct.AcpiProcessorId =3D 0xFF; // Applies to all p= rocessors > - LocalApciNmiStruct.Flags =3D 0x000D; // Flags - Level-ti= ggered, Active > High > + LocalApciNmiStruct.Flags =3D 0x0005; // Flags - Edge-tig= gered, Active > High > LocalApciNmiStruct.LocalApicLint =3D 0x1; >=20 > ASSERT (MadtStructsIndex < MaxMadtStructCount); @@ -1072,24 +1072,26 > @@ InstallMadtFromScratch ( > // > // Build Local x2APIC NMI Structure > // > - LocalX2ApicNmiStruct.Type =3D EFI_ACPI_4_0_LOCAL_X2APIC_NMI; > - LocalX2ApicNmiStruct.Length =3D sizeof > (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE); > - LocalX2ApicNmiStruct.Flags =3D 0x000D; // Flags - Lev= el-tiggered, > Active High > - LocalX2ApicNmiStruct.AcpiProcessorUid =3D 0xFFFFFFFF; // Applies to = all > processors > - LocalX2ApicNmiStruct.LocalX2ApicLint =3D 0x01; > - LocalX2ApicNmiStruct.Reserved[0] =3D 0x00; > - LocalX2ApicNmiStruct.Reserved[1] =3D 0x00; > - LocalX2ApicNmiStruct.Reserved[2] =3D 0x00; > + if (mX2ApicEnabled) { > + LocalX2ApicNmiStruct.Type =3D EFI_ACPI_4_0_LOCAL_X2APIC_NMI; > + LocalX2ApicNmiStruct.Length =3D sizeof > (EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE); > + LocalX2ApicNmiStruct.Flags =3D 0x000D; // Flags - L= evel-tiggered, > Active High > + LocalX2ApicNmiStruct.AcpiProcessorUid =3D 0xFFFFFFFF; // Applies t= o all > processors > + LocalX2ApicNmiStruct.LocalX2ApicLint =3D 0x01; > + LocalX2ApicNmiStruct.Reserved[0] =3D 0x00; > + LocalX2ApicNmiStruct.Reserved[1] =3D 0x00; > + LocalX2ApicNmiStruct.Reserved[2] =3D 0x00; >=20 > - ASSERT (MadtStructsIndex < MaxMadtStructCount); > - Status =3D 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 =3D CopyStructure ( > + &MadtTableHeader.Header, > + (STRUCTURE_HEADER *) &LocalX2ApicNmiStruct, > + &MadtStructs[MadtStructsIndex++] > + ); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "CopyMadtStructure (x2APIC NMI) failed: > %r\n", Status)); > + goto Done; > + } > } >=20 > // > @@ -1174,7 +1176,7 @@ InstallMcfgFromScratch ( > // > // Set MCFG table "Length" field based on the number of PCIe segments > enumerated so far > // > - McfgTable->Header.Length =3D (UINT32)(sizeof > (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_H > EADER) + > + McfgTable->Header.Length =3D (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); >=20 > Segment =3D (VOID *)(McfgTable + 1); > @@ -1336,11 +1338,11 @@ PlatformUpdateTables ( > HpetCapabilities.Uint64 =3D HpetCapabilitiesData; > HpetCapabilitiesData =3D MmioRead32 (HpetBaseAddress + > HPET_GENERAL_CAPABILITIES_ID_OFFSET + 4); > HpetCapabilities.Uint64 |=3D LShiftU64 (HpetCapabilitiesData, 32); > - HpetBlockId.Bits.Revision =3D HpetCapabilities.Bits.Revision; > - HpetBlockId.Bits.NumberOfTimers =3D > HpetCapabilities.Bits.NumberOfTimers; > - HpetBlockId.Bits.CounterSize =3D HpetCapabilities.Bits.CounterSi= ze; > - HpetBlockId.Bits.Reserved =3D 0; > - HpetBlockId.Bits.LegacyRoute =3D HpetCapabilities.Bits.LegacyRou= te; > + HpetBlockId.Bits.Revision =3D HpetCapabilities.Bits.Revision; > + HpetBlockId.Bits.NumberOfTimers =3D > HpetCapabilities.Bits.NumberOfTimers; > + HpetBlockId.Bits.CounterSize =3D HpetCapabilities.Bits.CounterSi= ze; > + HpetBlockId.Bits.Reserved =3D 0; > + HpetBlockId.Bits.LegacyRoute =3D HpetCapabilities.Bits.LegacyRou= te; > HpetBlockId.Bits.VendorId =3D HpetCapabilities.Bits.VendorId; > HpetTable->EventTimerBlockId =3D HpetBlockId.Uint32; > HpetTable->MainCounterMinimumClockTickInPeriodicMode =3D > (UINT16)HpetCapabilities.Bits.CounterClockPeriod; > @@ -1466,7 +1468,7 @@ UpdateLocalTable ( >=20 > for (Index =3D 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]); > Index++) { > CurrentTable =3D mLocalTable[Index]; > - > + > PlatformUpdateTables (CurrentTable, &Version); >=20 > TableHandle =3D 0; > -- > 2.16.2.windows.1 >=20 >=20 >=20