Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34993 )
Change subject: arch/x86: Include cbmem region into postcar_frame
......................................................................
arch/x86: Include cbmem region into postcar_frame
This patch signals to the system that cbmem region also needs to be
accounted for as it holds cbmem metadata.
Change-Id: Ibd2ded90f4faa5d4996f3aefb4da9083a42e0aa8
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
M src/arch/x86/include/arch/cpu.h
M src/arch/x86/postcar_loader.c
2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/34993/1
diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h
index 075e890..42c8a97 100644
--- a/src/arch/x86/include/arch/cpu.h
+++ b/src/arch/x86/include/arch/cpu.h
@@ -300,6 +300,8 @@
struct postcar_frame {
uintptr_t stack_top;
uintptr_t stack;
+ uintptr_t cbmem_top;
+ size_t cbmem_size;
uint32_t upper_mask;
int max_var_mtrrs;
int num_var_mtrrs;
diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c
index d017260..94fde20 100644
--- a/src/arch/x86/postcar_loader.c
+++ b/src/arch/x86/postcar_loader.c
@@ -69,6 +69,9 @@
/* Keep track of stack top to calculate size used */
pcf->stack_top = pcf->stack;
pcf->stack_top += stack_size;
+ /* Keep track of cbem top and its size */
+ pcf->cbmem_top = (uintptr_t) cbmem_top();
+ pcf->cbmem_size = cbmem_overhead_size();
return 0;
}
@@ -158,6 +161,9 @@
SEG_FINAL);
/* Also signal the stack region that was written as well */
prog_segment_loaded(pcf->stack, pcf->stack_top - pcf->stack, SEG_FINAL);
+ /* Also signal that cbmem region that was written as well */
+ prog_segment_loaded(pcf->cbmem_top - pcf->cbmem_size, pcf->cbmem_size,
+ SEG_FINAL);
}
static void load_postcar_cbfs(struct prog *prog, struct postcar_frame *pcf)
--
To view, visit https://review.coreboot.org/c/coreboot/+/34993
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibd2ded90f4faa5d4996f3aefb4da9083a42e0aa8
Gerrit-Change-Number: 34993
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: newchange
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34994 )
Change subject: arch/x86: Add postcar_frame_setup_top_of_dram_usage() API
......................................................................
arch/x86: Add postcar_frame_setup_top_of_dram_usage() API
This patch adds new API for intermediate caching top_of_ram
and setting up required MTRR for next stage.
Change-Id: I28d0507083d84e10eef6e1e5482a805067e23847
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
M src/arch/x86/include/arch/cpu.h
M src/arch/x86/postcar_loader.c
2 files changed, 40 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/34994/1
diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h
index 42c8a97..efee12d 100644
--- a/src/arch/x86/include/arch/cpu.h
+++ b/src/arch/x86/include/arch/cpu.h
@@ -332,6 +332,15 @@
void postcar_frame_common_mtrrs(struct postcar_frame *pcf);
/*
+ * This API performs below operations:
+ * 1. Add variable MTRR covering the Top of DRAM with given MTRR type
+ * 2. Enable intermediate caching of Top of DRAM with given size to speed up
+ * next stage loading and decompression.
+ */
+void postcar_frame_setup_top_of_dram_usage(struct postcar_frame *pcf,
+ uintptr_t addr, size_t size, int type);
+
+/*
* Push used MTRR and Max MTRRs on to the stack
* and return pointer to stack top.
*/
diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c
index 94fde20..f308298 100644
--- a/src/arch/x86/postcar_loader.c
+++ b/src/arch/x86/postcar_loader.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <arch/acpi.h>
#include <arch/cpu.h>
#include <cbmem.h>
#include <console/console.h>
@@ -138,6 +139,36 @@
postcar_frame_add_romcache(pcf, MTRR_TYPE_WRPROT);
}
+/*
+ * Make sure we are enabling intermediate caching to speed up next stage
+ * (postcar/romstage) loading and decompression as we are still in romstage
+ * and CAR tear down will be handled by next stage at its entry.
+ */
+static void enable_top_of_dram_cache(uintptr_t base, size_t size, int type)
+{
+ int mtrr = get_free_var_mtrr();
+
+ if (mtrr == -1)
+ return;
+
+ /* FIXME: setting up type = WB causing hang while loading next stage */
+ set_var_mtrr(mtrr, base, size, type);
+}
+
+void postcar_frame_setup_top_of_dram_usage(struct postcar_frame *pcf,
+ uintptr_t addr, size_t size, int type)
+{
+ /*
+ * Enable intermediate caching for Top of DRAM to speed up
+ * next stage loading. No need to enable intermediate caching in S3
+ * resume path as next stage will be fetched from stage cache
+ * without any additional locate/decompression logic as normal boot.
+ */
+ if (!acpi_is_wakeup_s3())
+ enable_top_of_dram_cache(addr, size, type);
+ postcar_frame_add_mtrr(pcf, addr, size, type);
+}
+
void *postcar_commit_mtrrs(struct postcar_frame *pcf)
{
/*
--
To view, visit https://review.coreboot.org/c/coreboot/+/34994
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I28d0507083d84e10eef6e1e5482a805067e23847
Gerrit-Change-Number: 34994
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: newchange
Philipp Hug has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35247 )
Change subject: docs/mb/qemu-riscv: elf conversion no longer needed with qemu v4.1.0
......................................................................
docs/mb/qemu-riscv: elf conversion no longer needed with qemu v4.1.0
Change-Id: I1257f474e23da0a00e149c8ba8b5ec33253a7b98
Signed-off-by: Philipp Hug <philipp(a)hug.cx>
---
M Documentation/mainboard/emulation/qemu-riscv.md
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/35247/1
diff --git a/Documentation/mainboard/emulation/qemu-riscv.md b/Documentation/mainboard/emulation/qemu-riscv.md
index 3aad816..97a4532 100644
--- a/Documentation/mainboard/emulation/qemu-riscv.md
+++ b/Documentation/mainboard/emulation/qemu-riscv.md
@@ -1,8 +1,11 @@
# Qemu RISC-V emulator
-## Building coreboot and running it in Qemu
+## Building coreboot and running it in Qemu >= v4.1.0
-- Configure coreboot and run `make` as usual
+- Configure coreboot and run`make`as usual
+- Run `qemu-system-riscv64 -M virt -m 1024M -nographic -bios build/coreboot.rom`
+
+## Building coreboot and running it in Qemu < v4.1.0
- Run `util/riscv/make-spike-elf.sh build/coreboot.rom build/coreboot.elf` to
convert coreboot to an ELF that Qemu can load
- Run `qemu-system-riscv64 -M virt -m 1024M -nographic -kernel build/coreboot.elf`
--
To view, visit https://review.coreboot.org/c/coreboot/+/35247
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1257f474e23da0a00e149c8ba8b5ec33253a7b98
Gerrit-Change-Number: 35247
Gerrit-PatchSet: 1
Gerrit-Owner: Philipp Hug <philipp(a)hug.cx>
Gerrit-MessageType: newchange
Christoph Pomaska has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35912 )
Change subject: [WIP] Documentation/basics: Add Super I/O section
......................................................................
[WIP] Documentation/basics: Add Super I/O section
This file contains and is supposed to contain basic information about
what a Super I/O is and what it does.
Change-Id: If288dcd79c4622a712868229b18f8b38e71d4af9
Signed-off-by: Christoph Pomaska <c.pomaska(a)hosting.de>
---
A Documentation/basics/superio.md
1 file changed, 29 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/35912/1
diff --git a/Documentation/basics/superio.md b/Documentation/basics/superio.md
new file mode 100644
index 0000000..5f17a4c
--- /dev/null
+++ b/Documentation/basics/superio.md
@@ -0,0 +1,29 @@
+# What is super I/O?
+
+Super I/O chips are a component that exist in PCs since the 1980s
+and are usually connected via ISA/LPC. They are specific to x86 based platforms.
+
+Super I/O components have a wide range of tasks, from which the most widely known are:
+- serial (e.g. RS232)
+- PS/2
+- parallel (IEEE 1284)
+- floppy-disk-controller
+- PECI (Platform Enviroment Controller Interface)
+
+They can also act as an EC (Embedded Controller) managing things like:
+- fancontrol
+- battery charge controlling (on laptops)
+- LED control
+
+BMC (Board Management Controller) and manage IPMI (Intelligent Platform Management Interface).
+Very most x86 mainboards have at least one Super I/O chip.
+
+In case of the Supermicro [X10SLM+-F](https://www.supermicro.com/en/products/motherboard/x10slm+-f) there is a Nuvoton NCT6776 and an Aspeed AST2400 used.
+The Nuvoton chip manages serial, PS/2 and hardware monitoring while the Aspeed chip manages the BMC functionality.
+As another example does the Supermicro X11SSH-TF board solely use the same Aspeed chip as BMC, but also for serial.
+
+
+## Super I/O and coreboot
+The registers that need to be configured to make a Super I/O work are mostly vendor-specific, but sometimes also chip-specific.
+coreboot ships a tool called [superiotool](../util.md) that reads out the most commonly used registers to determine which chip could be used on the board.
+Conveniently it also prints out the registers and their contents in case a superio is detected.
--
To view, visit https://review.coreboot.org/c/coreboot/+/35912
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If288dcd79c4622a712868229b18f8b38e71d4af9
Gerrit-Change-Number: 35912
Gerrit-PatchSet: 1
Gerrit-Owner: Christoph Pomaska <github(a)aufmachen.jetzt>
Gerrit-MessageType: newchange
Daniel Maslowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36010 )
Change subject: Documentation: add Gigabyte P34G v2
......................................................................
Documentation: add Gigabyte P34G v2
Change-Id: Ie8025f7bf4e7b40810c97a0b5fa80fd7c41e97eb
Signed-off-by: Daniel Maslowski <info(a)orangecms.org>
---
A Documentation/mainboard/gigabyte/p34g-v2.md
A Documentation/mainboard/gigabyte/p34g-v2_tpm_socket_spi_chip.jpg
M Documentation/mainboard/index.md
3 files changed, 89 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/36010/1
diff --git a/Documentation/mainboard/gigabyte/p34g-v2.md b/Documentation/mainboard/gigabyte/p34g-v2.md
new file mode 100644
index 0000000..4dfcf79
--- /dev/null
+++ b/Documentation/mainboard/gigabyte/p34g-v2.md
@@ -0,0 +1,88 @@
+# Gigabyte P34G v2
+
+This page describes how to run coreboot on the [Gigabyte P34G v2 gaming
+laptop](https://www.gigabyte.com/Laptop/P34G-v2).
+
+Original board name: GA-R3456R
+
+Rebrands:
+- Schenker XMG C404
+
+## Technology
+
+```eval_rst
++------------------+----------------------------------------------+
+| Northbridge | :doc:`../../northbridge/intel/haswell/index` |
++------------------+----------------------------------------------+
+| Southbridge | Lynx Point |
++------------------+----------------------------------------------+
+| CPU | i7-4710HQ |
++------------------+----------------------------------------------+
+| EC / SuperIO | ITE IT8587E |
++------------------+----------------------------------------------+
+| Coprocessor | Intel ME, `me_cleaner` untested |
++------------------+----------------------------------------------+
+| TPM | None, but socket exists (see photo below) |
++------------------+----------------------------------------------+
+```
+
+## Required proprietary blobs
+
+```eval_rst
+Please see :doc:`../../northbridge/intel/haswell/mrc.bin`.
+```
+
+## Flash chip
+
+![SPI chip and TPM location](p34g-v2_tpm_socket_spi_chip.jpg)
+
+```eval_rst
++---------------------+------------+
+| Type | Value |
++=====================+============+
+| Socketed flash | No |
++---------------------+------------+
+| Model | MX25L6406E |
++---------------------+------------+
+| Size | 8 MiB |
++---------------------+------------+
+| In circuit flashing | Yes |
++---------------------+------------+
+| Package | SOIC-8 |
++---------------------+------------+
+| Write protection | No |
++---------------------+------------+
+| Internal flashing | Untested |
++---------------------+------------+
+```
+
+## Flash layout
+
+```txt
+00000000:00000fff fd
+00400000:007fffff bios
+00001000:003fffff me
+```
+
+## EC firmware
+
+There is an additional 128KiB EC firmware blob within the BIOS region at
+`0x700000`. The EC has its own internal EPROM though, for which Gigabyte offers
+updates in a bundle with the UEFI firmware updates based on AMI Aptio. The EC
+firmware can be updated via AFU. An unmodified EC firmware version F005 seems
+to work fine with coreboot even without the extra 128KiB part. It could be
+extracted from a firmware update through `dd` etc and reinserted though. Other
+version have not been tested.
+
+## Known issues
+
+- EC / ACPI
+ * no suspend on LID close
+ * eject, sleep, backlight up/down, external screen buttons do not work
+ * Bluetooth LED shows inverted state, does not turn on on first press
+ * battery state can not be queried
+- CPU overheats on high load leading to force poweroff
+
+```eval_rst
+Please also see :doc:`../../northbridge/intel/haswell/known-issues`.
+```
diff --git a/Documentation/mainboard/gigabyte/p34g-v2_tpm_socket_spi_chip.jpg b/Documentation/mainboard/gigabyte/p34g-v2_tpm_socket_spi_chip.jpg
new file mode 100644
index 0000000..9835a8a
--- /dev/null
+++ b/Documentation/mainboard/gigabyte/p34g-v2_tpm_socket_spi_chip.jpg
Binary files differ
diff --git a/Documentation/mainboard/index.md b/Documentation/mainboard/index.md
index 83189757..f0f8f8e 100644
--- a/Documentation/mainboard/index.md
+++ b/Documentation/mainboard/index.md
@@ -40,6 +40,7 @@
## Gigabyte
- [GA-H61M-S2PV](gigabyte/ga-h61m-s2pv.md)
+- [P34G v2](gigabyte/p34g-v2.md)
## Google
--
To view, visit https://review.coreboot.org/c/coreboot/+/36010
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie8025f7bf4e7b40810c97a0b5fa80fd7c41e97eb
Gerrit-Change-Number: 36010
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Maslowski <info(a)orangecms.org>
Gerrit-MessageType: newchange