]>
Commit | Line | Data |
---|---|---|
597cb96f | 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 | );\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 | |
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);\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 | -- | |
50 | 1.6.3.3 | |
51 |