From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.2438.1609876318208128309 for ; Tue, 05 Jan 2021 11:51:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Z98oPfzl; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: maurice.ma@intel.com) IronPort-SDR: Py7o1BLOdLC8CJCtlH9P8A/vyb3P3kNxGM9eRmU7QuZ42X2axToNYnBKcJi6GGRnjKE7atUslp iikZR5WN9Tng== X-IronPort-AV: E=McAfee;i="6000,8403,9855"; a="174593484" X-IronPort-AV: E=Sophos;i="5.78,477,1599548400"; d="scan'208";a="174593484" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 11:51:57 -0800 IronPort-SDR: OCYbCvXOZQBeltUAG1h7aVYhI4ZfrsDhmKROshGduHEpYiR+VOl9ciCd7uBoCbIeavOeKM2WkL ENebsSztIuFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,477,1599548400"; d="scan'208";a="361288333" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 05 Jan 2021 11:51:56 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 5 Jan 2021 11:51:55 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 5 Jan 2021 11:51:55 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 5 Jan 2021 11:51:55 -0800 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.58) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 5 Jan 2021 11:51:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xj9iNuRuFW3ppn6lpWcE1AyqU29IdIuZ32BtW7iEpYQXAua5R+JQm/+7HJ33jtVy0kQ5QeozcL6WfwzqwQWMnqIPoVsHUNdG5bTqnMl/cmRBT+UvYG7TKnsNwQe32eNI3zXUZBIjjNTeE1EXXVDbbOlP0/KnYoOzUDGhpRI79jh7TaYIwQcV9fqUyTWF2peFcgkGu9LRHxTCKe/DgEZWL6G+/wcAdlgg7a+7GrJuTB3cNZAfqbSfzKC554sXLIA5ayc9I+TtKcn9/Q4bWstOc5C+9XDJy+2IqMOVho9FXRrKslgeHadCE6PqwfGEbYD4H8ikKL2CtJJQOprZ3TRaXQ== 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=MyBfhvhhm3uaIavBgMt1HpOJuSZfLzZSygHzmsYd77U=; b=SeLH5uzTYV5GNM1tluGlQqjboyD/iplXjQFQXIA4oik6DJ5DDgeu1t8XwDWQqtMhczeZ5WmOGwzI9uMOuDUJGOxV+nl18Sqn2anTv8nCZeS4XmWpAyAjBvZvjg6Q3ehjTVn9N4hesIFNXy9zVYySJrU34iz/x9Gi0/r/+5sDxY9C9L5HGUpqMgSdBZga0GUUbq/faHgbPdu9SkZQ5EDTY4c8TbdEUAIrw95Ojd+frprgRGZHKALwjpoZC+KQ86Y+9BlHmhQo92ZDTCBD3JAyDKp39QIOU1ulv0xwvO5/zMGv9F2Kr03EgifPfRWhsJfN3uXhHr6cVEhnPlk8v3F2fw== 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=MyBfhvhhm3uaIavBgMt1HpOJuSZfLzZSygHzmsYd77U=; b=Z98oPfzl5n9l4CxRFzGzZCSThz55uj+M6im0rJUj6UaFR6QAfUEyRcFgFRCvwYtk8SU2DEvYAfYUrAcNdvcNBbGZcsPW4z5TAno9Tc8V0REJFOYZIrFszyxp+tR5byNW0hnqy7SKHq/2e0poeab9SLqb9CNJKKGA0M6ySqNAx5M= Received: from DM6PR11MB2793.namprd11.prod.outlook.com (2603:10b6:5:c0::29) by DM5PR11MB1882.namprd11.prod.outlook.com (2603:10b6:3:10a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Tue, 5 Jan 2021 19:51:53 +0000 Received: from DM6PR11MB2793.namprd11.prod.outlook.com ([fe80::19ca:d5c5:d1d4:a22f]) by DM6PR11MB2793.namprd11.prod.outlook.com ([fe80::19ca:d5c5:d1d4:a22f%6]) with mapi id 15.20.3721.024; Tue, 5 Jan 2021 19:51:53 +0000 From: "Ma, Maurice" To: "Dong, Guo" CC: "Dong, Eric" , "You, Benjamin" , "philipp.deppenwiese@9elements.com" , "devel@edk2.groups.io" Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Add memory type information HOB Thread-Topic: [edk2-devel] [PATCH] UefiPayloadPkg: Add memory type information HOB Thread-Index: AQHW2jcmr2Cg2SUN2ECgmRzNu0EplKoZg8kA Date: Tue, 5 Jan 2021 19:51:52 +0000 Message-ID: References: <20201224205537.20648-1-guo.dong@intel.com> In-Reply-To: <20201224205537.20648-1-guo.dong@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [104.153.200.60] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cad1e2b6-7149-4ec4-1f31-08d8b1b35967 x-ms-traffictypediagnostic: DM5PR11MB1882: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1850; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: siP6oL1wfrQ8hozloLPPMCUoFO8RzWhZa1nJZXJs6R1qj5Anrd733pIjvGjzSpcIk1yUr5GJbqLUUUwolXxLlUK8VMRIGyvD85v46uXD6CTNouZPixoM3lbjsDEvazDh4KgpMSSNvG4bo2Gqz38VsGJY4Kp2nHF0kgTt+i/Q6ByF4GVh0G7iZKvAQhb7vllLcgriKkzG3QckmVJMCEjKoBkfoBz6wucuVUboMBxm5JgPN040IUW1BHv/HiGfXZ5+zCG8AG9XmsjnvlBXaaa/lgnEtqGfdG0Kn+obb3zFllpL1jljMXCBsePKWocJPRJWPvg0XgDRrLKy3Csh/DR8biEqRhdqqYfVgLSMdsAzphpw4fPHLUT7RIRpx5/pAIfsv7VI+vpCxUiHxsXkUXfdJA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB2793.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(39860400002)(366004)(346002)(376002)(396003)(66446008)(53546011)(64756008)(66476007)(186003)(54906003)(478600001)(66556008)(2906002)(6506007)(55016002)(316002)(66946007)(33656002)(5660300002)(8936002)(71200400001)(86362001)(52536014)(4326008)(8676002)(9686003)(76116006)(26005)(83380400001)(6636002)(7696005)(6862004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?waKwxDlGVIUbPOTG4wVEG1WizQUD+4IUf+vJLIIQr6PlsNvoPHF/m8sgytU9?= =?us-ascii?Q?uX5V0SgXAxPQ++Pa5KHMCcHucUKGk7dENqXqUDxdlgAkvn3smi/PdAjJU0kP?= =?us-ascii?Q?16MEtxr0VxDH8f6yw8lFwpSJ6iHKRHA2pWdyaIa7oJrCdksjTt3YINRs+c9a?= =?us-ascii?Q?pMudPQ8YRtsPPhe++jghK4qNP2vItT/P4oZLc1yPPbg5jXknQxattE79u1NG?= =?us-ascii?Q?BQ8giCzr7fVAn/VJDm4v3JJdZzCi0lrJMCR63C9ZihUtlN5+Ax8VP8WwiyqB?= =?us-ascii?Q?DGJpGSTTikPvHngWcozpXLLGihqgMfoxkqlZGmUISC3sV65YmNCMzZs+G0vC?= =?us-ascii?Q?FiOdTz7PutYiijnqUSpjZWbP49QDZafGvqErQTEug+DgxnsoXb+9od+5V02/?= =?us-ascii?Q?h0bJXX9ZKjsq3ZtqGh6GULwTpwtSz069XrsbKf7ETyW8gHb3Qkv4IWnQwqhv?= =?us-ascii?Q?Hk/lw5wiIWoQqCfNZGG08dIp7DvA5HBhep8S2laeiTa02rF21MgDiAXM7XGj?= =?us-ascii?Q?Ank7NgTza2LJsRsYRHkXPF1u3XHzHZUGSye91z1dSDkJxjHVMsL5dLF1COvG?= =?us-ascii?Q?DcSQu/u3Itjcw/eYCaPruJlUczHtiIlZejZcXgf4B1nrEPFo7a1y9aznVuIJ?= =?us-ascii?Q?4pq+knagsT0vcy9Y5SQpRBQONm81QRIV4obmaKgc/gS344qC0rUdCoVc3DVR?= =?us-ascii?Q?D+s7/yxQBQZJo+uVqbDMh6/tox4M6QKd4wbide2qFus7xbs2127IqhIgnyq0?= =?us-ascii?Q?tNQrq5NUbMF28lCbXgv0VZiBqlGog1CZty4Cr4aJvHCJpFNytkofTXWXOLHc?= =?us-ascii?Q?uhnDPY9+lctKhRqriDWxCBILcMqEpck+ZJKEwjVE17pn8UBJQ0v9mAIl0LZX?= =?us-ascii?Q?Jul0bys0BIl6KS0sKQxeYjyO1P+TVyQNvYTxXMD3PvMmkKOb65x2ddLFE19u?= =?us-ascii?Q?ZQNYMLvSgabxCfHPvot73KLCyc6hXpG+q/C84/M0PPk=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2793.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cad1e2b6-7149-4ec4-1f31-08d8b1b35967 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jan 2021 19:51:52.8778 (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: jXKSAvd8r1ZQF7C2Ipg4j5eoQo/G9W53/PSOKOla0hl7yng/10Jkp0fpMV35lJOkB3oqdeE+5nGcOHsS4l3Svg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1882 Return-Path: maurice.ma@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Maurice Ma Regards Maurice > -----Original Message----- > From: Guo Dong > Sent: Thursday, December 24, 2020 12:56 > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ma, Maurice ; > You, Benjamin ; > philipp.deppenwiese@9elements.com > Subject: [edk2-devel] [PATCH] UefiPayloadPkg: Add memory type information > HOB >=20 > To avoid DXE drivers to be dispatched to memory above 4GB, this patch bui= ld > memory type information HOB in payload entry module. >=20 > Signed-off-by: Guo Dong > --- > UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c | 23 > ++++++++++++++++++----- > UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h | 1 + > UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf | 5 +++++ > 3 files changed, 24 insertions(+), 5 deletions(-) >=20 > diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > index 805f5448d9..5d8b9d1464 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c > @@ -7,6 +7,16 @@ >=20 > #include "UefiPayloadEntry.h" >=20 > + > +EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] =3D { > + { EfiACPIReclaimMemory, FixedPcdGet32 > (PcdMemoryTypeEfiACPIReclaimMemory) }, > + { EfiACPIMemoryNVS, FixedPcdGet32 > (PcdMemoryTypeEfiACPIMemoryNVS) }, > + { EfiReservedMemoryType, FixedPcdGet32 > +(PcdMemoryTypeEfiReservedMemoryType) }, > + { EfiRuntimeServicesData, FixedPcdGet32 > +(PcdMemoryTypeEfiRuntimeServicesData) }, > + { EfiRuntimeServicesCode, FixedPcdGet32 > (PcdMemoryTypeEfiRuntimeServicesCode) }, > + { EfiMaxMemoryType, 0 } > +}; > + > /** > Callback function to build resource descriptor HOB >=20 > @@ -40,11 +50,6 @@ MemInfoCallback ( > EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | > EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE; >=20 > - if (Base >=3D BASE_4GB ) { > - // Remove tested attribute to avoid DXE core to dispatch driver to m= emory > above 4GB > - Attribue &=3D ~EFI_RESOURCE_ATTRIBUTE_TESTED; > - } > - > BuildResourceDescriptorHob (Type, Attribue, (EFI_PHYSICAL_ADDRESS)Base= , > Size); > DEBUG ((DEBUG_INFO , "buildhob: base =3D 0x%lx, size =3D 0x%lx, type = =3D 0x%x\n", > Base, Size, Type)); >=20 > @@ -343,6 +348,14 @@ BuildGenericHob ( > BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_MAPPED_IO, > ResourceAttribute, 0xFEC80000, SIZE_512KB); > BuildMemoryAllocationHob ( 0xFEC80000, SIZE_512KB, > EfiMemoryMappedIO); >=20 > + // > + // Create Memory Type Information HOB // BuildGuidDataHob ( > + &gEfiMemoryTypeInformationGuid, > + mDefaultMemoryTypeInformation, > + sizeof(mDefaultMemoryTypeInformation) > + ); > } >=20 >=20 > diff --git a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > index 2c84d6ed53..57b03dffe9 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include >=20 >=20 > #define LEGACY_8259_MASK_REGISTER_MASTER 0x21 diff --git > a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf > b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf > index cc59f1903b..444d03b6d4 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf > +++ b/UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf > @@ -84,6 +84,11 @@ >=20 > gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemBase > gUefiPayloadPkgTokenSpaceGuid.PcdPayloadFdMemSize > + gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory > + gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS > + gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType > + gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData > + gUefiPayloadPkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode > gUefiPayloadPkgTokenSpaceGuid.PcdPayloadStackTop > gUefiPayloadPkgTokenSpaceGuid.PcdSystemMemoryUefiRegionSize >=20 > -- > 2.16.2.windows.1