From: "Kubacki, Michael A" <michael.a.kubacki@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Sinha, Ankit" <ankit.sinha@intel.com>
Cc: "Chiu, Chasel" <chasel.chiu@intel.com>,
"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v2 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered
Date: Wed, 4 Sep 2019 07:26:40 +0000 [thread overview]
Message-ID: <49AB4ACB9627B8468F29D589A27B745588AA04F8@ORSMSX121.amr.corp.intel.com> (raw)
In-Reply-To: <20190830222808.20308-1-ankit.sinha@intel.com>
This patch is not applying cleanly for me. Can you please check it against the current master branch?
error: patch failed: Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c:1329
error: Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c: patch does not apply
error: patch failed: Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c:1329
Applying patch Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c with 1 reject...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Rejected hunk #5.
Hunk #6 applied cleanly.
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sinha, Ankit
> Sent: Friday, August 30, 2019 3:28 PM
> 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 v2 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 | 54
> ++++++++++----------
> 1 file changed, 28 insertions(+), 26 deletions(-)
>
> diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> index 5eb727929bfb..1b251ca2962d 100644
> --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
> @@ -1,7 +1,7 @@
> /** @file
> ACPI Platform Driver
>
> -Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
> @@ -1049,7 +1049,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); @@ -1066,24 +1066,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;
> + }
> }
>
> //
> @@ -1167,7 +1169,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_HEAD
> ER) +
> + McfgTable->Header.Length = (UINT32)(sizeof
> +
> (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEAD
> ER) +
> sizeof
> (EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_AD
> DRESS_ALLOCATION_STRUCTURE) * SegmentCount);
>
> Segment = (VOID *)(McfgTable + 1);
> @@ -1329,11 +1331,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;
> @@ -1459,7 +1461,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
>
>
>
prev parent reply other threads:[~2019-09-04 7:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 22:28 [edk2-platforms] [PATCH v2 1/1] MinPlatformPkg/Acpi: MADT NMI default flag set to Edge-Triggered Sinha, Ankit
2019-09-02 14:16 ` Chiu, Chasel
2019-09-04 7:26 ` Kubacki, Michael A [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49AB4ACB9627B8468F29D589A27B745588AA04F8@ORSMSX121.amr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox