From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0087.outbound.protection.outlook.com [104.47.37.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8556E21E87986 for ; Fri, 15 Sep 2017 01:41:11 -0700 (PDT) Received: from MWHPR03CA0002.namprd03.prod.outlook.com (10.175.133.140) by BN6PR03MB2692.namprd03.prod.outlook.com (10.173.144.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Fri, 15 Sep 2017 08:44:09 +0000 Received: from BN1AFFO11FD029.protection.gbl (2a01:111:f400:7c10::138) by MWHPR03CA0002.outlook.office365.com (2603:10b6:300:117::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Fri, 15 Sep 2017 08:44:09 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD029.mail.protection.outlook.com (10.58.52.184) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11 via Frontend Transport; Fri, 15 Sep 2017 08:44:08 +0000 Received: from uefi-OptiPlex-790.ap.freescale.net (uefi-OptiPlex-790.ap.freescale.net [10.232.132.78]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8F8i5ko016820; Fri, 15 Sep 2017 01:44:06 -0700 From: Meenakshi Aggarwal To: , , Date: Fri, 15 Sep 2017 20:02:34 +0530 Message-ID: <1505485954-24345-1-git-send-email-meenakshi.aggarwal@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131499386486476738; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7966004)(336005)(39380400002)(39860400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(47776003)(104016004)(5003940100001)(305945005)(5660300001)(77096006)(36756003)(85426001)(6666003)(50226002)(86362001)(16586007)(2201001)(50466002)(8936002)(105606002)(106466001)(189998001)(8656003)(4326008)(498600001)(2906002)(81166006)(48376002)(81156014)(53936002)(97736004)(316002)(54906002)(33646002)(50986999)(68736007)(356003)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2692; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD029; 1:nyYnMWgBSbQMiG7WxA9rId6l8VjlEqZZS+eu71Y4kOaRvQ8Ug7bqkRQQCLLFrFmhl+R2H4MptE7rgKXHWTPFY0K78N1Wjjeeglvo985tZWjq8JNfKHB6O4P5hSSsaSLN MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b48bbf45-90fb-40db-ee61-08d4fc15ee29 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR03MB2692; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2692; 3:a1ZstO0ehtndd6uNoSntUT+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BKU/rhhNYN+lv02/7m1JY2sY+TudjvjOr/rtIwq6UybB/Yyq0o8JZYSjXLF3F1P7NmtV5XCbeyE3jSGUCrd1wN4SSxD8Ql6BDHphS7kpP+FHOW74m9SG1Bg4TJ3hNmP60R5HC3CDSHC01aeAZ+1DuLR134z19y5WllEMzpD3zNpQ+TyRXJ1oR0DShk1/mk1KEd0lvCs1sJsomw= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123556025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(20161123563025)(20161123559100)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR03MB2692; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR03MB2692; X-Forefront-PRVS: 0431F981D8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2692; 23:85JJYXavqaKN1dtq7+L/j4B6zh2TfAJBlo6SDpBLm?= =?us-ascii?Q?84C/zpB2RqlPvHXuGGxuASnpXCAgU81DqXVGnWZN2yhdEp+Xa0zWhilSLz8N?= =?us-ascii?Q?Bq9M0jEU49ESQ2vCdAWdZoYQQrXvxqehk9Y3+g2bB+wMNI0mhzfBMv89Qj/6?= =?us-ascii?Q?kC4xX6Y+bxLUlMzVNRNVL2EAOySsszDuPCSB8L2RYO3MLII/7kMGrYQuTNHN?= =?us-ascii?Q?SSmqNh9dGH7PZ3kJx+PhYKq9f6hytqdrxlcVjR7NEoyIEq9Sn/Uyw6+23iJZ?= =?us-ascii?Q?t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03MB2692; 6:ZsQcVQU3lvYdox1C1CZdeFrw3b7h+yDNv4ANP/OPZ03xp8ldn/Iy8EXDrtVl+CUVlUYYn5b8mqYFu7YMekGz5yM21uiDwlrnGU3Bmhk8gKrpxEirT+kJZ3I5ZnM27jR9kH4SAJUDe/DA7hZqFY68T8cTljnuNC6ziq9sJpzv2fE4QayTpSVaE+iIn41AOUmGYnLfw+R/C1cCrC4k+A6HiEsx0mOrSol0z2ZDXOJVmS6ZHp/rDE5ODgRMRmEaExlKXUQ28ZUrNzD6Do+BbvkwEmegL8JA79+LyfSWf2KKz+Cz3emvDjbOs/FNGsfP23Zj9f2G+3zLxeMUnrQ1+M3Hdw==; 5:sFRcDFStpugunV8gBgYEBCLczKscWj4YoFJg7nep8WDMqVoqlXGmExWHwzwFdpyq6azFLkn7OvaEUhPJ3wRFtcofw9Nrt3Vd09tc4Xl6fFR3gF1/pLS3QAzUgJf8NglMxBGXNPNaf8qE/9s+opMQYg==; 24:10boQ1YafaCVNJz29wPxlu+aFxeU7WcUT7eVBrlCwS+AYo5QmKR6dgEu5CPTLPIpb04AAADPjBr/oUqcAA7I1bHawLjVLnUEXwcIKOpsGck=; 7:eCQ4E1jf5uHlCQq9fnRto1offwCqQDVtUHlY6hYxbW+mhSIyLl1jQXKDnC1rbhFS2Th6FDe8VT7sp7DZ6gx5Syd/wmQvMh+X51ixVJZpbF+7nXUniQ6hOZinWcxkZcCDiALVJoHJbCUP5EpDGqom9kGh2Q/vci8jXDZiDuwksTydXmRWjoYRu6a2pcIi7jC/KL3xiZ3EY64FFeQJQ9TAg+44ATp7Tr6JFVdgK9pu+38= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2017 08:44:08.4604 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2692 Subject: [PATCH] RFC Inform UEFI memory to Linux X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 08:41:11 -0000 Content-Type: text/plain From: Udit Kumar While creating Hob list, ArmPlatformPkg is hiding UEFI memory. whereas this memory can be used by OS. This patch, allows OS to use UEFI code area. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal Signed-off-by: Udit Kumar --- ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c | 28 ++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c index 2feb11f..ae6ebc4 100644 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c @@ -147,24 +147,24 @@ MemoryPeim ( if (PcdGet64 (PcdFdBaseAddress) == NextHob.ResourceDescriptor->PhysicalStart) { if (SystemMemoryTop == FdTop) { NextHob.ResourceDescriptor->ResourceAttribute = ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT; - } else { - // Create the System Memory HOB for the firmware with the non-present attribute - BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, - ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT, - PcdGet64 (PcdFdBaseAddress), - PcdGet32 (PcdFdSize)); - + } else { + // Create the System Memory HOB for the firmware with the non-present attribute + BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, + ResourceAttributes, + PcdGet64 (PcdFdBaseAddress), + PcdGet32 (PcdFdSize)); + // Top of the FD is system memory available for UEFI NextHob.ResourceDescriptor->PhysicalStart += PcdGet32(PcdFdSize); NextHob.ResourceDescriptor->ResourceLength -= PcdGet32(PcdFdSize); } - } else { - // Create the System Memory HOB for the firmware with the non-present attribute - BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, - ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT, - PcdGet64 (PcdFdBaseAddress), - PcdGet32 (PcdFdSize)); - + } else { + // Create the System Memory HOB for the firmware with the non-present attribute + BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, + ResourceAttributes, + PcdGet64 (PcdFdBaseAddress), + PcdGet32 (PcdFdSize)); + // Update the HOB NextHob.ResourceDescriptor->ResourceLength = PcdGet64 (PcdFdBaseAddress) - NextHob.ResourceDescriptor->PhysicalStart; -- 1.9.1