[coreboot-gerrit] Change in ...coreboot[master]: util/cbfstool/cbfs-mkstage: Support x86_64
Patrick Georgi (Code Review)
gerrit at coreboot.org
Wed Dec 19 07:06:51 CET 2018
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/30115 )
Change subject: util/cbfstool/cbfs-mkstage: Support x86_64
......................................................................
util/cbfstool/cbfs-mkstage: Support x86_64
Add support for relocations on x86_64.
Required for 64bit romstage.
Change-Id: I1ff223d3476776297b501813a953356dd6fa9d67
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
Reviewed-on: https://review.coreboot.org/c/30115
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
---
M util/cbfstool/cbfs-mkstage.c
1 file changed, 7 insertions(+), 4 deletions(-)
Approvals:
build bot (Jenkins): Verified
Philipp Deppenwiese: Looks good to me, approved
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index 85c3e4f..6071437 100644
--- a/util/cbfstool/cbfs-mkstage.c
+++ b/util/cbfstool/cbfs-mkstage.c
@@ -362,7 +362,9 @@
/* If there is any relocation to the ignored section that isn't
* absolute fail as current assumptions are that all relocations
* are absolute. */
- if (reloc_type != R_386_32) {
+ if ((reloc_type != R_386_32) &&
+ (reloc_type != R_AMD64_64) &&
+ (reloc_type != R_AMD64_32)) {
ERROR("Invalid reloc to ignored section: %x\n", reloc_type);
return -1;
}
@@ -392,9 +394,10 @@
if (rmodule_init(rmodctx, input))
return -1;
- /* Only support x86 XIP currently. */
- if (rmodctx->pelf.ehdr.e_machine != EM_386) {
- ERROR("Only support XIP stages for x86\n");
+ /* Only support x86 / x86_64 XIP currently. */
+ if ((rmodctx->pelf.ehdr.e_machine != EM_386) &&
+ (rmodctx->pelf.ehdr.e_machine != EM_X86_64)) {
+ ERROR("Only support XIP stages for x86/x86_64\n");
goto out;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/30115
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1ff223d3476776297b501813a953356dd6fa9d67
Gerrit-Change-Number: 30115
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181219/912f98cd/attachment.html>
More information about the coreboot-gerrit
mailing list