Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44733 )
Change subject: Documentation: Add known bugs of x86_64 code on real hardware
......................................................................
Documentation: Add known bugs of x86_64 code on real hardware
The bugs happen on real hardware or in qemu with KVM enabled.
The very same code runs on some real devices and it runs in qemu
with KVM disabled.
The bugs are so strange that no root cause could be found yet.
Change-Id: I01050f2e38f92c6b96e3258a5b619aa9ee685acc
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M Documentation/arch/x86/index.md
1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/44733/1
diff --git a/Documentation/arch/x86/index.md b/Documentation/arch/x86/index.md
index 11d8a4f..a5406c0 100644
--- a/Documentation/arch/x86/index.md
+++ b/Documentation/arch/x86/index.md
@@ -65,3 +65,18 @@
* Test how well CAR works with x86_64 and paging
* Improve mode switches
* Test libgfxinit / VGA Option ROMs / FSP
+
+## Known bugs on real hardware
+
+The `x86_64` reference code runs fine in qemu and on some real x86 platforms.
+However some issues have been observed and no workaround or explanation could
+be found. It either works fine or not at all. Here's a list of known issues:
+
+* After entering long mode the FPU doesn't work any more, including accessing
+ MMX register. It works fine before entering long mode.
+* Reading from virtual memory where the lower twelve address bits are zero
+ returns a fixed constant. Writing to that memory location has no effect.
+ Depeding on the variables stored in heap and stack and where the code
+ resides, undefined behaviour happens whenever the lower twelve bits are zero.
+* Disabling paging in compability mode crashes the CPU.
+* Returning from long mode to compability mode crashes the CPU.
--
To view, visit https://review.coreboot.org/c/coreboot/+/44733
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I01050f2e38f92c6b96e3258a5b619aa9ee685acc
Gerrit-Change-Number: 44733
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Hello Aaron Durbin,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/46482
to review the following change.
Change subject: prog_loaders: Switch prog_locate() to new CBFS API
......................................................................
prog_loaders: Switch prog_locate() to new CBFS API
This patch changes prog_locate() to use the new cbfs_boot_lookup()
instead of cbfs_boot_locate(), in preparation for the following changes.
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: Iad80de16a9f5faae50d444b854b50a45166fb2e2
---
M src/include/program_loading.h
M src/lib/prog_loaders.c
2 files changed, 12 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/46482/1
diff --git a/src/include/program_loading.h b/src/include/program_loading.h
index fae70ce..e5a2931 100644
--- a/src/include/program_loading.h
+++ b/src/include/program_loading.h
@@ -4,8 +4,7 @@
#include <bootmem.h>
#include <commonlib/region.h>
-#include <stdint.h>
-#include <stddef.h>
+#include <types.h>
enum {
/* Last segment of program. Can be used to take different actions for
@@ -128,7 +127,7 @@
}
/* Locate the identified program to run. Return 0 on success. < 0 on error. */
-int prog_locate(struct prog *prog);
+cb_err_t prog_locate(struct prog *prog);
/* The prog_locate_hook() is called prior to CBFS traversal. The hook can be
* used to implement policy that allows or prohibits further progress through
* prog_locate(). The type and name field within struct prog are the only valid
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c
index 93efc0a..4fae5d2 100644
--- a/src/lib/prog_loaders.c
+++ b/src/lib/prog_loaders.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <cbfs.h>
+#include <cbfs_private.h>
#include <cbmem.h>
#include <console/console.h>
#include <fallback.h>
@@ -22,21 +23,20 @@
const struct mem_region_device addrspace_32bit =
MEM_REGION_DEV_RO_INIT(0, ~0UL);
-int prog_locate(struct prog *prog)
+cb_err_t prog_locate(struct prog *prog)
{
- struct cbfsf file;
+ union cbfs_mdata mdata;
+ cb_err_t err;
if (prog_locate_hook(prog))
- return -1;
+ return CB_ERR;
- if (cbfs_boot_locate(&file, prog_name(prog), NULL))
- return -1;
+ err = cbfs_boot_lookup(prog_name(prog), false, &mdata, prog_rdev(prog));
+ if (err != CB_SUCCESS)
+ return err;
- cbfsf_file_type(&file, &prog->cbfs_type);
-
- cbfs_file_data(prog_rdev(prog), &file);
-
- return 0;
+ prog->cbfs_type = be32toh(mdata.h.type);
+ return CB_SUCCESS;
}
void run_romstage(void)
--
To view, visit https://review.coreboot.org/c/coreboot/+/46482
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iad80de16a9f5faae50d444b854b50a45166fb2e2
Gerrit-Change-Number: 46482
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46941 )
Change subject: cpu/intel/haswell: Add delay for TPM before Flex Ratio reboot
......................................................................
cpu/intel/haswell: Add delay for TPM before Flex Ratio reboot
Commit 542307b (broadwell: Add small delay before Flex Ratio reboot)
introduced a workaround for Broadwell. Implement it on Haswell as well.
Since this is only necessary when a TPM is present on a system, only do
the delay (which is not that small, to be honest) on TPM-enabled builds.
Change-Id: Id8b58e9fa2a1c81989305f5b4b765b82c01e1596
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/cpu/intel/haswell/bootblock.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/46941/1
diff --git a/src/cpu/intel/haswell/bootblock.c b/src/cpu/intel/haswell/bootblock.c
index c9e3f2a..7066637 100644
--- a/src/cpu/intel/haswell/bootblock.c
+++ b/src/cpu/intel/haswell/bootblock.c
@@ -4,6 +4,7 @@
#include <arch/bootblock.h>
#include <cpu/x86/msr.h>
#include <arch/io.h>
+#include <delay.h>
#include <halt.h>
#include "haswell.h"
@@ -50,6 +51,10 @@
/* Set soft reset control to use register value */
RCBA32_OR(SOFT_RESET_CTRL, 1);
+ /* Delay before reset to avoid potential TPM lockout */
+ if (CONFIG(TPM1) || CONFIG(TPM2))
+ mdelay(30);
+
/* Issue warm reset, will be "CPU only" due to soft reset data */
outb(0x0, 0xcf9);
outb(0x6, 0xcf9);
--
To view, visit https://review.coreboot.org/c/coreboot/+/46941
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id8b58e9fa2a1c81989305f5b4b765b82c01e1596
Gerrit-Change-Number: 46941
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange