Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/79568?usp=email )
Change subject: arch/x86/include/smm_call: use pm_acpi_smi_cmd_port
......................................................................
arch/x86/include/smm_call: use pm_acpi_smi_cmd_port
Use pm_acpi_smi_cmd_port() to get the APMC trigger IO port instead of
using the hard-coded APM_CNT define. This makes sure that the correct
APMC IO port will be used even when a system doesn't use the default
APM IO port.
TEST=SMMSTORE V2 still works with the EDK2 payload on Careena
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: Icb79c91cfcd75db760bd80cff7f3d0400d1f16cd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79568
Reviewed-by: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/arch/x86/include/smm_call.h
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Matt DeVillier: Looks good to me, approved
diff --git a/src/arch/x86/include/smm_call.h b/src/arch/x86/include/smm_call.h
index c0d96c0..66925c4 100644
--- a/src/arch/x86/include/smm_call.h
+++ b/src/arch/x86/include/smm_call.h
@@ -11,13 +11,14 @@
*/
static inline u32 call_smm(u8 cmd, u8 subcmd, void *arg)
{
+ const uint16_t apmc_port = pm_acpi_smi_cmd_port();
u32 res = 0;
__asm__ __volatile__ (
"outb %%al, %%dx"
: "=a" (res)
: "a" ((subcmd << 8) | cmd),
"b" (arg),
- "d" (APM_CNT)
+ "d" (apmc_port)
: "memory");
return res;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/79568?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: Icb79c91cfcd75db760bd80cff7f3d0400d1f16cd
Gerrit-Change-Number: 79568
Gerrit-PatchSet: 9
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/79766?usp=email )
Change subject: drivers/smmstore/ramstage: use call_smm
......................................................................
drivers/smmstore/ramstage: use call_smm
Use call_smm instead of open-coding the same in inline assembly
functionality in init_store. The local ebx variable is dropped, since
call_smm takes a pointer to the argument instead of an integer, and the
local eax variable is renamed to res to make the code a bit clearer,
since the EAX register is used for both passing the command and
subcommand to the APMC SMI handler and to get the return value from the
handler.
TEST=SMMSTORE V2 still works with the EDK2 payload on Careena
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
Change-Id: Ib14de0d120ae5c7db3bb7a529837ababe653e1a2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79766
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
---
M src/drivers/smmstore/ramstage.c
1 file changed, 4 insertions(+), 11 deletions(-)
Approvals:
Matt DeVillier: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/src/drivers/smmstore/ramstage.c b/src/drivers/smmstore/ramstage.c
index ef80e22..e59090da 100644
--- a/src/drivers/smmstore/ramstage.c
+++ b/src/drivers/smmstore/ramstage.c
@@ -5,6 +5,7 @@
#include <commonlib/helpers.h>
#include <commonlib/region.h>
#include <console/console.h>
+#include <smm_call.h>
#include <smmstore.h>
#include <types.h>
#include <cbmem.h>
@@ -37,8 +38,7 @@
static void init_store(void *unused)
{
struct smmstore_params_init args;
- uint32_t eax = ~0;
- uint32_t ebx;
+ uint32_t ret = ~0;
if (smmstore_get_info(&info) < 0) {
printk(BIOS_INFO, "SMMSTORE: Failed to get meta data\n");
@@ -53,20 +53,13 @@
args.com_buffer = (uintptr_t)ptr;
args.com_buffer_size = info.block_size;
- ebx = (uintptr_t)&args;
printk(BIOS_INFO, "SMMSTORE: Setting up SMI handler\n");
/* Issue SMI using APM to update the com buffer and to lock the SMMSTORE */
- __asm__ __volatile__ (
- "outb %%al, %%dx"
- : "=a" (eax)
- : "a" ((SMMSTORE_CMD_INIT << 8) | APM_CNT_SMMSTORE),
- "b" (ebx),
- "d" (APM_CNT)
- : "memory");
+ ret = call_smm(APM_CNT_SMMSTORE, SMMSTORE_CMD_INIT, &args);
- if (eax != SMMSTORE_RET_SUCCESS) {
+ if (ret != SMMSTORE_RET_SUCCESS) {
printk(BIOS_ERR, "SMMSTORE: Failed to install com buffer\n");
return;
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/79766?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: Ib14de0d120ae5c7db3bb7a529837ababe653e1a2
Gerrit-Change-Number: 79766
Gerrit-PatchSet: 7
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Patrick Georgi.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79523?usp=email )
Change subject: libpayload: Remove shell for loops in install Makefile target
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> Oh... I had to run it to actually understand what is happening. If my […]
Done
CB:79908
--
To view, visit https://review.coreboot.org/c/coreboot/+/79523?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: I9f9dddfe3f3ceceb6a0510d6dd862351e4b10210
Gerrit-Change-Number: 79523
Gerrit-PatchSet: 4
Gerrit-Owner: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Comment-Date: Thu, 11 Jan 2024 22:16:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: comment
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/79908?usp=email )
Change subject: libpayload: Make sure to install into the right DESTDIR
......................................................................
libpayload: Make sure to install into the right DESTDIR
A recent update broke installation of commonlib headers with a relative
path in $(DESTDIR), which is the default. Make sure to install into the
right location in case we changed the current directory.
Change-Id: I61fa4aa0ecd0f81ee03ff89183e1b65e7875dea6
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
Fixes: ee53dfd07d3b (libpayload: Remove shell for loops in install Makefile target)
---
M payloads/libpayload/Makefile.inc
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/79908/1
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index e4d45a6..61f932f 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -128,8 +128,8 @@
install -m 755 -d $(DESTDIR)/libpayload/include
find include -type d -exec install -m755 -d $(DESTDIR)/libpayload/{} \;
find include -type f -exec install -m644 {} $(DESTDIR)/libpayload/{} \;
- cd $(coreboottop)/src/commonlib/bsd && find include -type d -exec install -m755 -d $(DESTDIR)/libpayload/{} \;
- cd $(coreboottop)/src/commonlib/bsd && find include -type f -exec install -m644 {} $(DESTDIR)/libpayload/{} \;
+ cd $(coreboottop)/src/commonlib/bsd && find include -type d -exec install -m755 -d $(abspath $(DESTDIR))/libpayload/{} \;
+ cd $(coreboottop)/src/commonlib/bsd && find include -type f -exec install -m644 {} $(abspath $(DESTDIR))/libpayload/{} \;
install -m 644 $(obj)/libpayload-config.h $(DESTDIR)/libpayload/include
$(foreach item,$(includes), \
install -m 755 -d $(DESTDIR)/libpayload/include/$(call extract_nth,2,$(item)); \
--
To view, visit https://review.coreboot.org/c/coreboot/+/79908?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: I61fa4aa0ecd0f81ee03ff89183e1b65e7875dea6
Gerrit-Change-Number: 79908
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Attention is currently required from: Patrick Georgi.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79523?usp=email )
Change subject: libpayload: Remove shell for loops in install Makefile target
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> Thank you for your answer. `{}` is not there: […]
Oh... I had to run it to actually understand what is happening. If my
coreboot dir wouldn't be so cluttered, I would actually have noticed
earlier that there is a spurious `src/commonlib/bsd/install` now oO
The current version only works if `$(DESTDIR)` is an absolute path,
I'll push a patch...
--
To view, visit https://review.coreboot.org/c/coreboot/+/79523?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: I9f9dddfe3f3ceceb6a0510d6dd862351e4b10210
Gerrit-Change-Number: 79523
Gerrit-PatchSet: 4
Gerrit-Owner: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Comment-Date: Thu, 11 Jan 2024 22:08:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: comment
Attention is currently required from: Martin L Roth, Martin Roth, Patrick Georgi.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79901?usp=email )
Change subject: Documentation: Start administrator handbook
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/79901?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: I87021ee62d18fa464f70351ea8bad732889d55f1
Gerrit-Change-Number: 79901
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Comment-Date: Thu, 11 Jan 2024 21:32:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Martin L Roth, Martin Roth.
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79901?usp=email )
Change subject: Documentation: Start administrator handbook
......................................................................
Patch Set 2:
(1 comment)
File Documentation/infrastructure/admin.md:
https://review.coreboot.org/c/coreboot/+/79901/comment/d12223d5_18acd45f :
PS1, Line 44: the
> That sounds confusing. […]
Good catch, fixed.
--
To view, visit https://review.coreboot.org/c/coreboot/+/79901?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: I87021ee62d18fa464f70351ea8bad732889d55f1
Gerrit-Change-Number: 79901
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Comment-Date: Thu, 11 Jan 2024 21:27:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Martin L Roth, Martin Roth, Patrick Georgi.
Hello Felix Singer, Martin L Roth, Martin Roth, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/79901?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+2 by Felix Singer, Code-Review+2 by Martin L Roth, Verified+1 by build bot (Jenkins)
Change subject: Documentation: Start administrator handbook
......................................................................
Documentation: Start administrator handbook
Let's spread the work of maintaining various of our services, but to
achieve that, we need to document what needs to be done.
Change-Id: I87021ee62d18fa464f70351ea8bad732889d55f1
Signed-off-by: Patrick Georgi <patrick(a)coreboot.org>
---
A Documentation/infrastructure/admin.md
M Documentation/infrastructure/index.md
2 files changed, 53 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/79901/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/79901?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: I87021ee62d18fa464f70351ea8bad732889d55f1
Gerrit-Change-Number: 79901
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Martin Roth, Patrick Georgi.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/79901?usp=email )
The change is no longer submittable: All-Comments-Resolved is unsatisfied now.
Change subject: Documentation: Start administrator handbook
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File Documentation/infrastructure/admin.md:
https://review.coreboot.org/c/coreboot/+/79901/comment/2cdb86e0_fc0ae93d :
PS1, Line 44: the
That sounds confusing. Should that be "be"?
--
To view, visit https://review.coreboot.org/c/coreboot/+/79901?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: I87021ee62d18fa464f70351ea8bad732889d55f1
Gerrit-Change-Number: 79901
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Comment-Date: Thu, 11 Jan 2024 21:12:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/79800?usp=email )
Change subject: libpayload: Move back the ttb_buffer section
......................................................................
libpayload: Move back the ttb_buffer section
Moving it into the .ttb_buffer section will accidentally set the LOAD
flag. So, move it back to .bss.ttb_buffer section to prevent the binary
size bloating.
BUG=b:248610274
TEST=Make sure the device is still bootable with this change.
BRANCH=none
Cq-Depend: chromium:5173448
Change-Id: I9bb08878dd4be01d9ed3f96933f774dd6296f76e
Signed-off-by: Yi Chou <yich(a)google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79800
Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-by: Paul Menzel <paulepanter(a)mailbox.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M payloads/libpayload/arch/arm64/libpayload.ldscript
M payloads/libpayload/arch/arm64/mmu.c
2 files changed, 5 insertions(+), 4 deletions(-)
Approvals:
build bot (Jenkins): Verified
Paul Menzel: Looks good to me, but someone else must approve
Julius Werner: Looks good to me, approved
diff --git a/payloads/libpayload/arch/arm64/libpayload.ldscript b/payloads/libpayload/arch/arm64/libpayload.ldscript
index c9881f7..4042e45 100644
--- a/payloads/libpayload/arch/arm64/libpayload.ldscript
+++ b/payloads/libpayload/arch/arm64/libpayload.ldscript
@@ -62,8 +62,6 @@
}
.bss : {
- *(.ttb_buffer)
-
_bss = .;
*(.sbss)
*(.sbss.*)
diff --git a/payloads/libpayload/arch/arm64/mmu.c b/payloads/libpayload/arch/arm64/mmu.c
index 5865b1b..9fc227d 100644
--- a/payloads/libpayload/arch/arm64/mmu.c
+++ b/payloads/libpayload/arch/arm64/mmu.c
@@ -41,8 +41,11 @@
static uint64_t *xlat_addr;
static int free_idx;
-static uint8_t ttb_buffer[TTB_DEFAULT_SIZE] __aligned(GRANULE_SIZE)
- __attribute__((__section__(".ttb_buffer")));
+
+/* We refer to this in the linker script for ChormeOS's depthcharge payload
+ * and to please not change the name without discussing with us.
+ * Please contact: jwerner(a)chromium.org or yich(a)chromium.org */
+static uint8_t ttb_buffer[TTB_DEFAULT_SIZE] __aligned(GRANULE_SIZE);
static const char * const tag_to_string[] = {
[TYPE_NORMAL_MEM] = "normal",
--
To view, visit https://review.coreboot.org/c/coreboot/+/79800?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: I9bb08878dd4be01d9ed3f96933f774dd6296f76e
Gerrit-Change-Number: 79800
Gerrit-PatchSet: 6
Gerrit-Owner: Yi Chou <yich(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Yidi Lin <yidilin(a)google.com>
Gerrit-MessageType: merged