public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io
Cc: "Ard Biesheuvel" <ardb@kernel.org>,
	"Michael Kinney" <michael.d.kinney@intel.com>,
	"Liming Gao" <gaoliming@byosoft.com.cn>,
	"Jiewen Yao" <jiewen.yao@intel.com>,
	"Michael Kubacki" <michael.kubacki@microsoft.com>,
	"Sean Brogan" <sean.brogan@microsoft.com>,
	"Rebecca Cran" <quic_rcran@quicinc.com>,
	"Leif Lindholm" <quic_llindhol@quicinc.com>,
	"Sami Mujawar" <sami.mujawar@arm.com>,
	"Taylor Beebe" <t@taylorbeebe.com>,
	"Marvin Häuser" <mhaeuser@posteo.de>
Subject: [RFC PATCH v2 3/7] MdePkg/BasePeCoffLib: Clean up stale Itanium references in comments
Date: Fri,  3 Feb 2023 13:10:25 +0100	[thread overview]
Message-ID: <20230203121029.2451394-4-ardb@kernel.org> (raw)
In-Reply-To: <20230203121029.2451394-1-ardb@kernel.org>

The specialized relocation fixup handlers are used by ARM and RISC-V but
not by IPF/Itanium anymore, so let's clean up the comments referring to
Itanium. No code changes.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 MdePkg/Library/BasePeCoffLib/BasePeCoff.c             |  2 +-
 MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h |  8 +++-----
 MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c         | 11 +++++------
 3 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
index 97a8aaf8c73d..85ada399e303 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
@@ -1901,7 +1901,7 @@ PeCoffLoaderRelocateImageForRuntime (
 
           default:
             //
-            // Only Itanium requires ConvertPeImage_Ex
+            // Perform architecture/ISA specific relocation.
             //
             Status = PeHotRelocateImageEx (Reloc, Fixup, &FixupData, Adjust);
             if (RETURN_ERROR (Status)) {
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h
index 4a43ec236529..a29a6febe98f 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h
@@ -18,8 +18,7 @@
 #include <IndustryStandard/PeImage.h>
 
 /**
-  Performs an Itanium-based specific relocation fixup and is a no-op on other
-  instruction sets.
+  Performs an architecture/ISA specific relocation fixup.
 
   @param  Reloc       The pointer to the relocation record.
   @param  Fixup       The pointer to the address to fix up.
@@ -38,9 +37,8 @@ PeCoffLoaderRelocateImageEx (
   );
 
 /**
-  Performs an Itanium-based specific re-relocation fixup and is a no-op on other
-  instruction sets. This is used to re-relocated the image into the EFI virtual
-  space for runtime calls.
+  Performs an architecture/ISA specific re-relocation fixup. This is used to
+  re-relocate the image into the EFI virtual space for runtime calls.
 
   @param  Reloc       The pointer to the relocation record.
   @param  Fixup       The pointer to the address to fix up.
diff --git a/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
index 1a806dd62db6..f7cade4d7d4e 100644
--- a/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
@@ -1,5 +1,6 @@
 /** @file
-  Specific relocation fixups for none Itanium architecture.
+  NULL implementations of architecture/ISA Specific relocation handlers,
+  for architectures/ISAs that only use the generic PE/COFF relocation types.
 
   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -9,8 +10,7 @@
 #include "BasePeCoffLibInternals.h"
 
 /**
-  Performs an Itanium-based specific relocation fixup and is a no-op on other
-  instruction sets.
+  Performs an architecture/ISA specific relocation fixup.
 
   @param  Reloc       The pointer to the relocation record.
   @param  Fixup       The pointer to the address to fix up.
@@ -59,9 +59,8 @@ PeCoffLoaderImageFormatSupported (
 }
 
 /**
-  Performs an Itanium-based specific re-relocation fixup and is a no-op on other
-  instruction sets. This is used to re-relocated the image into the EFI virtual
-  space for runtime calls.
+  Performs an architecture/ISA specific re-relocation fixup. This is used to
+  re-relocate the image into the EFI virtual space for runtime calls.
 
   @param  Reloc       The pointer to the relocation record.
   @param  Fixup       The pointer to the address to fix up.
-- 
2.39.1


  parent reply	other threads:[~2023-02-03 12:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 12:10 [RFC PATCH v2 0/7] enable IBT/BTI codegen and reporting to the OS Ard Biesheuvel
2023-02-03 12:10 ` [RFC PATCH v2 1/7] MdePkg: Update MemoryAttributesTable to v2.10 Ard Biesheuvel
2023-02-03 12:10 ` [RFC PATCH v2 2/7] MdePkg/BasePeCoffLib: Move RISC-V definitions out of generic header Ard Biesheuvel
2023-02-03 12:10 ` Ard Biesheuvel [this message]
2023-02-03 12:10 ` [RFC PATCH v2 4/7] MdePkg/BasePeCoffLib: Add generic plumbing to detect IBT/BTI support Ard Biesheuvel
2023-02-03 12:10 ` [RFC PATCH v2 5/7] MdePkg/BasePeCoffLib AARCH64: Implement fwd control flow guard detection Ard Biesheuvel
2023-02-03 12:10 ` [RFC PATCH v2 6/7] MdeModulePkg: Enable forward edge CFI in mem attributes table Ard Biesheuvel
2023-02-03 12:10 ` [RFC PATCH v2 7/7] ArmVirtPkg: Implement BTI for runtime regions Ard Biesheuvel
2023-02-03 12:33   ` [edk2-devel] " Michael Brown
2023-02-03 12:55     ` Ard Biesheuvel
2023-02-03 12:58       ` Michael Brown

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=20230203121029.2451394-4-ardb@kernel.org \
    --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