Same with 1/2 patch, please extend copyright. With above update, Reviewed-by: Chasel Chiu <[email protected]>
> -----Original Message----- > From: Zhang, Shenglei > Sent: Monday, September 2, 2019 8:30 PM > To: [email protected] > Cc: Kubacki, Michael A <[email protected]>; Chiu, Chasel > <[email protected]>; Desimone, Nathaniel L > <[email protected]>; Gao, Liming <[email protected]> > Subject: [PATCH 2/2] MinPlatformPkg/AcpiTables: Add error handling to > SortCpuLocalApicInTable > > Change ASSERT_EFI_ERROR to return value when the "if" statement is true. > As a result, when SortCpuLocalApicInTable is called, error handling is > needed. So add "if" statement to judge the returned Status from > SortCpuLocalApicInTable () in function InstallMadtFromScratch(). > > Cc: Michael Kubacki <[email protected]> > Cc: Chasel Chiu <[email protected]> > Cc: Nate DeSimone <[email protected]> > Cc: Liming Gao <[email protected]> > Signed-off-by: Shenglei Zhang <[email protected]> > --- > .../Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > index 85d1bd9a..dc68dfaa 100644 > --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c > @@ -354,7 +354,7 @@ SortCpuLocalApicInTable ( > > if(MAX_CPU_NUM <= Index) { > DEBUG ((EFI_D_ERROR, "Asserting the SortCpuLocalApicInTable > Index Bufferflow\n")); > - ASSERT_EFI_ERROR(EFI_INVALID_PARAMETER); > + return EFI_INVALID_PARAMETER; > } > > TempVal = mCpuApicIdOrderTable[Index].ApicId; > @@ -874,7 +874,11 @@ InstallMadtFromScratch ( > DetectApicIdMap(); > > // Call for Local APIC ID Reorder > - SortCpuLocalApicInTable (); > + Status = SortCpuLocalApicInTable (); > + if (EFI_ERROR (Status)) { > + DEBUG ((EFI_D_ERROR, "SortCpuLocalApicInTable failed: %r\n", > Status)); > + goto Done; > + } > > MaxMadtStructCount = (UINT32) ( > MAX_CPU_NUM + // processor local APIC structures > -- > 2.18.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46675): https://edk2.groups.io/g/devel/message/46675 Mute This Topic: https://groups.io/mt/33110579/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
