From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.5117.1603070899767378499 for ; Sun, 18 Oct 2020 18:28:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=PtyDHDvO; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: hao.a.wu@intel.com) IronPort-SDR: X9mFuia4oVLjN9QiZxqEkXhgUcDiNhvgeMekd2XYn2Y3oFxfvQZYokPZaRd9TndyGV8HUXMgg+ 2w474OwmHpDw== X-IronPort-AV: E=McAfee;i="6000,8403,9778"; a="146809786" X-IronPort-AV: E=Sophos;i="5.77,392,1596524400"; d="scan'208";a="146809786" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2020 18:28:18 -0700 IronPort-SDR: v1wntdJdKg7kJ1VIkoXVvl3QeIa+JyKcWUeoz61HWuQ0hDUWJpUQdsRuVsCb+S8IuByDpvk7MJ m9KyD3xLbi6Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,392,1596524400"; d="scan'208";a="522935334" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga005.fm.intel.com with ESMTP; 18 Oct 2020 18:28:16 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 18 Oct 2020 18:28:15 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 18 Oct 2020 18:28:15 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.40) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sun, 18 Oct 2020 18:28:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1VbEF1bBr3NIH2fac/WTymkjgG6ALiejFvBhgKVjtl+P/MSwAqXu3A3L42qzknoBZclZKXQjYRsQdvfdOZ16oz1odSqAFcutrToWltU6ckZlj86rFxVKk7YD3Kz2lsguHZJMy3XV8m8oFff5RozbzSvFxWYIw51SycQhDkX6JhOchhwOauz4BB1fbZaWM4rboegAeSwbBZMR2vum617bn8ZwzQVLbn9niYBmF6tMUbS7AiLqJ7nohaOuvnu8s3gW5O8LRCCX+4pVNHvh9g5dVRAAZWOEAyq4lIzpLggO5ta+tifJdkrS9oQoK7P35uNs/IQVUUkZfLi4x0XntP7hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xm6M/rUrM5WOvqctMhjvRnLQ8ovhYNmExOkJknffAW0=; b=dOmiP58PFSsBQ2a2hTG0+OIB+zi48sImin0LFFL3XF02eqri2VixcA4HBlB1i2sJmEAMx0yDEjeXoI9X0rvG/OG1aKovX9qHQNoN1AUBtf0ZNeCpkxcBaQzg2GO1Pzlug5WdfB+Hfwb8rsaAlDr4gv2O6z1fJKgaCDZKPlJNDUWtIOy0NKTIRNQe8mu3LvhcFkVzUG4rDsVWbbJIDPB5/DYFyFaf9zi6S1CQ6EcKAib1ZhIlhdiZ++07v4W6v/KLg0V9GheGw++jU4wIJamBwwtrTsdKR7VBrIn4ySjB1EFCBOh/q+H1CvXzLTQ4G4rA5fEvNN0qyWB6NxXTr+7qpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xm6M/rUrM5WOvqctMhjvRnLQ8ovhYNmExOkJknffAW0=; b=PtyDHDvOvwSRx/JONZ1iLrqV7aJ2d20M1N34zTKLt9pL2J7/JHwQ5hJP1cNMHKWJ6k1OVawiWswZ+4bP4PZ8a2QJAdSUK/fBSsu2zG4iV1GB/b7ICgIr9UivQXLx5DRGC7HzAs9EM4BNN3soUWIhDFn8YR5aKHOd7/u6tE0wKWU= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR11MB1714.namprd11.prod.outlook.com (2603:10b6:404:47::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.24; Mon, 19 Oct 2020 01:28:12 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::c123:faac:1da3:f807]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::c123:faac:1da3:f807%5]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 01:28:12 +0000 From: "Wu, Hao A" To: "Liming Gao (Byosoft address)" CC: "devel@edk2.groups.io" , "ard.biesheuvel@arm.com" Subject: FW: [PATCH 0/3] MdeModulePkg: use pool allocations for ACPI tables Thread-Topic: [PATCH 0/3] MdeModulePkg: use pool allocations for ACPI tables Thread-Index: AQHWo9QAsAIBt1sR30WLLu+N1pT/vameJhaQ Date: Mon, 19 Oct 2020 01:28:11 +0000 Message-ID: References: <20201016154923.21260-1-ard.biesheuvel@arm.com> In-Reply-To: <20201016154923.21260-1-ard.biesheuvel@arm.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: byosoft.com.cn; dkim=none (message not signed) header.d=none;byosoft.com.cn; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c67bb3d5-68b4-4096-f2d3-08d873ce3e6f x-ms-traffictypediagnostic: BN6PR11MB1714: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: r/RVz464u0azko6X/XNpk/O/CJgQjEZ0HToX2b2NL++RRLRiRUQGN+w3iuF+n1d78JTZJUzWksqkV1lMGEHu1IatjiBuneShGi2S3zB5CQbsZB8auTmdGJFfIrFBb6WRIHVPY4usJYJThuwXdunFYAesTnyihJX1IVKD/1BolUUnOUtHsvhM2gSCTIurszJ7wFfF7HqxwqXFeFfSvG9CAJrwsFtM/tip2DUByFQFoBAx3MP/NOTMQPtMcyTRpX42xmk1e0J6wk8deu/nMIDxvXzSnr4FNcx3KH5+5H9XNgSXwpikyfb9j84zkYDOJsc3 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(346002)(136003)(39860400002)(376002)(2906002)(55016002)(83380400001)(86362001)(8936002)(9686003)(316002)(478600001)(54906003)(71200400001)(8676002)(4326008)(76116006)(52536014)(66476007)(66946007)(66446008)(64756008)(66556008)(6506007)(53546011)(26005)(33656002)(186003)(7696005)(6916009)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: E20B41o5GMWvKgUirSfTI4a3JPSha2j5kTfKAtfpEvhCK0HrRI2Y4TqUquZ6phwsL/s8vhxdx38dkMro4nRJs0yOPCUfpXVKUarb5Htqe/z+VpcLGMKqlOUv9bFtvmwIFrd8YtY8ik/idIgMtAH7jTivOLBXhH0Dsx309f/3dTmzpOixqCpDH9XUcjSYSqLTBn/svRYE7w9ImSJdaLBb5jO9UKFU5WPtttdk+YrTo5tJMZp8V4ARxsv40J2ME9pQrTBHda4j/5ONZxCyP5GkX5RFAjzM6tBoUZgUxX8MVjsy7MU7cPTiD0rEb/NN3wsTILFQoDm156WUffG5sfj/H7hJbGffPbJcz1loQa8j2Ixq8ez02ijCbAJ8Z+0WAiaMnWBkBPV8IOh5EI8mPlvP0uWxVWqHQAnm3EabUpDy7g92dok1gpAJR7dwKODqzSkj1YR43m9ad1owrgGzFV8cYjWxSzrpGnnOKX1NgjFsWUF8cdhDu6SJf0tGHvdKNZPjF9h1paczQTg5krDQtvAMyMKR243E5tAFSNb2L4NOmqdIBCb0ds9rWX34BokxgCKGe7Ad1OBX4qw7QYupfneOT0TqKW9hxcWRU1ebyT06ehn/8VdXrtQz4F9lTQHqyygIR8t1gwkuywGPwqFp5Xl9QQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c67bb3d5-68b4-4096-f2d3-08d873ce3e6f X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2020 01:28:11.9517 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4zZjcUA7SnU9S9NW51BKZy3pRypGEkRdd7TzUfn/5zsDEF/ER2yWYt5NaBo/DCRRdxxgpm2RaJXLylseT60xew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1714 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Forward to Liming's latest mail address. Best Regards, Hao Wu -----Original Message----- From: Ard Biesheuvel =20 Sent: Friday, October 16, 2020 11:49 PM To: devel@edk2.groups.io Cc: Ard Biesheuvel ; Bi, Dandan ; Liming Gao ; Wang, Jian J ; Wu, Hao A ; Sami Mujawar ; = Laszlo Ersek ; Leif Lindholm Subject: [PATCH 0/3] MdeModulePkg: use pool allocations for ACPI tables Currently, the AcpiTableDxe memory allocator uses page based allocations, f= or which the only reason seems to be that it permits the use of a memory li= mit, which is necessary for ACPI 1.0 tables that need to reside in the firs= t 4 GB of memory. That requirement does not exist on AArch64, and since page based allocation= s 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 'AllocateAn= yPages' Example output from Linux booting on ArmVirtQemu: Before: ACPI: RSDP 0x0000000078510000 000024 (v02 BOCHS ) ACPI: XSDT 0x0000000078500000 00004C (v01 BOCHS BXPCFACP 00000001 01= 000013) ACPI: FACP 0x00000000784C0000 00010C (v05 BOCHS BXPCFACP 00000001 BXPC 00= 000001) ACPI: DSDT 0x00000000784D0000 0014BB (v02 BOCHS BXPCDSDT 00000001 BXPC 00= 000001) ACPI: APIC 0x00000000784B0000 0000A8 (v03 BOCHS BXPCAPIC 00000001 BXPC 00= 000001) ACPI: GTDT 0x00000000784A0000 000060 (v02 BOCHS BXPCGTDT 00000001 BXPC 00= 000001) ACPI: MCFG 0x0000000078490000 00003C (v01 BOCHS BXPCMCFG 00000001 BXPC 00= 000001) ACPI: SPCR 0x0000000078480000 000050 (v02 BOCHS BXPCSPCR 00000001 BXPC 00= 000001) After: ACPI: RSDP 0x000000007C030018 000024 (v02 BOCHS ) ACPI: XSDT 0x000000007C03FE98 00004C (v01 BOCHS BXPCFACP 00000001 01= 000013) ACPI: FACP 0x000000007C03FA98 00010C (v05 BOCHS BXPCFACP 00000001 BXPC 00= 000001) ACPI: DSDT 0x000000007C037518 0014BB (v02 BOCHS BXPCDSDT 00000001 BXPC 00= 000001) ACPI: APIC 0x000000007C03FC18 0000A8 (v03 BOCHS BXPCAPIC 00000001 BXPC 00= 000001) ACPI: GTDT 0x000000007C03FD18 000060 (v02 BOCHS BXPCGTDT 00000001 BXPC 00= 000001) ACPI: MCFG 0x000000007C03FE18 00003C (v01 BOCHS BXPCMCFG 00000001 BXPC 00= 000001) ACPI: SPCR 0x000000007C03FF98 000050 (v02 BOCHS BXPCSPCR 00000001 BXPC 00= 000001) Cc: Dandan Bi Cc: Liming Gao Cc: Jian J Wang Cc: Hao A Wu Cc: Sami Mujawar Cc: Laszlo Ersek Cc: Leif Lindholm 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 .../Universal/Acpi/AcpiTableDxe/AcpiTable.h | 4 +- .../Universal/Acpi/AcpiTableDxe/AcpiSdt.c | 4 +- .../Acpi/AcpiTableDxe/AcpiTableProtocol.c | 216 +++++++++++------- 3 files changed, 143 insertions(+), 81 deletions(-) -- 2.17.1