From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0626.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::626]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AD2F71A1DF5 for ; Thu, 11 Aug 2016 08:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YV0aNKKvujrBu+efN4eboXhhe096kh9Kwbw0fdFr30g=; b=UkcP0D+b11IJW96od7TCxhhkZVWUHqinFY13jvWgqnnLWAVH6N3ZCCSogn0MT8O5ROI2uztrI6eifhLow5UZEISzih9WSib7UcESZ7FQAS8rxFlpHoO1+NVzjvh40Mcx0IDIsbp4JVY8quL+4BQpb41xUbS24/JkElY/H2joz3c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; Received: from leduran-Precision-WorkStation-T5400.amd.com (165.204.77.1) by CY4PR12MB1239.namprd12.prod.outlook.com (10.168.167.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Thu, 11 Aug 2016 15:25:02 +0000 From: Leo Duran To: CC: , , Leo Duran Date: Thu, 11 Aug 2016 10:23:15 -0500 Message-ID: <1470928996-4545-1-git-send-email-leo.duran@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN1PR12CA0028.namprd12.prod.outlook.com (10.162.96.166) To CY4PR12MB1239.namprd12.prod.outlook.com (10.168.167.14) X-MS-Office365-Filtering-Correlation-Id: c9cb5de7-9261-4425-8809-08d3c1fbaa26 X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1239; 2:pu528OZUt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Z3as3k/QEvwdnSqcwaK3qAxfQ697VSfEf4nVc9ilaVweIjsynLRdoeOZLlAtEAaq6xtM0SDIQfYs= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1239; 31:8L134hDfUYy4agaATyDA2DtPEotbqf1MUIm3j6t4L5PI8TvoTlotpYAd0KtMMck3z7vJo75pQYSlspvCIh/x4XA2tpL5nUu9C4wpw65kTiIsK1rbgHtEXCEl/BNskERXLzFBMa4ZalOD5+ZfIQeOI6hFXgWKahYM7EmiE39HGD79168xLTWAS27FhbutJzrRsQSsy6ooZQF8mtSzBJou9nXoSnI3cHzOWkWMR+7KuNk=; 20:RgNGupIeREaFrhwSyr78dSG3GJMuzkSwVtNtrQuXeAdNuueNUbBQMfyIAuDzGeOr6W4WpQkTNb/RdKRLRRJko3svAPm6XM6lRcLXpw1VvnuwzdLshsGYlufmgsNhwWPfFGnvcAnq2CefQQ8WsnUSHuEDYoVVmJ0+6ZzKUO51XekXp462EcD7PX3HDW6myVKUKr2QmLdX5lL1OLp+S3CvdYP8mIKGL91rd2KlOck4Mk66eSjK9I6xDkDUNlXvrF/sYZy7JWHP2sL7eZz0/1LUQ2nLDqmOvLx3D4AO3tiZuHEuxPzg9oixcKNj3FAYpQf4pvrSWxB9eY208EKpxbL7xNl9wY54Oua+7EC42S8yN4qjpKXZvZpOM9OaA0TZLu/rx2uYXm0rR7bqhIDBu+ISfb+q8gxCnTWsCX06KbaRah8oV2DugzLo623FkyD4/Xcf7oke/2I+o1grpmDjLEvNWn6D0vvMGRfw1wfBwi47jBkgzEAvBCZf+sviN/QVGl2T X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040171)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:CY4PR12MB1239; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1239; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1239; 4:YliwmDtxnZ6xSIfMZXzLVaHVA9sXVGAjGcF4LEXbbkKO7o4DoxZR9lFpElk/uAu/NChg1oplbvs8B01VI8y2MuCyKuLZPubiKGELArgM4e05svNGRq3xgmAeJadomkbeOQK+fiRTeYN5jl1dkvxNeUVp4TjCYpz4q+zClVIq6M5jonlG1cnDD84ty9iuwWA+MXUwbkpc24iTyDVfPle6QlWW7bMBGlqbCbvITR9EX31ev2axdb97cDYMmE34KohAh2WyJmYw9GyAyC1yGRJ4NWwbPBT4/9k4a3nuRvOzUEwaO+IgQGH2aTMzkZMw3wKfDCXDctXuubvm+2b3eJHwv1ueyrPWrB9IJxnPFUphU+VCVjmwjrSgqAXOjm8L46sQZWqHaUNPmOxII/szfTRwUg== X-Forefront-PRVS: 0031A0FFAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6029001)(6009001)(7916002)(189002)(199003)(8676002)(92566002)(66066001)(47776003)(4326007)(2906002)(105586002)(42186005)(6116002)(3846002)(86362001)(53416004)(586003)(33646002)(101416001)(2351001)(106356001)(81156014)(50226002)(36756003)(50986999)(81166006)(50466002)(229853001)(77096005)(5003940100001)(48376002)(110136002)(189998001)(305945005)(97736004)(7736002)(7846002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1239; H:leduran-Precision-WorkStation-T5400.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1239; 23:vjPviR6XjhbwQv6C+Pu1D5/H1kqN+4DV6Lw4Z0yM5?= =?us-ascii?Q?CqI3sja0Ym1yFpLmZpJAy3ntb9bmi1aq0B2Olt7HfN2SnXj4b10yStoPIase?= =?us-ascii?Q?73HyQKn5wbfIVLHxfKItsHSYYTGiUjfDV04ZYG1Gt132aCHJ5llzh1nngiQP?= =?us-ascii?Q?osQ7W6VLve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HgF7e6XtvSZYEqDxb2KGrQHhAMggKKdfx32cFfEGecQqaxDKuq73p6s2+gKywk6B5Z2XkZHyrWWaNacCAKUB7X1YzpejPGDmZYQPb3tbMIVB2i6RVTdKeR3IKJnz7qxkBoLQOF8KMdNM3cZO9a X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2016 15:25:02.2183 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1239 Subject: [PATCH] BaseTools/Source/C/GenFv/GenFvInternalLib.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2016 15:25:06 -0000 Content-Type: text/plain We have a situation where an x86 processor does not start fetching code at the traditional hardware reset vector address 0xFFFFFFF0. The implication is that the hidden base address part of the CS register is initialized with a value different than the traditional 0xFFFF0000. In our case: CS = 0xF000 (as expected) EIP = 0xFFF0 (as expected) CSLIMIT = 0xFFFF (as expected) CSBASE = 0x####0000 (where #### is not the traditional 0xFFFF) Thus in our case execution starts at: CSBASE+EIP = 0x####FFF0. To account for this behavior, we define an FDF address override to force a rebase of the FV section containing the VTF file. For example, last FV section defined as: [FV.FvSecPei] FvBaseAddress = $(FV_BOOT_BASE) FvForceRebase = TRUE However, when the GenFv tool parses that section it is unware of the possible rebasing, and assumes the section ends at the traditional 4G-byte boundary. This patch solves this by simply adding a check for a possible rebase scenario. Leo Duran (1): BaseTools/Source/C/GenFv/GenFvInternalLib.c BaseTools/Source/C/GenFv/GenFvInternalLib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 1.9.1