]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/Documentation/patches/BaseTools-GenFv-Fix-0x0-Based-FV.patch
ArmPlatformPkg: Update the list of the BaseTools pending patches and the documentation
[mirror_edk2.git] / ArmPlatformPkg / Documentation / patches / BaseTools-GenFv-Fix-0x0-Based-FV.patch
1 From 5552b8d1c885b1215cec72b8e21b5816a4511737 Mon Sep 17 00:00:00 2001
2 From: Olivier Martin <olivier.martin@arm.com>
3 Date: Wed, 8 Jun 2011 19:30:49 +0100
4 Subject: [PATCH] Fix GenFv for FV files located at 0x0
5
6 Fix 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
13 diff --git a/BaseTools/Source/C/GenFv/GenFv.c b/BaseTools/Source/C/GenFv/GenFv.c
14 old mode 100644
15 new mode 100755
16 index 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 );
21 } else {
22 VerboseMsg ("Create Fv image and its map file");
23 - if (mFvDataInfo.BaseAddress != 0) {
24 + if (mFvDataInfo.BaseAddressSet) {
25 VerboseMsg ("FvImage Rebase Address is 0x%llX", (unsigned long long) mFvDataInfo.BaseAddress);
26 }
27 //
28 diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
29 index 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);
34
35 FvInfo->BaseAddress = Value64;
36 + FvInfo->BaseAddressSet = TRUE;
37 }
38 }
39
40 @@ -2820,7 +2821,7 @@ Returns:
41 //
42 // Don't need to relocate image when BaseAddress is not set.
43 //
44 - if (FvInfo->BaseAddress == 0) {
45 + if (FvInfo->BaseAddressSet == FALSE) {
46 return EFI_SUCCESS;
47 }
48 XipBase = FvInfo->BaseAddress + XipOffset;
49 --
50 1.6.3.3
51