public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: Yunhua Feng <fengyunhua@byosoft.com.cn>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Liming Gao <gaoliming@byosoft.com.cn>,
	"Chen, Christine" <yuwei.chen@intel.com>
Subject: Re: [PATCH v2 1/2] BaseTools: Add image type into generate map file
Date: Mon, 9 Nov 2020 06:16:55 +0000	[thread overview]
Message-ID: <DM6PR11MB40735AE7F17143DCBCC05C0BC9EA0@DM6PR11MB4073.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201030033939.2094-2-fengyunhua@byosoft.com.cn>

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Yunhua Feng <fengyunhua@byosoft.com.cn> 
Sent: Friday, October 30, 2020 11:40 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [PATCH v2 1/2] BaseTools: Add image type into generate map file

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2977

For a source-level BIOS debugger the .map files are quite useful with one major shortcoming: the debugger cannot know, solely from the .map file, the format (PE/COFF vs. TE) of the image included in the final BIOS ROM

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
---
 BaseTools/Source/C/GenFv/GenFvInternalLib.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index b5ffed93a9..6e296b8ad6 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -903,7 +903,12 @@ Returns:
     fprintf (FvMapFile, "BaseAddress=0x%010llx, ", (unsigned long long) (ImageBaseAddress + Offset));
   }
 
-  fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));
+  fprintf (FvMapFile, "EntryPoint=0x%010llx, ", (unsigned long long) 
+ (ImageBaseAddress + AddressOfEntryPoint));  if (!pImageContext->IsTeImage) {
+    fprintf (FvMapFile, "Type=PE");
+  } else {
+    fprintf (FvMapFile, "Type=TE");
+  }
   fprintf (FvMapFile, ")\n");
 
   fprintf (FvMapFile, "(GUID=%s", FileGuidName);
--
2.27.0.windows.1



  reply	other threads:[~2020-11-09  6:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30  3:39 [PATCH v2 0/2] Add image type into generate map file fengyunhua
2020-10-30  3:39 ` [PATCH v2 1/2] BaseTools: " fengyunhua
2020-11-09  6:16   ` Bob Feng [this message]
2020-10-30  3:39 ` [PATCH v2 2/2] BaseTools: update report map file format fengyunhua
2020-11-09  6:14   ` Bob Feng
2020-11-09  6:38     ` 回复: [edk2-devel] " fengyunhua
2020-11-09  7:09       ` Bob Feng
2020-11-09  8:11         ` 回复: " fengyunhua
2020-11-10  4:19           ` Bob Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB40735AE7F17143DCBCC05C0BC9EA0@DM6PR11MB4073.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox