From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: nathaniel.l.desimone@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Mon, 16 Sep 2019 13:50:38 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Sep 2019 13:50:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,514,1559545200"; d="scan'208";a="386322866" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga005.fm.intel.com with ESMTP; 16 Sep 2019 13:50:37 -0700 Received: from orsmsx152.amr.corp.intel.com (10.22.226.39) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Sep 2019 13:50:37 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.225]) by ORSMSX152.amr.corp.intel.com ([169.254.8.93]) with mapi id 14.03.0439.000; Mon, 16 Sep 2019 13:50:36 -0700 From: "Nate DeSimone" To: "Sinha, Ankit" , "devel@edk2.groups.io" CC: "Kubacki, Michael A" , "Chiu, Chasel" , "Gao, Liming" Subject: Re: [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Thread-Topic: [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Thread-Index: AQHVbLrXUvgEjs+CWkSse/JBx+AFbacuxxfQ Date: Mon, 16 Sep 2019 20:50:36 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AAEED939C@ORSMSX114.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: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWM3MmQxMTAtM2NjZi00ZDA0LWI0NjEtMTIzNTNjY2RjYmIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiV3hEVnFDT0oxWVJqNkZLMmRSbndaY3I1ckQrRlFGOXRpSWlkZ1ZZVEFzcDdUdUxORDRDZXZsWmM3SGdtWmVjVyJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ankit, This patch looks identical to PATCH V3 with the exception that you took awa= y the update on the copyright year. May I ask why? Thanks, Nate -----Original Message----- From: Sinha, Ankit =20 Sent: Monday, September 16, 2019 11:16 AM To: devel@edk2.groups.io Cc: Kubacki, Michael A ; Chiu, Chasel ; Desimone, Nathaniel L ; Ga= o, Liming Subject: [edk2-platforms] [PATCH v4 1/1] MinPlatformPkg/Acpi: MADT NMI defa= ult 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 Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Signed-off-by: Ankit Sinha --- 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 =3D EFI_ACPI_4_0_LOCAL_APIC_NMI; LocalApciNmiStruct.Length =3D sizeof (EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCT= URE); LocalApciNmiStruct.AcpiProcessorId =3D 0xFF; // Applies to all proc= essors - LocalApciNmiStruct.Flags =3D 0x000D; // Flags - Level-tigge= red, Active High + LocalApciNmiStruct.Flags =3D 0x0005; // Flags - Edge-tigger= ed, 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_ST= RUCTURE); - LocalX2ApicNmiStruct.Flags =3D 0x000D; // Flags - Level-= 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 - Leve= l-tiggered, Active High + LocalX2ApicNmiStruct.AcpiProcessorUid =3D 0xFFFFFFFF; // Applies to a= ll 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", St= atus)); - 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 en= umerated so far // - McfgTable->Header.Length =3D (UINT32)(sizeof (EFI_ACPI_MEMORY_MAPPED_CON= FIGURATION_BASE_ADDRESS_TABLE_HEADER) +=20 + McfgTable->Header.Length =3D (UINT32)(sizeof=20 + (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER) + sizeof (EFI_ACPI_MEMORY_MAPPED_ENHAN= CED_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_GENERA= L_CAPABILITIES_ID_OFFSET + 4); HpetCapabilities.Uint64 |=3D LShiftU64 (HpetCapabilitiesData, 32); - HpetBlockId.Bits.Revision =3D HpetCapabilities.Bits.Revision; - HpetBlockId.Bits.NumberOfTimers =3D HpetCapabilities.Bits.NumberOfTime= rs; - HpetBlockId.Bits.CounterSize =3D HpetCapabilities.Bits.CounterSize; - HpetBlockId.Bits.Reserved =3D 0; - HpetBlockId.Bits.LegacyRoute =3D HpetCapabilities.Bits.LegacyRoute; + HpetBlockId.Bits.Revision =3D HpetCapabilities.Bits.Revision; + HpetBlockId.Bits.NumberOfTimers =3D HpetCapabilities.Bits.NumberOfTime= rs; + HpetBlockId.Bits.CounterSize =3D HpetCapabilities.Bits.CounterSize; + HpetBlockId.Bits.Reserved =3D 0; + HpetBlockId.Bits.LegacyRoute =3D HpetCapabilities.Bits.LegacyRoute; HpetBlockId.Bits.VendorId =3D HpetCapabilities.Bits.VendorId; HpetTable->EventTimerBlockId =3D HpetBlockId.Uint32; HpetTable->MainCounterMinimumClockTickInPeriodicMode =3D (UINT16)HpetC= apabilities.Bits.CounterClockPeriod; @@ -1466,7 +1468,7 @@ UpdateLocalTable ( =20 for (Index =3D 0; Index < sizeof(mLocalTable)/sizeof(mLocalTable[0]); In= dex++) { CurrentTable =3D mLocalTable[Index]; - =20 + PlatformUpdateTables (CurrentTable, &Version); =20 TableHandle =3D 0; -- 2.16.2.windows.1