From 57907fcebf12961a0dbd7300472a83711d251375 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 15 Nov 2018 13:42:15 +0100 Subject: mb/emulation/qemu-q35,qemu-i440fx: Add x86_64 support * Enable optional x86_64 romstage, postcar and ramstage * Add Kconfig for x86_64 compilation * Add documentation for x86 qemu mainboards * Increase CAR stack as x86_64 uses more than 0x4000 bytes Working: * Boots to Linux * Boots to SeaBIOS * Drops to protected mode at end of ramstage * Enumerates PCI devices * Relocateable ramstage * SMM Change-Id: If2f02a95b2f91ab51043d4e81054354f4a6eb5d5 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/29667 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- Documentation/arch/x86/index.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'Documentation/arch') diff --git a/Documentation/arch/x86/index.md b/Documentation/arch/x86/index.md index 7b9e1fcfa0..11d8a4f77b 100644 --- a/Documentation/arch/x86/index.md +++ b/Documentation/arch/x86/index.md @@ -5,10 +5,11 @@ This section contains documentation about coreboot on x86 architecture. * [x86 PAE support](pae.md) ## State of x86_64 support -At the moment there's no single board that supports x86_64 or to be exact -`ARCH_RAMSTAGE_X86_64` and `ARCH_ROMSTAGE_X86_64`. +At the moment there's only experimental x86_64 support. +The `emulation/qemu-i440fx` and `emulation/qemu-q35` boards do support +*ARCH_RAMSTAGE_X86_64* , *ARCH_POSTCAR_X86_64* and *ARCH_ROMSTAGE_X86_64*. -In order to add support for x86_64 the following assumptions are made: +In order to add support for x86_64 the following assumptions were made: * The CPU supports long mode * All memory returned by malloc must be below 4GiB in physical memory * All code that is to be run must be below 4GiB in physical memory @@ -39,18 +40,16 @@ The page tables contains the following structure: At the moment *$n* is 4, which results in identity mapping the lower 4 GiB. -## Steps to add basic support for x86_64 -* Add x86_64 toolchain support - *DONE* -* Fix compilation errors - *DONE* -* Fix linker errors - *TODO* -* Add x86_64 rmodule support - *DONE* -* Add x86_64 exception handlers - *DONE* -* Setup page tables for long mode - *DONE* -* Add assembly code for long mode - *DONE* -* Add assembly code for SMM - *DONE* -* Add assembly code for postcar stage - *DONE* -* Add assembly code to return to protected mode - *DONE* -* Implement reference code for mainboard `emulation/qemu-q35` - *TODO* +## Basic x86_64 support +Basic support for x86_64 has been implemented for QEMU mainboard target. + +## Reference implementation +The reference implementation is +* [QEMU i440fx](../../mainboard/emulation/qemu-i440fx.md) +* [QEMU Q35](../../mainboard/emulation/qemu-q35.md) + +## TODO +* Identity map memory above 4GiB in ramstage ## Future work -- cgit v1.2.3