From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.6877.1604019717533056247 for ; Thu, 29 Oct 2020 18:01:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 30 Oct 2020 09:01:41 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Dandan Bi'" , "'Jian J Wang'" , "'Hao A Wu'" , "'Sami Mujawar'" , "'Laszlo Ersek'" , "'Leif Lindholm'" References: <20201028194226.21556-1-ard.biesheuvel@arm.com> In-Reply-To: <20201028194226.21556-1-ard.biesheuvel@arm.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIHYyIDAvM10gTWRlTW9kdWxlUGtnOiB1c2UgcG9vbCBhbGxvY2F0aW9ucyBmb3IgQUNQSSB0YWJsZXM=?= Date: Fri, 30 Oct 2020 09:01:48 +0800 Message-ID: <004201d6ae58$3ec7e0d0$bc57a270$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKrIUxlmUQOH22t5m/ljcJetEKrzKgGbd5Q Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+66710+4905953+8761045@groups.io > =B4=FA=B1=ED Ard > Biesheuvel > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA10=D4=C229=C8=D5 3:42 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Ard Biesheuvel ; Dandan Bi > ; Liming Gao ; Jian J > Wang ; Hao A Wu ; Sami > Mujawar ; Laszlo Ersek ; > Leif Lindholm > =D6=F7=CC=E2: [edk2-devel] [PATCH v2 0/3] MdeModulePkg: use pool allocat= ions for > ACPI tables >=20 > Currently, the AcpiTableDxe memory allocator uses page based allocations= , > for which the only reason seems to be that it permits the use of a memor= y > limit, which is necessary for ACPI 1.0 tables that need to reside in the > first 4 GB of memory. >=20 > That requirement does not exist on AArch64, and since page based allocations > are rounded up to 64 KB multiples, this wastes some memory in a way that > can easily be avoided. So let's use the existing 'mAcpiTableAllocType' > policy variable, and switch to pool allocations if it is set to > 'AllocateAnyPages' >=20 > Changes since v1: > - incorporate Laszlo's review feedback > . update description of EFI_ACPI_TABLE_LIST struct > . avoid EFI_PHYSICAL_ADDRESS to VOID* conversion in case > AllocatePages() > returns an error > . put closing ) on a line by itself when using the non-condensed forma= t > for passing function call arguments. > . fix error in comment text >=20 > Example output from Linux booting on ArmVirtQemu: >=20 > Before: > ACPI: RSDP 0x0000000078510000 000024 (v02 BOCHS ) > ACPI: XSDT 0x0000000078500000 00004C (v01 BOCHS BXPCFACP > 00000001 01000013) > ACPI: FACP 0x00000000784C0000 00010C (v05 BOCHS BXPCFACP > 00000001 BXPC 00000001) > ACPI: DSDT 0x00000000784D0000 0014BB (v02 BOCHS BXPCDSDT > 00000001 BXPC 00000001) > ACPI: APIC 0x00000000784B0000 0000A8 (v03 BOCHS BXPCAPIC > 00000001 BXPC 00000001) > ACPI: GTDT 0x00000000784A0000 000060 (v02 BOCHS BXPCGTDT > 00000001 BXPC 00000001) > ACPI: MCFG 0x0000000078490000 00003C (v01 BOCHS BXPCMCFG > 00000001 BXPC 00000001) > ACPI: SPCR 0x0000000078480000 000050 (v02 BOCHS BXPCSPCR > 00000001 BXPC 00000001) >=20 > After: > ACPI: RSDP 0x000000007C030018 000024 (v02 BOCHS ) > ACPI: XSDT 0x000000007C03FE98 00004C (v01 BOCHS BXPCFACP > 00000001 01000013) > ACPI: FACP 0x000000007C03FA98 00010C (v05 BOCHS BXPCFACP > 00000001 BXPC 00000001) > ACPI: DSDT 0x000000007C037518 0014BB (v02 BOCHS BXPCDSDT > 00000001 BXPC 00000001) > ACPI: APIC 0x000000007C03FC18 0000A8 (v03 BOCHS BXPCAPIC > 00000001 BXPC 00000001) > ACPI: GTDT 0x000000007C03FD18 000060 (v02 BOCHS BXPCGTDT > 00000001 BXPC 00000001) > ACPI: MCFG 0x000000007C03FE18 00003C (v01 BOCHS BXPCMCFG > 00000001 BXPC 00000001) > ACPI: SPCR 0x000000007C03FF98 000050 (v02 BOCHS BXPCSPCR > 00000001 BXPC 00000001) >=20 > Cc: Dandan Bi > Cc: Liming Gao > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Sami Mujawar > Cc: Laszlo Ersek > Cc: Leif Lindholm >=20 > Ard Biesheuvel (3): > MdeModulePkg/AcpiTableDxe: use pool allocations when possible > MdeModulePkg/AcpiTableDxe: use pool allocation for RSDT/XSDT if > possible > MdeModulePkg/AcpiTableDxe: use pool allocation for RSDP if possible >=20 > .../Universal/Acpi/AcpiTableDxe/AcpiTable.h | 11 +- > .../Universal/Acpi/AcpiTableDxe/AcpiSdt.c | 4 +- > .../Acpi/AcpiTableDxe/AcpiTableProtocol.c | 230 ++++++++++++------ > 3 files changed, 162 insertions(+), 83 deletions(-) >=20 > -- > 2.17.1 >=20 >=20 >=20 >=20 >=20