]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Documentation/patches/BaseTools-GenFv-Fix-0x0-Based-FV.patch
ArmPkg: Introduce ArmCpuLib to abstract ARM Cpu specific initialization
[mirror_edk2.git] / ArmPlatformPkg / Documentation / patches / BaseTools-GenFv-Fix-0x0-Based-FV.patch
CommitLineData
597cb96f 1From 5552b8d1c885b1215cec72b8e21b5816a4511737 Mon Sep 17 00:00:00 2001
2From: Olivier Martin <olivier.martin@arm.com>
3Date: Wed, 8 Jun 2011 19:30:49 +0100
4Subject: [PATCH] Fix GenFv for FV files located at 0x0
5
6Fix GenFv for FV file rebased at 0x0 by using the more appropriate attribute 'BaseAddressSet' already defined in the FV_INFO structure.
7---
8 BaseTools/Source/C/GenFv/GenFv.c | 2 +-
9 BaseTools/Source/C/GenFv/GenFvInternalLib.c | 3 ++-
10 2 files changed, 3 insertions(+), 2 deletions(-)
11 mode change 100644 => 100755 BaseTools/Source/C/GenFv/GenFv.c
12
13diff --git a/BaseTools/Source/C/GenFv/GenFv.c b/BaseTools/Source/C/GenFv/GenFv.c
14old mode 100644
15new mode 100755
16index 2cb8771..4662461
17--- a/BaseTools/Source/C/GenFv/GenFv.c
18+++ b/BaseTools/Source/C/GenFv/GenFv.c
19@@ -598,7 +598,7 @@ Returns:
20 );\r
21 } else {\r
22 VerboseMsg ("Create Fv image and its map file");\r
23- if (mFvDataInfo.BaseAddress != 0) {\r
24+ if (mFvDataInfo.BaseAddressSet) {\r
25 VerboseMsg ("FvImage Rebase Address is 0x%llX", (unsigned long long) mFvDataInfo.BaseAddress);\r
26 }\r
27 //\r
28diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
29index 189dc43..985e4d8 100644
30--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
31+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
32@@ -209,6 +209,7 @@ Returns:
33 DebugMsg (NULL, 0, 9, "rebase address", "%s = %s", EFI_FV_BASE_ADDRESS_STRING, Value);\r
34 \r
35 FvInfo->BaseAddress = Value64;\r
36+ FvInfo->BaseAddressSet = TRUE;\r
37 }\r
38 }\r
39 \r
40@@ -2820,7 +2821,7 @@ Returns:
41 //\r
42 // Don't need to relocate image when BaseAddress is not set.\r
43 //\r
44- if (FvInfo->BaseAddress == 0) {\r
45+ if (FvInfo->BaseAddressSet == FALSE) {\r
46 return EFI_SUCCESS;\r
47 }\r
48 XipBase = FvInfo->BaseAddress + XipOffset;\r
49--
501.6.3.3
51