Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43014 )
Change subject: arch/x86: Remove RELOCATABLE_RAMSTAGE
......................................................................
arch/x86: Remove RELOCATABLE_RAMSTAGE
We always have it, no need to support opting-out.
Change-Id: I5cbf4063c69571db92de2d321c14d30c272e8098
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/Kconfig
M src/arch/x86/Makefile.inc
D src/arch/x86/gdt.c
M src/arch/x86/memlayout.ld
M src/lib/prog_loaders.c
M src/security/memory/Kconfig
M src/security/memory/memory_clear.c
7 files changed, 5 insertions(+), 78 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/43014/1
diff --git a/src/Kconfig b/src/Kconfig
index eb85cd9..a4c2fa6 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -270,20 +270,9 @@
say N because it adds a small performance penalty and may abort
on code that happens to work in spite of the UB.
-config RELOCATABLE_RAMSTAGE
- bool
- default y if ARCH_X86
- select RELOCATABLE_MODULES
- help
- The reloctable ramstage support allows for the ramstage to be built
- as a relocatable module. The stage loader can identify a place
- out of the OS way so that copying memory is unnecessary during an S3
- wake. When selecting this option the romstage is responsible for
- determing a stack location to use for loading the ramstage.
-
choice
prompt "Stage Cache for ACPI S3 resume"
- default NO_STAGE_CACHE if !HAVE_ACPI_RESUME || !RELOCATABLE_RAMSTAGE
+ default NO_STAGE_CACHE if !HAVE_ACPI_RESUME
default TSEG_STAGE_CACHE if SMM_TSEG
config NO_STAGE_CACHE
@@ -576,7 +565,6 @@
config HAVE_ACPI_RESUME
bool
default n
- depends on RELOCATABLE_RAMSTAGE
config DISABLE_ACPI_HIBERNATE
bool
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 1a1aa40..8f71c95 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -245,7 +245,6 @@
ramstage-y += ebda.c
ramstage-y += exception.c
ramstage-y += idt.S
-ramstage-y += gdt.c
ramstage-$(CONFIG_IOAPIC) += ioapic.c
ramstage-y += memcpy.c
ramstage-y += memmove.c
@@ -294,14 +293,10 @@
ramstage-libs ?=
-ifeq ($(CONFIG_RELOCATABLE_RAMSTAGE),y)
-
# The rmodule_link definition creates an elf file with .rmod extension.
$(objcbfs)/ramstage.elf: $(objcbfs)/ramstage.debug.rmod
cp $< $@
-endif
-
$(objcbfs)/ramstage.debug: $(objgenerated)/ramstage.o $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE))
@printf " CC $(subst $(obj)/,,$(@))\n"
$(LD_ramstage) $(CPPFLAGS) $(LDFLAGS_ramstage) -o $@ -L$(obj) $< -T $(call src-to-obj,ramstage,$(CONFIG_MEMLAYOUT_LD_FILE))
diff --git a/src/arch/x86/gdt.c b/src/arch/x86/gdt.c
deleted file mode 100644
index 9c85566..0000000
--- a/src/arch/x86/gdt.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <types.h>
-#include <string.h>
-#include <cbmem.h>
-#include <commonlib/helpers.h>
-#include <console/console.h>
-#include <cpu/x86/gdt.h>
-
-/* i386 lgdt argument */
-struct gdtarg {
- u16 limit;
-#ifdef __x86_64__
- u64 base;
-#else
- u32 base;
-#endif
-} __packed;
-
-/*
- * Copy GDT to new location and reload it.
- * FIXME: We only do this for BSP CPU.
- */
-static void move_gdt(int is_recovery)
-{
- void *newgdt;
- u16 num_gdt_bytes;
- struct gdtarg gdtarg;
-
- /* ramstage is already in high memory. No need to use a new gdt. */
- if (CONFIG(RELOCATABLE_RAMSTAGE))
- return;
-
- newgdt = cbmem_find(CBMEM_ID_GDT);
- num_gdt_bytes = (uintptr_t)&gdt_end - (uintptr_t)&gdt;
- if (!newgdt) {
- newgdt = cbmem_add(CBMEM_ID_GDT, ALIGN_UP(num_gdt_bytes, 512));
- if (!newgdt) {
- printk(BIOS_ERR, "Error: Could not relocate GDT.\n");
- return;
- }
- memcpy((void *)newgdt, &gdt, num_gdt_bytes);
- }
- printk(BIOS_DEBUG, "Moving GDT to %p...", newgdt);
-
- gdtarg.base = (uintptr_t)newgdt;
- gdtarg.limit = num_gdt_bytes - 1;
-
- __asm__ __volatile__ ("lgdt %0\n\t" : : "m" (gdtarg));
- printk(BIOS_DEBUG, "ok\n");
-}
-RAMSTAGE_CBMEM_INIT_HOOK(move_gdt)
diff --git a/src/arch/x86/memlayout.ld b/src/arch/x86/memlayout.ld
index 12974ca..3659cc9 100644
--- a/src/arch/x86/memlayout.ld
+++ b/src/arch/x86/memlayout.ld
@@ -13,8 +13,7 @@
* conditionalize with macros.
*/
#if ENV_RAMSTAGE
- RAMSTAGE(CONFIG_RAMBASE, (CONFIG(RELOCATABLE_RAMSTAGE) ? 8M :
- CONFIG_RAMTOP - CONFIG_RAMBASE))
+ RAMSTAGE(CONFIG_RAMBASE, 8M)
#elif ENV_ROMSTAGE
/* The 1M size is not allocated. It's just for basic size checking.
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 69e81cd..39412ba 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -129,9 +129,8 @@
timestamp_add_now(TS_START_COPYRAM);
- if (CONFIG(RELOCATABLE_RAMSTAGE)) {
- if (load_relocatable_ramstage(&ramstage))
- goto fail;
+ if (ENV_X86 && load_relocatable_ramstage(&ramstage))
+ goto fail;
} else if (cbfs_prog_stage_load(&ramstage))
goto fail;
diff --git a/src/security/memory/Kconfig b/src/security/memory/Kconfig
index 5104f34..1f5aae1 100644
--- a/src/security/memory/Kconfig
+++ b/src/security/memory/Kconfig
@@ -6,7 +6,6 @@
bool
default y if ARCH_X86
default n
- depends on RELOCATABLE_RAMSTAGE
help
Selected by platforms that support clearing all DRAM
after DRAM initialization.
diff --git a/src/security/memory/memory_clear.c b/src/security/memory/memory_clear.c
index 031ca84..557125d 100644
--- a/src/security/memory/memory_clear.c
+++ b/src/security/memory/memory_clear.c
@@ -77,8 +77,7 @@
void *baseptr = NULL;
size_t size = 0;
- /* Only skip CBMEM, as RELOCATABLE_RAMSTAGE is a requirement, no need
- * to separately protect stack or heap */
+ /* Only skip CBMEM, stage program, stack and heap are included there. */
cbmem_get_region(&baseptr, &size);
memranges_insert(&mem, (uintptr_t)baseptr, size, BM_MEM_TABLE);
--
To view, visit https://review.coreboot.org/c/coreboot/+/43014
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5cbf4063c69571db92de2d321c14d30c272e8098
Gerrit-Change-Number: 43014
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: newchange
Hello Yu-Ping Wu,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/42845
to review the following change.
Change subject: libpayload: cbgfx: Fix add_fractions() overflow reduction
......................................................................
libpayload: cbgfx: Fix add_fractions() overflow reduction
log2(1) is 0 and log2(0) is -1. If we have the int64_t 0xffffffff then
log2(0xffffffff >> 31) = log2(0x1) = 0, so the current reduction code
would not shift. That's a bad idea, though, since 0xffffffff when
interpreted as an int32_t would become a negative number.
We need to always shift one more than the current code does to get a
safe reduction. This also means we can get rid of another compare/branch
since -1 is the smallest result log2() can return, so the shift can no
longer go negative now.
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: Ib1eb6364c35c26924804261c02171139cdbd1034
---
M payloads/libpayload/drivers/video/graphics.c
1 file changed, 3 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/42845/1
diff --git a/payloads/libpayload/drivers/video/graphics.c b/payloads/libpayload/drivers/video/graphics.c
index 81d2bb9..97334af 100644
--- a/payloads/libpayload/drivers/video/graphics.c
+++ b/payloads/libpayload/drivers/video/graphics.c
@@ -85,13 +85,9 @@
n = (int64_t)f1->n * f2->d + (int64_t)f2->n * f1->d;
d = (int64_t)f1->d * f2->d;
/* Simplest way to reduce the fraction until fitting in int32_t */
- shift = log2(MAX(ABS(n), ABS(d)) >> 31);
- if (shift > 0) {
- n >>= shift;
- d >>= shift;
- }
- out->n = n;
- out->d = d;
+ shift = log2(MAX(ABS(n), ABS(d)) >> 31) + 1;
+ out->n = n >> shift;
+ out->d = d >> shift;
}
static void add_scales(struct scale *out,
--
To view, visit https://review.coreboot.org/c/coreboot/+/42845
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib1eb6364c35c26924804261c02171139cdbd1034
Gerrit-Change-Number: 42845
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newchange
Hello Kangheui Won, Chris Wang,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/42998
to review the following change.
Change subject: mb/google/zork: Apply cereme telemetry settings for dalboz
......................................................................
mb/google/zork: Apply cereme telemetry settings for dalboz
Currently, the telemetry settings are not for the pollock platform
and might causethe power and performance issue. so applied the Pollock
reference board settings to Dalboz to improve the performance,
and the values need to be updated after the SDLE test finished.
BUG=b:157961590,b:152922299
BRANCH=trembyle-bringup
TEST=Build.
Change-Id: I0da5b81afaa5814c13ec0257dc0eb3471be94c29
Signed-off-by: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/…
Reviewed-by: Kangheui Won <khwon(a)chromium.org>
---
M src/mainboard/google/zork/variants/dalboz/overridetree.cb
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/42998/1
diff --git a/src/mainboard/google/zork/variants/dalboz/overridetree.cb b/src/mainboard/google/zork/variants/dalboz/overridetree.cb
index 8ac3348..587d1c5 100644
--- a/src/mainboard/google/zork/variants/dalboz/overridetree.cb
+++ b/src/mainboard/google/zork/variants/dalboz/overridetree.cb
@@ -17,6 +17,11 @@
# End : OPN Performance Configuration
+ register "telemetry_vddcr_vdd_slope" = "32239" #mA
+ register "telemetry_vddcr_vdd_offset" = "0-37"
+ register "telemetry_vddcr_soc_slope" = "22313" #mA
+ register "telemetry_vddcr_soc_offset" = "0-209"
+
# I2C2 for touchscreen and trackpad
register "i2c[2]" = "{
.speed = I2C_SPEED_FAST,
--
To view, visit https://review.coreboot.org/c/coreboot/+/42998
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0da5b81afaa5814c13ec0257dc0eb3471be94c29
Gerrit-Change-Number: 42998
Gerrit-PatchSet: 1
Gerrit-Owner: chris wang <Chris.Wang(a)amd.com>
Gerrit-Reviewer: Chris Wang <chris.wang(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Kangheui Won <khwon(a)chromium.org>
Gerrit-MessageType: newchange
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42905 )
Change subject: mb/google/volteer: Add support for passive USB-C daughterboard
......................................................................
mb/google/volteer: Add support for passive USB-C daughterboard
The USB-C SBU and HSL orientation configuration depends on the USB
daughterboard used on the system. This patch adds an additional
configuration for supporting passive USB daughterboards using "probe"
directives to select the appropriate configuration at runtime.
BUG=b:158673460
TEST=verified active USB DBs enumerate at USB3 speeds in linux
Signed-off-by: Caveh Jalali <caveh(a)chromium.org>
Change-Id: Ia4bd97de8f974531f97469a5e47ecf4d948beca9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42905
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
---
M src/mainboard/google/volteer/variants/volteer/overridetree.cb
1 file changed, 14 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/mainboard/google/volteer/variants/volteer/overridetree.cb b/src/mainboard/google/volteer/variants/volteer/overridetree.cb
index c32b80e..577f7c8 100644
--- a/src/mainboard/google/volteer/variants/volteer/overridetree.cb
+++ b/src/mainboard/google/volteer/variants/volteer/overridetree.cb
@@ -156,7 +156,20 @@
register "usb3_port_number" = "2"
# SBU is fixed, HSL follows CC
register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL"
- device generic 1 on end
+ device generic 1 on
+ probe DB_USB USB4_GEN2
+ probe DB_USB USB3_ACTIVE
+ probe DB_USB USB4_GEN3
+ probe DB_USB USB3_NO_A
+ end
+ end
+ chip drivers/intel/pmc_mux/con
+ register "usb2_port_number" = "4"
+ register "usb3_port_number" = "2"
+ # SBU & HSL follow CC
+ device generic 1 on
+ probe DB_USB USB3_PASSIVE
+ end
end
end
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/42905
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia4bd97de8f974531f97469a5e47ecf4d948beca9
Gerrit-Change-Number: 42905
Gerrit-PatchSet: 2
Gerrit-Owner: Caveh Jalali <caveh(a)chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged