Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/78913?usp=email )
Change subject: payloads: Add leanefi payload
......................................................................
payloads: Add leanefi payload
This adds another external payload to coreboot. The payload has been
heavily based on u-boots UEFI implementation.
The leanefi payload is basically a translator from coreboot to UEFI. It
takes the coreboot tables and transforms them into UEFI interfaces.
Although it can potentially load any efi application that can
handle the minimized interface that leanefi provides, it has only
been tested with LinuxBoot (v6.3.5) as a payload. It has been optimized
to support only those interfaces that Linux requires to start.
Among other leanefi does not support:
- efi capsule update (also efi system resource table)
- efi variables
- efi text input protocol (it can only output)
- most boot services. mostly memory services are left (e.g. alloc/free)
- all runtime services (although there is still a very small runtime
footprint that is planned to be removed in the near future)
- TCG2/TPM (although that is mostly because of laziness)
The README.md currently provides more details on why.
The payload currently only supports arm64 and has only been tested
on emulation/simulator targets. The original motivation was to get ACPI
on arm64 published to the OS without using EDK2. It is however also
possible to supply the leanefi with a FDT that is published to the OS.
At that point one would however probably use coreboot only instead of
this shim layer on top. It would be way nicer to have Linux support
something else than UEFI to propagate the ACPI tables, but it requires
to get the Linux maintainer/community on board. So for now this shim
layer ciruimvents that.
LBBR Test:
// 1. dump FDT from QEMU like mentioned in aarch64 coreboot doc
// 2. compile u-root however you like (aarch64)
// 3. compile Linux (embed u-root initramfs via Kconfig)
// 4. copy Linux kernel to payloads/leanefi/Image
// 5. copy following coreboot defconfig to configs/defconfig:
CONFIG_BOARD_EMULATION_QEMU_AARCH64=y
CONFIG_PAYLOAD_NONE=n
CONFIG_PAYLOAD_LEANEFI=y
CONFIG_LEANEFI_PAYLOAD=y
CONFIG_LEANEFI_PAYLOAD_PATH="[path-to-linux]/arch/arm64/boot/Image"
CONFIG_LEANEFI_FDT=y
CONFIG_LEANEFI_FDT_PATH="[path-to-dumped-DTB]"
// 6. compile coreboot
make defconfig
make -j$(nproc)
// 7. run qemu like mentioned in coreboot doc (no FIT)
// 8. say hello to u-root and optionally kexec into the next kernel
Signed-off-by: Maximilian Brune <maximilian.brune(a)9elements.com>
Change-Id: I4093378e89c3cb43fb0846666de80a7da36b03f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78913
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Ron Minnich <rminnich(a)gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
---
M payloads/Makefile.mk
M payloads/external/Makefile.mk
A payloads/external/leanefi/Kconfig
A payloads/external/leanefi/Kconfig.name
A payloads/external/leanefi/Makefile
5 files changed, 94 insertions(+), 0 deletions(-)
Approvals:
Ron Minnich: Looks good to me, approved
Felix Singer: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/payloads/Makefile.mk b/payloads/Makefile.mk
index a2336aa..5f988da 100644
--- a/payloads/Makefile.mk
+++ b/payloads/Makefile.mk
@@ -28,6 +28,7 @@
payloads/external/GRUB2 \
payloads/external/LinuxBoot \
payloads/external/skiboot \
+payloads/external/leanefi \
payloads/external/coreDOOM \
force-payload:
diff --git a/payloads/external/Makefile.mk b/payloads/external/Makefile.mk
index d497cf8..4a17791 100644
--- a/payloads/external/Makefile.mk
+++ b/payloads/external/Makefile.mk
@@ -436,6 +436,13 @@
$(MAKE) -C payloads/external/skiboot all \
CONFIG_SKIBOOT_GIT_REPO=$(CONFIG_SKIBOOT_GIT_REPO) \
CONFIG_SKIBOOT_REVISION=$(CONFIG_SKIBOOT_REVISION)
+
+# leanefi
+
+payloads/external/leanefi/leanefi/build/leanefi.elf: FORCE $(DOTCONFIG)
+ $(MAKE) -C payloads/external/leanefi
+FORCE: ;
+
# COREDOOM
payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf coredoom:
diff --git a/payloads/external/leanefi/Kconfig b/payloads/external/leanefi/Kconfig
new file mode 100644
index 0000000..490cbcc
--- /dev/null
+++ b/payloads/external/leanefi/Kconfig
@@ -0,0 +1,58 @@
+if PAYLOAD_LEANEFI
+
+menu "leanEFI configuration"
+
+config PAYLOAD_FILE
+ string
+ default "payloads/external/leanefi/leanefi/build/leanefi.elf"
+
+config LEANEFI_EFI_ECPT
+ bool
+ default y if ARCH_ARM64
+
+config LEANEFI_HEAP_SIZE
+ int "Heap size"
+ default 131072
+ help
+ This is the heap size (malloc'able size) available
+ to the payload.
+
+ If unsure, set to 131072 (128K)
+
+config LEANEFI_STACK_SIZE
+ int "Stack size"
+ default 16384
+ help
+ This is the stack size available to the payload.
+
+ If unsure, set to 16384 (16K)
+
+config LEANEFI_BASE_ADDRESS
+ hex "Base address"
+ default 0x62000000 if BOARD_EMULATION_QEMU_AARCH64
+ #default 0x10023300000 if BOARD_EMULATION_QEMU_SBSA
+ help
+ This is the base address for the payload.
+
+config LEANEFI_PAYLOAD
+ bool "Add a payload"
+ default y
+ help
+ If selected leanEFI will start a payload.
+ This option should only be unselected for debug purposes.
+
+config LEANEFI_PAYLOAD_PATH
+ string "path to leanefi payload"
+ depends on LEANEFI_PAYLOAD
+
+config LEANEFI_FDT
+ bool "Add an FDT that is propagated as EFI configuration table"
+ default y if BOARD_EMULATION_QEMU_AARCH64
+
+config LEANEFI_FDT_PATH
+ string "path to FDT"
+ depends on LEANEFI_FDT
+
+endmenu
+
+endif
diff --git a/payloads/external/leanefi/Kconfig.name b/payloads/external/leanefi/Kconfig.name
new file mode 100644
index 0000000..1524d67
--- /dev/null
+++ b/payloads/external/leanefi/Kconfig.name
@@ -0,0 +1,6 @@
+config PAYLOAD_LEANEFI
+ bool "leanefi"
+ depends on ARCH_ARM64
+ help
+ Select this option if you want to build a coreboot image
+ with an leanefi payload.
diff --git a/payloads/external/leanefi/Makefile b/payloads/external/leanefi/Makefile
new file mode 100644
index 0000000..4edec32
--- /dev/null
+++ b/payloads/external/leanefi/Makefile
@@ -0,0 +1,22 @@
+
+unexport KCONFIG_AUTOHEADER
+unexport KCONFIG_AUTOCONFIG
+unexport KCONFIG_DEPENDENCIES
+unexport KCONFIG_SPLITCONFIG
+unexport KCONFIG_TRISTATE
+unexport KCONFIG_NEGATIVES
+unexport $(COREBOOT_EXPORTS)
+
+build: leanefi
+ $(MAKE) -C leanefi
+
+leanefi:
+ git clone "https://review.coreboot.org/leanefi"
+
+distclean:
+ rm -rf leanefi
+
+clean:
+ $(MAKE) -C leanefi clean
+
+.PHONY: build clean distclean
--
To view, visit https://review.coreboot.org/c/coreboot/+/78913?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I4093378e89c3cb43fb0846666de80a7da36b03f1
Gerrit-Change-Number: 78913
Gerrit-PatchSet: 8
Gerrit-Owner: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Reviewer: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: CoolStar <coolstarorganization(a)gmail.com>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Ron Minnich <rminnich(a)gmail.com>
Gerrit-Reviewer: Simon Glass <sjg(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-CC: David Milosevic <David.Milosevic(a)9elements.com>
Gerrit-CC: Jan Samek <samekh(a)email.cz>
Gerrit-CC: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Attention is currently required from: Alper Nebi Yasak, Arthur Heymans, Benjamin Doron, CoolStar, David Hendricks, David Milosevic, Jan Samek, Lean Sheng Tan, Martin L Roth, Maximilian Brune, Patrick Rudolph, Paul Menzel, Simon Glass.
Felix Singer has posted comments on this change by Maximilian Brune. ( https://review.coreboot.org/c/coreboot/+/78913?usp=email )
Change subject: payloads: Add leanefi payload
......................................................................
Patch Set 7: Code-Review+2
(4 comments)
Patchset:
PS7:
> I am still unhappy about this, particularly given all the work to make U-Boot function as a better coreboot payload. Should I give up on that? This really is not building bridges between the projects. This whole payload seems to make no sense to me, other than trying to avoid using U-Boot.
No, no one suggests that you should give up the work. I think the source of this discussion is just that something is needed now, while improving and/or changing U-Boot to fit the needs takes more time. I just re-read the whole discussion and people suggested many things you all can collaborate on in the long-term, and maybe even U-Boot will fit the needs from here in the future as well. Max even started with using U-Boot, but it just didn't fit the needs. So we should look at the big picture.
> A quick look at the source files shows no acknowledgement of U-Boot (BTW that is the correct spelling, bot u-boot). It should be a the top of each file, showing the file it came from.
AFAICS credits to related source files were added one day after your comment. https://review.coreboot.org/plugins/gitiles/leanefi/+/c4d60afb027dc7924034f…
File payloads/external/leanefi/Kconfig:
PS7:
Missing SPDX license identifier. Please add it in a follow-up.
File payloads/external/leanefi/Kconfig.name:
PS7:
Missing SPDX license identifier. Please add it in a follow-up.
File payloads/external/leanefi/Makefile:
PS7:
Missing SPDX license identifier. Please add it in a follow-up.
--
To view, visit https://review.coreboot.org/c/coreboot/+/78913?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I4093378e89c3cb43fb0846666de80a7da36b03f1
Gerrit-Change-Number: 78913
Gerrit-PatchSet: 7
Gerrit-Owner: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Reviewer: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Reviewer: CoolStar <coolstarorganization(a)gmail.com>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Ron Minnich <rminnich(a)gmail.com>
Gerrit-Reviewer: Simon Glass <sjg(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-CC: David Milosevic <David.Milosevic(a)9elements.com>
Gerrit-CC: Jan Samek <samekh(a)email.cz>
Gerrit-CC: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Attention: Benjamin Doron <benjamin.doron00(a)gmail.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Jan Samek <samekh(a)email.cz>
Gerrit-Attention: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Attention: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Attention: CoolStar <coolstarorganization(a)gmail.com>
Gerrit-Attention: Lean Sheng Tan <sheng.tan(a)9elements.com>
Gerrit-Attention: Simon Glass <sjg(a)chromium.org>
Gerrit-Attention: David Milosevic <David.Milosevic(a)9elements.com>
Gerrit-Comment-Date: Tue, 04 Jun 2024 00:23:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Simon Glass <sjg(a)chromium.org>
Attention is currently required from: Felix Singer, Jeremy Soller.
Hello Felix Singer, Jeremy Soller, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/82609?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: mb/system76/mtl: Add Darter Pro 10
......................................................................
mb/system76/mtl: Add Darter Pro 10
The Darter Pro 10 (darp10) is an Intel Meteor Lake-H based board.
There are 2 variants in order to differentiate the 14" and 16" models,
as they have different keyboards and so have different EC firmware.
Change-Id: Iaef03a47cf108591ef823bfa779777c7c05c6337
Signed-off-by: Tim Crawford <tcrawford(a)system76.com>
---
A src/mainboard/system76/mtl/Kconfig
A src/mainboard/system76/mtl/Kconfig.name
A src/mainboard/system76/mtl/Makefile.mk
A src/mainboard/system76/mtl/acpi/backlight.asl
A src/mainboard/system76/mtl/acpi/mainboard.asl
A src/mainboard/system76/mtl/acpi/sleep.asl
A src/mainboard/system76/mtl/board_info.txt
A src/mainboard/system76/mtl/bootblock.c
A src/mainboard/system76/mtl/cmos.default
A src/mainboard/system76/mtl/cmos.layout
A src/mainboard/system76/mtl/devicetree.cb
A src/mainboard/system76/mtl/dsdt.asl
A src/mainboard/system76/mtl/include/mainboard/gpio.h
A src/mainboard/system76/mtl/ramstage.c
A src/mainboard/system76/mtl/variants/darp10/board.fmd
A src/mainboard/system76/mtl/variants/darp10/board_info.txt
A src/mainboard/system76/mtl/variants/darp10/data.vbt
A src/mainboard/system76/mtl/variants/darp10/gpio.c
A src/mainboard/system76/mtl/variants/darp10/gpio_early.c
A src/mainboard/system76/mtl/variants/darp10/hda_verb.c
A src/mainboard/system76/mtl/variants/darp10/overridetree.cb
A src/mainboard/system76/mtl/variants/darp10/ramstage.c
A src/mainboard/system76/mtl/variants/darp10/romstage.c
23 files changed, 791 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/82609/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/82609?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Iaef03a47cf108591ef823bfa779777c7c05c6337
Gerrit-Change-Number: 82609
Gerrit-PatchSet: 4
Gerrit-Owner: Tim Crawford <tcrawford(a)system76.com>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Attention: Jeremy Soller <jeremy(a)system76.com>
Attention is currently required from: Sean Rhodes.
Hello Matt DeVillier, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81408?usp=email
to look at the new patch set (#4).
Change subject: ec/starlabs/merlin/battery: Calculate unknown values
......................................................................
ec/starlabs/merlin/battery: Calculate unknown values
If the EC doesn't know a value, it will report it as 0xffff. In these
cases, calculate a value to used based on others. For example, if the
EC doesn't know the last full charge capacity, report the design
capacity to the OS.
Change-Id: I310555ff913c2e492bbaec4d77281ac32c0de7a3
Signed-off-by: Sean Rhodes <sean(a)starlabs.systems>
---
M src/ec/starlabs/merlin/acpi/battery.asl
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/81408/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/81408?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I310555ff913c2e492bbaec4d77281ac32c0de7a3
Gerrit-Change-Number: 81408
Gerrit-PatchSet: 4
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Attention is currently required from: Sean Rhodes.
Matt DeVillier has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/81408?usp=email )
Change subject: ec/starlabs/merlin/battery: Calculate unknown values
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81408?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I310555ff913c2e492bbaec4d77281ac32c0de7a3
Gerrit-Change-Number: 81408
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Mon, 03 Jun 2024 20:38:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Sean Rhodes.
Matt DeVillier has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/81407?usp=email )
Change subject: ec/starlabs/merlin/battery: Check values are valid before using them
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81407?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I559aca98044b7f0e6b08c475b5383c014bb4cd3f
Gerrit-Change-Number: 81407
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Mon, 03 Jun 2024 20:38:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Sean Rhodes.
Matt DeVillier has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/81406?usp=email )
Change subject: ec/starlabs/merlin: Rename BRPR to B1RP
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81406?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I64a744d78180156e16dbd483a35c7f97ac84bcba
Gerrit-Change-Number: 81406
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Mon, 03 Jun 2024 20:38:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Sean Rhodes.
Matt DeVillier has posted comments on this change by Sean Rhodes. ( https://review.coreboot.org/c/coreboot/+/81405?usp=email )
Change subject: ec/starlabs/merlin: Report the battery cycle count to ACPI
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81405?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Iccb60d3530227fb71a3ce5a3ab1421627cc86611
Gerrit-Change-Number: 81405
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Sean Rhodes <sean(a)starlabs.systems>
Gerrit-Comment-Date: Mon, 03 Jun 2024 20:37:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes