From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.896.1610628803868847800 for ; Thu, 14 Jan 2021 04:53:24 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 709FE1FB; Thu, 14 Jan 2021 04:53:23 -0800 (PST) Received: from [192.168.1.81] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7E8B43F719; Thu, 14 Jan 2021 04:53:22 -0800 (PST) Subject: Re: [PATCH 3/3] OvmfPkg/CpuS3DataDxe: do not allocate useless register tables To: Laszlo Ersek , devel@edk2.groups.io Cc: Jordan Justen , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= References: <20210112191934.12459-1-lersek@redhat.com> <20210112191934.12459-4-lersek@redhat.com> From: "Ard Biesheuvel" Autocrypt: addr=ard.biesheuvel@arm.com; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkZFS2xnWUJFQURa cnFjY1c0SStpaFBqNHhxYmI0eng5OHNFNTVXSGt5ME82dTRBc1c0RDZyQy9HdnFiCjRlQ2JG KzVEdzViSm5rbWp0dWQ0c0Z1NWl0Mkg4RHJ0NGh5V3pPVkh0NmJzckJFc3FCY1ZjZEdSV3FP dk93UVEKNExPbDhiY1U5cHd2dUZ1ZklaLzkvZDNiNS80RmFUek1DQnpWMWtvQm1aaXNBVlRM VWNQOVVJUklTa25hNjREVwo4TVFXUU1OeDR5S3hQYU5QRXVzd1Z2c3RwUi81Ri9Sa2N2SjhL QVZ3ZTVmVUxMNHdFdy8raXhlcWFOV3M3b09LCkQvQjREYUltWXRCSmdsVmh0OUxNTU1qU1NS Kz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kJkMXF4dTJ0NlBOWHdOaEdJWXR3TEJweWdSRUpz WVJBNGFrdCtLTmQ5Cjh6djNjUVRUbXhUYTgyNjVnbUJ6RHN4MitwSUdOUFZKa0xoMm1NU3pz VUQ3ZDhZQkdJV3BmVStxczFNK2k1dzQKdHhNbVA0a2lXaVozdW55ay9IRWpRL2VnMHZiSmho OFU5UW4yMTI2dWkwOGs1SHdFbEUvUlgzQk5ORlUwRHhKVQo5ZzBVWUZEeHVxeURQMEpWS1ZV ZVVrSXVLMVVaQStOWWI0RnlnaTZjNnpXSmwrd1d5TnhHMmFGOGhRS3JxUlhzClNvMUpFTG1U VmJaQ1lhTTlaQTNLbC96eDNDczFkZ210QlZFRTErditXVmUzeDhxWG5jcU1qK1VDOW1aemFh YVIKSC8xT2IzTHprL29ndVpIdDBBZmZhV1hvTXY3SjhuZDNHa29GbmxQZ1RYdm9ETStmRXpC Y1ZzSXl6dVVaRDhxQgpiRTI4MUlUdHlJSHh2TjJBN0FoaE9DZmdlV0FRUEJneHJXWGZxajhr K2pHRU9rUjN4ck80Qy9OK1hPRGVKRmlQClNCalpOR1VEL2tEdFBPTDNjUVR4dFhOV0JXT2hv Vjh5SE1abTlhWTNSNE9oR1BDNU5vZ0V1Q3JZeFN3UXZYZ0IKdHptQmxTZlc5UGtiWTZvY3dO UVRDdk5URjU4NUd1YlJvWFNwWDV1ODZZeUEySjRlSjBhUHhjSUJpcnBTWDQ0MQpUSzZtOEgx d0Zxaz0KPXpEZFAKLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxPQ0stLS0tLQo= Message-ID: Date: Thu, 14 Jan 2021 13:53:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210112191934.12459-4-lersek@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 1/12/21 8:19 PM, Laszlo Ersek wrote: > CpuS3DataDxe allocates the "RegisterTable" and "PreSmmInitRegisterTable= " > arrays in ACPI_CPU_DATA just so every processor in the system can have = its > own empty register table, matched by APIC ID. This has never been usefu= l > in practice. >=20 > Given commit e992cc3f4859 ("UefiCpuPkg PiSmmCpuDxeSmm: Reduce SMRAM > consumption in CpuS3.c", 2021-01-11), simply leave both > "AcpiCpuData->RegisterTable" and "AcpiCpuData->PreSmmInitRegisterTable" > initialized to the zero address. This simplifies the driver, and saves > both normal RAM (boot services data type memory) and -- in PiSmmCpuDxeS= mm > -- SMRAM. >=20 > (This simplification backs out a good chunk of commit 1158fc8e2c7b > ("OvmfPkg/CpuS3DataDxe: enable S3 resume after CPU hotplug", 2020-03-04= ). > But CpuS3DataDxe still differs between UefiCpuPkg and OvmfPkg, due to t= he > latter supporting CPU hotplug; thus, we can't remove OvmfPkg/CpuS3DataD= xe > altogether.) >=20 > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Philippe Mathieu-Daud=C3=A9 > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3159 > Signed-off-by: Laszlo Ersek Acked-by: Ard Biesheuvel > --- > OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf | 1 - > OvmfPkg/CpuS3DataDxe/CpuS3Data.c | 70 +------------------- > 2 files changed, 1 insertion(+), 70 deletions(-) >=20 > diff --git a/OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf b/OvmfPkg/CpuS3DataD= xe/CpuS3DataDxe.inf > index ceae1d4078c7..228d5ae1b260 100644 > --- a/OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf > +++ b/OvmfPkg/CpuS3DataDxe/CpuS3DataDxe.inf > @@ -42,7 +42,6 @@ [LibraryClasses] > BaseLib > BaseMemoryLib > DebugLib > - IoLib > MemoryAllocationLib > MtrrLib > UefiBootServicesTableLib > diff --git a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c b/OvmfPkg/CpuS3DataDxe/Cp= uS3Data.c > index bac7285aa2f3..5ffe1f3cd74e 100644 > --- a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c > +++ b/OvmfPkg/CpuS3DataDxe/CpuS3Data.c > @@ -23,7 +23,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > #include > -#include > #include > #include > #include > @@ -31,9 +30,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > =20 > -#include > -#include > - > // > // Data structure used to allocate ACPI_CPU_DATA and its supporting st= ructures > // > @@ -168,17 +164,12 @@ CpuS3DataInitialize ( > EFI_MP_SERVICES_PROTOCOL *MpServices; > UINTN NumberOfCpus; > VOID *Stack; > - UINTN TableSize; > - CPU_REGISTER_TABLE *RegisterTable; > - UINTN Index; > - EFI_PROCESSOR_INFORMATION ProcessorInfoBuffer; > UINTN GdtSize; > UINTN IdtSize; > VOID *Gdt; > VOID *Idt; > EFI_EVENT Event; > ACPI_CPU_DATA *OldAcpiCpuData; > - BOOLEAN FetchPossibleApicIds; > =20 > if (!PcdGetBool (PcdAcpiS3Enable)) { > return EFI_UNSUPPORTED; > @@ -193,13 +184,7 @@ CpuS3DataInitialize ( > ASSERT (AcpiCpuDataEx !=3D NULL); > AcpiCpuData =3D &AcpiCpuDataEx->AcpiCpuData; > =20 > - // > - // The "SMRAM at default SMBASE" feature guarantees that > - // QEMU_CPUHP_CMD_GET_ARCH_ID too is available. > - // > - FetchPossibleApicIds =3D PcdGetBool (PcdQ35SmramAtDefaultSmbase); > - > - if (FetchPossibleApicIds) { > + if (PcdGetBool (PcdQ35SmramAtDefaultSmbase)) { > NumberOfCpus =3D PcdGet32 (PcdCpuMaxLogicalProcessorNumber); > } else { > UINTN NumberOfEnabledProcessors; > @@ -271,59 +256,6 @@ CpuS3DataInitialize ( > AcpiCpuData->PreSmmInitRegisterTable =3D OldAcpiCpuData->PreSmmIni= tRegisterTable; > AcpiCpuData->ApLocation =3D OldAcpiCpuData->ApLocatio= n; > CopyMem (&AcpiCpuData->CpuStatus, &OldAcpiCpuData->CpuStatus, size= of (CPU_STATUS_INFORMATION)); > - } else { > - // > - // Allocate buffer for empty RegisterTable and PreSmmInitRegisterT= able for all CPUs > - // > - TableSize =3D 2 * NumberOfCpus * sizeof (CPU_REGISTER_TABLE); > - RegisterTable =3D (CPU_REGISTER_TABLE *)AllocateZeroPages (TableSi= ze); > - ASSERT (RegisterTable !=3D NULL); > - > - if (FetchPossibleApicIds) { > - // > - // Write a valid selector so that other hotplug registers can be > - // accessed. > - // > - IoWrite32 (ICH9_CPU_HOTPLUG_BASE + QEMU_CPUHP_W_CPU_SEL, 0); > - // > - // We'll be fetching the APIC IDs. > - // > - IoWrite8 (ICH9_CPU_HOTPLUG_BASE + QEMU_CPUHP_W_CMD, > - QEMU_CPUHP_CMD_GET_ARCH_ID); > - } > - for (Index =3D 0; Index < NumberOfCpus; Index++) { > - UINT32 InitialApicId; > - > - if (FetchPossibleApicIds) { > - IoWrite32 (ICH9_CPU_HOTPLUG_BASE + QEMU_CPUHP_W_CPU_SEL, > - (UINT32)Index); > - InitialApicId =3D IoRead32 ( > - ICH9_CPU_HOTPLUG_BASE + QEMU_CPUHP_RW_CMD_DA= TA); > - } else { > - Status =3D MpServices->GetProcessorInfo ( > - MpServices, > - Index, > - &ProcessorInfoBuffer > - ); > - ASSERT_EFI_ERROR (Status); > - InitialApicId =3D (UINT32)ProcessorInfoBuffer.ProcessorId; > - } > - > - DEBUG ((DEBUG_VERBOSE, "%a: Index=3D%05Lu ApicId=3D0x%08x\n", __= FUNCTION__, > - (UINT64)Index, InitialApicId)); > - > - RegisterTable[Index].InitialApicId =3D InitialApicId; > - RegisterTable[Index].TableLength =3D 0; > - RegisterTable[Index].AllocatedSize =3D 0; > - RegisterTable[Index].RegisterTableEntry =3D 0; > - > - RegisterTable[NumberOfCpus + Index].InitialApicId =3D Initi= alApicId; > - RegisterTable[NumberOfCpus + Index].TableLength =3D 0; > - RegisterTable[NumberOfCpus + Index].AllocatedSize =3D 0; > - RegisterTable[NumberOfCpus + Index].RegisterTableEntry =3D 0; > - } > - AcpiCpuData->RegisterTable =3D (EFI_PHYSICAL_ADDRESS)(UI= NTN)RegisterTable; > - AcpiCpuData->PreSmmInitRegisterTable =3D (EFI_PHYSICAL_ADDRESS)(UI= NTN)(RegisterTable + NumberOfCpus); > } > =20 > // >=20