Attention is currently required from: Aseda Aboagye, Caveh Jalali, Cliff Huang, Forest Mittelberg, Lance Zhao, Tim Wawrzynczak.
Hello Caveh Jalali, Cliff Huang, Forest Mittelberg, Jonathon Hall, Lance Zhao, Tim Wawrzynczak, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81996?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: acpigen_ps2_keybd: Add assistant to linux,keymap
......................................................................
acpigen_ps2_keybd: Add assistant to linux,keymap
If the ChromiumOS EC indicates that the device has an assistant key,
we should also add it to the generated linux,keymap binding. This
commit simply does so by examining the keyboard capabilities reported by
the EC.
BUG=b:333088656
TEST=With a device that has an assistant key, flash AP FW and verify
that the key is mapped to `KEY_ASSISTANT` in the Linux kernel using
`evtest`.
Change-Id: I217220e89bce88e3045a4fc3b124954696276442
Signed-off-by: Aseda Aboagye <aaboagye(a)google.com>
---
M src/acpi/acpigen_ps2_keybd.c
M src/ec/google/chromeec/ec_acpi.c
M src/include/acpi/acpigen_ps2_keybd.h
M src/mainboard/purism/librem_jsl/ramstage.c
4 files changed, 13 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/81996/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/81996?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I217220e89bce88e3045a4fc3b124954696276442
Gerrit-Change-Number: 81996
Gerrit-PatchSet: 4
Gerrit-Owner: Aseda Aboagye <aaboagye(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Forest Mittelberg <bmbm(a)google.com>
Gerrit-Reviewer: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-Reviewer: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Attention: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Attention: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Attention: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Aseda Aboagye <aaboagye(a)google.com>
Gerrit-Attention: Forest Mittelberg <bmbm(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Aseda Aboagye, Caveh Jalali, Cliff Huang, Forest Mittelberg, Lance Zhao, Tim Wawrzynczak.
Jonathon Hall has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81996?usp=email )
Change subject: acpigen_ps2_keybd: Add assistant to linux,keymap
......................................................................
Patch Set 3:
(1 comment)
File src/ec/google/chromeec/ec_acpi.c:
https://review.coreboot.org/c/coreboot/+/81996/comment/ec26b04d_93ec585f :
PS3, Line 256: true);
This doesn't match the order of parameters in the function. If the EC says it doesn't have an assistant key, it'll actually disable the alpha/num/punct keys.
IMO it makes sense to keep the "specific keys" together and put alpha/num/punct last, so maybe change the order of parameters in the function.
--
To view, visit https://review.coreboot.org/c/coreboot/+/81996?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I217220e89bce88e3045a4fc3b124954696276442
Gerrit-Change-Number: 81996
Gerrit-PatchSet: 3
Gerrit-Owner: Aseda Aboagye <aaboagye(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Forest Mittelberg <bmbm(a)google.com>
Gerrit-Reviewer: Jonathon Hall <jonathon.hall(a)puri.sm>
Gerrit-Reviewer: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Attention: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Attention: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Attention: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Aseda Aboagye <aaboagye(a)google.com>
Gerrit-Attention: Forest Mittelberg <bmbm(a)google.com>
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:56:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Caveh Jalali, Cliff Huang, Forest Mittelberg, Lance Zhao, Tim Wawrzynczak.
Hello Caveh Jalali, Cliff Huang, Forest Mittelberg, Lance Zhao, Tim Wawrzynczak,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81996?usp=email
to look at the new patch set (#3).
Change subject: acpigen_ps2_keybd: Add assistant to linux,keymap
......................................................................
acpigen_ps2_keybd: Add assistant to linux,keymap
If the ChromiumOS EC indicates that the device has an assistant key,
we should also add it to the generated linux,keymap binding. This
commit simply does so by examining the keyboard capabilities reported by
the EC.
BUG=b:333088656
TEST=With a device that has an assistant key, flash AP FW and verify
that the key is mapped to `KEY_ASSISTANT` in the Linux kernel using
`evtest`.
Change-Id: I217220e89bce88e3045a4fc3b124954696276442
Signed-off-by: Aseda Aboagye <aaboagye(a)google.com>
---
M src/acpi/acpigen_ps2_keybd.c
M src/ec/google/chromeec/ec_acpi.c
M src/include/acpi/acpigen_ps2_keybd.h
M src/mainboard/purism/librem_jsl/ramstage.c
4 files changed, 16 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/81996/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/81996?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I217220e89bce88e3045a4fc3b124954696276442
Gerrit-Change-Number: 81996
Gerrit-PatchSet: 3
Gerrit-Owner: Aseda Aboagye <aaboagye(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Forest Mittelberg <bmbm(a)google.com>
Gerrit-Reviewer: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Attention: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Attention: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Attention: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Forest Mittelberg <bmbm(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Julius Werner, Jérémy Compostella, Kapil Porwal, Nico Huber, Subrata Banik.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81960?usp=email )
Change subject: arch/x86: Enable long mode entry into payload for x86_64 support
......................................................................
Patch Set 2:
(1 comment)
File src/arch/x86/boot.c:
https://review.coreboot.org/c/coreboot/+/81960/comment/7ddcf017_beae94a3 :
PS1, Line 25: if (CONFIG(PAYLOAD_X86_64_SUPPORT)) {
> > > [Subrata] I don't under why all of sudden the "multiple entry point approach" considered critical. The problem of supporting 64-bit direct entry can be handled w/o that as well. Having multiple entry point approach like kernel may not be that critical at this stage. we can jump into 64-bit entry point using boot.c code (CB:81960). For that we don't need to support multiple entry point approach. If you wish to implement multiple entry point approach, please do that w/o blocking the current task is my request.
> > >
> >
> > So multiple entry points is for sure not a must to proceed I'd say. The point I tried to make was that you don't want different ways to inform coreboot ramstage to straight jump to 64bit payload entry (even if there is only one 64bit entry). So we should carefully discuss the route we want to take.
> >
> > So what do you think of the following suggestion:
> >
> > - Add a 64bit entry (maybe call it x86_long_mode, to avoid confusion?) in cbfs_payload_segment_type: maybe PAYLOAD_SEGMENT_X86_LONG_MODE_ENTRY ?
> > - Add a way to cbfstool to mark the entry of the payload as such (similar to your --64 patch, but then not with file attr, but as payload segment)
> > - 64bit ramstage coreboot at runtime decides to jump to PAYLOAD_SEGMENT_X86_LONG_MODE_ENTRY directly if found
> > - If not found keep the old 32bit entering code
>
> [Subrata] I really like this approach and isn't this is what I've tried since morning till now? I have used file attribute (over segment_type) as I felt this is more meaningful as we are injecting it at header.
>
A few reason why segment_type is better in my opinion:
- I think they 'fail' better in some cases. For instance if an older coreboot ramstage or chainloading payload does not find the ENTRY segment of a 64bit only payload it will complain more loudly about what's wrong. With and attribute old ramstage/chainload would jump to new 64bit payload entry and likely fail on some 64bit instruction in 32bit mode.
- It makes multiple entry points easier to implement
--
To view, visit https://review.coreboot.org/c/coreboot/+/81960?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic5e6f0af11c05e8b075b8c20880c012747a1df9b
Gerrit-Change-Number: 81960
Gerrit-PatchSet: 2
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-CC: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:34:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: comment
Attention is currently required from: Arthur Heymans, Julius Werner.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81964?usp=email )
Change subject: util/cbfstool: Add --64 option for 64-bit payload stitching
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> > > > > Why not parse the ELF for architecture?
> > > > >
> > > > > Also it's confusing/meaningless for !x86 payloads.
> > > >
> > > > can you please elaborate a bit your review comments ?
> > > >
> > > > for sure, I should have guarded those against x86 arch alone. But are you suggesting not to use any cmdline (like --64) and use ELF arch to know if the payload is 64-bit binary and then insert specific magic data into the header ?
> > >
> > > I think you only need a cmdline if you cannot figure it out differently. OTOH the ELF does not conclusively say something about the entry point. For other type of payloads like flat binaries it's not possible to know this either I suppose.
> >
> > 32-bit depthcharge
> >
> > ```
> > readelf -h /build/rex/firmware/rex/depthcharge/depthcharge.elf
> > ELF Header:
> > Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
> > Class: ELF32
> > Data: 2's complement, little endian
> > Version: 1 (current)
> > OS/ABI: UNIX - System V
> > ABI Version: 0
> > Type: EXEC (Executable file)
> > Machine: Intel 80386
> >
> > ```
> >
> > 64-bit depthcharge
> >
> > ```
> > readelf -h /build/rex/firmware/rex/depthcharge/depthcharge.elf
> > ELF Header:
> > Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
> > Class: ELF64
> > Data: 2's complement, little endian
> > Version: 1 (current)
> > OS/ABI: UNIX - System V
> > ABI Version: 0
> > Type: EXEC (Executable file)
> > Machine: Advanced Micro Devices X86-64
> > Version: 0x1
> > ```
> >
> > I believe in that case, I don't need any cmdline.
>
> Well the entry point code be in .code16, .code32, .code64 assembly so it's not straightforward to know which mode the entry point is compiled for. One idea is to look for R_X86_64_PC32 or R_X86_64_PC16. If the ELF file contains those it's more likely that the entry point is 32bit (coreboot never support 16bit entry so I doubt PC16 is something you'll ever see). However if the arch is AMD64 and there no PC32 or PC16 then a 64bit entry point is more likely. It's not conclusive for sure but maybe those heuristics are good enough?
thanks for the prompt response. I got your point now, as not all payload has would expect the entry point also written in 64-bit mode although the payload support x86_64 arch. Hence, it's important to know if the entry point itself is 32-bit or 64-bit to jump in the correct mode.
--
To view, visit https://review.coreboot.org/c/coreboot/+/81964?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I41562041d6c09869c7966ea31503f002ca1caefa
Gerrit-Change-Number: 81964
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:28:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: comment
Attention is currently required from: Caveh Jalali, Cliff Huang, Forest Mittelberg, Lance Zhao, Tim Wawrzynczak.
Hello Caveh Jalali, Cliff Huang, Forest Mittelberg, Lance Zhao, Tim Wawrzynczak,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81996?usp=email
to look at the new patch set (#2).
Change subject: acpigen_ps2_keybd: Add assistant to linux,keymap
......................................................................
acpigen_ps2_keybd: Add assistant to linux,keymap
If the ChromiumOS EC indicates that the device has an assistant key,
we should also add it to the generated linux,keymap binding. This
commit simply does so by examining the keyboard capabilities reported by
the EC.
BUG=b:333088656
TEST=With a device that has an assistant key, flash AP FW and verify
that the key is mapped to `KEY_ASSISTANT` in the Linux kernel using
`evtest`.
Change-Id: I217220e89bce88e3045a4fc3b124954696276442
Signed-off-by: Aseda Aboagye <aaboagye(a)google.com>
---
M src/acpi/acpigen_ps2_keybd.c
M src/ec/google/chromeec/ec_acpi.c
M src/include/acpi/acpigen_ps2_keybd.h
3 files changed, 15 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/81996/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81996?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I217220e89bce88e3045a4fc3b124954696276442
Gerrit-Change-Number: 81996
Gerrit-PatchSet: 2
Gerrit-Owner: Aseda Aboagye <aaboagye(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Forest Mittelberg <bmbm(a)google.com>
Gerrit-Reviewer: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Reviewer: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Lance Zhao <lance.zhao(a)gmail.com>
Gerrit-Attention: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Attention: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Attention: Tim Wawrzynczak <inforichland(a)gmail.com>
Gerrit-Attention: Forest Mittelberg <bmbm(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Arthur Heymans.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81968?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: libpayload: Add initial patch or 64-bit compilation
......................................................................
libpayload: Add initial patch or 64-bit compilation
Change-Id: I69fda47bedf1a14807b1515c4aed6e3a1d5b8585
Signed-off-by: Subrata Banik <subratabanik(a)google.com>
---
M payloads/libpayload/Kconfig
M payloads/libpayload/Makefile
M payloads/libpayload/Makefile.mk
A payloads/libpayload/arch/x64/Kconfig
A payloads/libpayload/arch/x64/Makefile.mk
A payloads/libpayload/arch/x64/apic.c
A payloads/libpayload/arch/x64/boot_media.c
A payloads/libpayload/arch/x64/cache.c
A payloads/libpayload/arch/x64/coreboot.c
A payloads/libpayload/arch/x64/delay.c
A payloads/libpayload/arch/x64/exception.c
A payloads/libpayload/arch/x64/exception_asm.S
A payloads/libpayload/arch/x64/exec.S
A payloads/libpayload/arch/x64/gdb.c
A payloads/libpayload/arch/x64/head.S
A payloads/libpayload/arch/x64/libpayload.ldscript
A payloads/libpayload/arch/x64/main.c
A payloads/libpayload/arch/x64/multiboot.c
A payloads/libpayload/arch/x64/selfboot.c
A payloads/libpayload/arch/x64/string.c
A payloads/libpayload/arch/x64/sysinfo.c
A payloads/libpayload/arch/x64/timer.c
A payloads/libpayload/arch/x64/util.S
A payloads/libpayload/arch/x64/virtual.c
M payloads/libpayload/arch/x86/Kconfig
M payloads/libpayload/bin/lpgcc
A payloads/libpayload/include/x64/arch/apic.h
A payloads/libpayload/include/x64/arch/barrier.h
A payloads/libpayload/include/x64/arch/cache.h
A payloads/libpayload/include/x64/arch/cpuid.h
A payloads/libpayload/include/x64/arch/exception.h
A payloads/libpayload/include/x64/arch/io.h
A payloads/libpayload/include/x64/arch/msr.h
A payloads/libpayload/include/x64/arch/rdtsc.h
A payloads/libpayload/include/x64/arch/types.h
A payloads/libpayload/include/x64/arch/virtual.h
M payloads/libpayload/vboot/Makefile.mk
37 files changed, 3,106 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/81968/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81968?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I69fda47bedf1a14807b1515c4aed6e3a1d5b8585
Gerrit-Change-Number: 81968
Gerrit-PatchSet: 2
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newpatchset
Attention is currently required from: Julius Werner, Subrata Banik.
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81964?usp=email )
Change subject: util/cbfstool: Add --64 option for 64-bit payload stitching
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> > > > Why not parse the ELF for architecture?
> > > >
> > > > Also it's confusing/meaningless for !x86 payloads.
> > >
> > > can you please elaborate a bit your review comments ?
> > >
> > > for sure, I should have guarded those against x86 arch alone. But are you suggesting not to use any cmdline (like --64) and use ELF arch to know if the payload is 64-bit binary and then insert specific magic data into the header ?
> >
> > I think you only need a cmdline if you cannot figure it out differently. OTOH the ELF does not conclusively say something about the entry point. For other type of payloads like flat binaries it's not possible to know this either I suppose.
>
> 32-bit depthcharge
>
> ```
> readelf -h /build/rex/firmware/rex/depthcharge/depthcharge.elf
> ELF Header:
> Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
> Class: ELF32
> Data: 2's complement, little endian
> Version: 1 (current)
> OS/ABI: UNIX - System V
> ABI Version: 0
> Type: EXEC (Executable file)
> Machine: Intel 80386
>
> ```
>
> 64-bit depthcharge
>
> ```
> readelf -h /build/rex/firmware/rex/depthcharge/depthcharge.elf
> ELF Header:
> Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
> Class: ELF64
> Data: 2's complement, little endian
> Version: 1 (current)
> OS/ABI: UNIX - System V
> ABI Version: 0
> Type: EXEC (Executable file)
> Machine: Advanced Micro Devices X86-64
> Version: 0x1
> ```
>
> I believe in that case, I don't need any cmdline.
Well the entry point code be in .code16, .code32, .code64 assembly so it's not straightforward to know which mode the entry point is compiled for. One idea is to look for R_X86_64_PC32 or R_X86_64_PC16. If the ELF file contains those it's more likely that the entry point is 32bit (coreboot never support 16bit entry so I doubt PC16 is something you'll ever see). However if the arch is AMD64 and there no PC32 or PC16 then a 64bit entry point is more likely. It's not conclusive for sure but maybe those heuristics are good enough?
--
To view, visit https://review.coreboot.org/c/coreboot/+/81964?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I41562041d6c09869c7966ea31503f002ca1caefa
Gerrit-Change-Number: 81964
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Thu, 18 Apr 2024 18:19:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: comment