Attention is currently required from: Patrick Rudolph.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59874 )
Change subject: src/arch/x86/c_start.S: Add proper x86_64 code
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/59874/comment/8a6705de_bcd30423
PS1, Line 9: assemlby
assem_bl_y
--
To view, visit https://review.coreboot.org/c/coreboot/+/59874
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifc9b45f69d0b7534b2faacaad0d099cef2667478
Gerrit-Change-Number: 59874
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Comment-Date: Fri, 03 Dec 2021 19:34:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Patrick Rudolph.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59873 )
Change subject: src/arch/x86/exit_car: Add proper x86_64 code
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/59873/comment/e2e5bda5_2ce5ef61
PS1, Line 9: assemlby
assem_bl_y
--
To view, visit https://review.coreboot.org/c/coreboot/+/59873
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I42d1086f1220e44076ccf613244fc3c6d804805b
Gerrit-Change-Number: 59873
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Comment-Date: Fri, 03 Dec 2021 19:33:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Patrick Rudolph, Arthur Heymans, Angel Pons.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59872 )
Change subject: src/mainboard/emulation/qemu-i440fx: Fix struct packing
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/59872/comment/9c571b2f_7154440a
PS1, Line 10: invlid
inv_a_lid
--
To view, visit https://review.coreboot.org/c/coreboot/+/59872
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id1bab99f06be99674efe219dda443fb7d44be560
Gerrit-Change-Number: 59872
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Comment-Date: Fri, 03 Dec 2021 19:32:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59874 )
Change subject: src/arch/x86/c_start.S: Add proper x86_64 code
......................................................................
src/arch/x86/c_start.S: Add proper x86_64 code
Don't truncate upper bits in assemlby code and thus allow loading
of ramstage above 4GiB. Tested on qemu.
Change-Id: Ifc9b45f69d0b7534b2faacaad0d099cef2667478
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/arch/x86/c_start.S
1 file changed, 35 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/59874/1
diff --git a/src/arch/x86/c_start.S b/src/arch/x86/c_start.S
index 9e718fc..c979e81 100644
--- a/src/arch/x86/c_start.S
+++ b/src/arch/x86/c_start.S
@@ -62,6 +62,24 @@
leal _stack, %edi
#endif
+#if ENV_X86_64
+ /** poison the stack. Code should not count on the
+ * stack being full of zeros. This stack poisoning
+ * recently uncovered a bug in the broadcast SIPI
+ * code.
+ */
+ movabs $_estack, %rcx
+ sub %rdi, %rcx
+ shr $3, %rcx /* it is 64 bit aligned, right? */
+ movq $0xDEADBEEFDEADBEEF, %rax
+ rep
+ stosq
+
+ /* Set new stack with enforced alignment. */
+ movabs $_estack, %rsp
+ movq $(~(CONFIG_STACK_SIZE-1)), %rax
+ and %rax, %rsp
+#else
/** poison the stack. Code should not count on the
* stack being full of zeros. This stack poisoning
* recently uncovered a bug in the broadcast SIPI
@@ -77,13 +95,23 @@
/* Set new stack with enforced alignment. */
movl $_estack, %esp
andl $(~(CONFIG_STACK_SIZE-1)), %esp
-
+#endif
push_cpu_info
#if CONFIG(CPU_INFO_V2)
/* Allocate the per_cpu_segment_data on the stack */
push_per_cpu_segment_data
+#if ENV_X86_64
+ /*
+ * Update the BSP's per_cpu_segment_descriptor to point to the
+ * per_cpu_segment_data that was allocated on the stack.
+ */
+ set_segment_descriptor_base $per_cpu_segment_descriptors, %esp
+
+ movabs per_cpu_segment_selector, %rax
+ mov %eax, %gs
+#else
/*
* Update the BSP's per_cpu_segment_descriptor to point to the
* per_cpu_segment_data that was allocated on the stack.
@@ -93,6 +121,7 @@
mov per_cpu_segment_selector, %eax
mov %eax, %gs
#endif
+#endif
/*
* Now we are finished. Memory is up, data is copied and
@@ -101,7 +130,12 @@
*/
post_code(POST_PRE_HARDWAREMAIN) /* post 6e */
+#if ENV_X86_64
+ movq $0xFFFFFFFFFFFFFFF0, %rax
+ and %rax, %rsp
+#else
andl $0xFFFFFFF0, %esp
+#endif
#if CONFIG(ASAN_IN_RAMSTAGE)
call asan_init
--
To view, visit https://review.coreboot.org/c/coreboot/+/59874
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifc9b45f69d0b7534b2faacaad0d099cef2667478
Gerrit-Change-Number: 59874
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Attention is currently required from: Patrick Rudolph.
Patrick Rudolph has uploaded a new patch set (#18) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/30119 )
Change subject: arch/x86/mmu: Port armv8 MMU to x86_64
......................................................................
arch/x86/mmu: Port armv8 MMU to x86_64
Add functions to set up page tables for long mode.
In addition generate new page tables where necessary:
- before CBMEM setup, if CBMEM is above 4GiB
- after CBMEM setup, if CBMEM is above 4GiB
- at end of BS_DEV_RESOURCES in CBMEM
At end of BS_DEV_RESOURCES the memory map is fully known and the
page tables can be properly generated based on the memory resources.
This allows the CPU to access all DRAM and MMIO even beyond 4GiB.
Right now there's no use case for this, but the code is necessary to:
- Load stages above 4GiB
- Load payloads above 4GiB
- Install tables (like CBMEM/ACPI/SMBIOS) above 4GiB
- allow coreboot PCI drivers to access BARs mapped above 4GiB
Tested on prodrive/hermes: Still boots to payload.
Doesn't affect existing x86_32 code.
Change-Id: I6e8b46e65925823a84b8ccd647c7d6848aa20992
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
M src/arch/x86/Makefile.inc
A src/arch/x86/include/arch/mmu.h
A src/arch/x86/mmu-ramstage.c
A src/arch/x86/mmu-romstage.c
A src/arch/x86/mmu.c
M src/commonlib/include/commonlib/cbmem_id.h
M src/lib/imd_cbmem.c
7 files changed, 630 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/30119/18
--
To view, visit https://review.coreboot.org/c/coreboot/+/30119
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6e8b46e65925823a84b8ccd647c7d6848aa20992
Gerrit-Change-Number: 30119
Gerrit-PatchSet: 18
Gerrit-Owner: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newpatchset