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
Daniel Maslowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36071 )
Change subject: superio: IT8587E (WIP)
......................................................................
superio: IT8587E (WIP)
Change-Id: I1e541daa2b3d48a4f5a0e7b7fa88a2c2f8a1b0c5
Signed-off-by: Daniel Maslowski <info(a)orangecms.org>
---
A src/superio/ite/it8587e/Kconfig
A src/superio/ite/it8587e/Makefile.inc
A src/superio/ite/it8587e/it8587e.h
A src/superio/ite/it8587e/superio.c
4 files changed, 137 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/36071/1
diff --git a/src/superio/ite/it8587e/Kconfig b/src/superio/ite/it8587e/Kconfig
new file mode 100644
index 0000000..438bd3e
--- /dev/null
+++ b/src/superio/ite/it8587e/Kconfig
@@ -0,0 +1,16 @@
+##
+## This file is part of the coreboot project.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+config SUPERIO_ITE_IT8587E
+ bool
+ select SUPERIO_ITE_COMMON_PRE_RAM
diff --git a/src/superio/ite/it8587e/Makefile.inc b/src/superio/ite/it8587e/Makefile.inc
new file mode 100644
index 0000000..dbde0b7
--- /dev/null
+++ b/src/superio/ite/it8587e/Makefile.inc
@@ -0,0 +1,15 @@
+##
+## This file is part of the coreboot project.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+ramstage-$(CONFIG_SUPERIO_ITE_IT8587E) += superio.c
diff --git a/src/superio/ite/it8587e/it8587e.h b/src/superio/ite/it8587e/it8587e.h
new file mode 100644
index 0000000..eab3527
--- /dev/null
+++ b/src/superio/ite/it8587e/it8587e.h
@@ -0,0 +1,34 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef SUPERIO_ITE_IT8587E_H
+#define SUPERIO_ITE_IT8587E_H
+
+#define IT8528E_SP1 0x01 /* Com1 */
+#define IT8528E_SP2 0x02 /* Com2 */
+#define IT8587E_SWUC 0x04 /* System Wake-Up */
+#define IT8587E_KBCM 0x05 /* PS/2 mouse */
+#define IT8587E_KBCK 0x06 /* PS/2 keyboard */
+#define IT8587E_SMFI 0x0f /* Shared Memory/Flash Interface */
+#define IT8587E_RTCT 0x10 /* RTC-like Timer */
+#define IT8587E_PMC1 0x11 /* Power Management Channel 1 */
+#define IT8587E_PMC2 0x12 /* Power Management Channel 2 */
+#define IT8587E_SSPI 0x13 /* Serial Periphial Interface */
+#define IT8587E_PECI 0x14 /* Platform EC Interface */
+#define IT8587E_PMC3 0x17 /* Power Management Channel 3 */
+#define IT8587E_PMC4 0x18 /* Power Management Channel 4 */
+#define IT8587E_PMC5 0x19 /* Power Management Channel 5 */
+
+
+#endif /* SUPERIO_ITE_IT8587E_H */
diff --git a/src/superio/ite/it8587e/superio.c b/src/superio/ite/it8587e/superio.c
new file mode 100644
index 0000000..cdb97e6
--- /dev/null
+++ b/src/superio/ite/it8587e/superio.c
@@ -0,0 +1,72 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2006 Uwe Hermann <uwe(a)hermann-uwe.de>
+ * Copyright (C) 2007 Philipp Degler <pdegler(a)rumms.uni-mannheim.de>
+ * Copyright (C) 2017 Gergely Kiss <mail.gery(a)gmail.com>
+ * Copyright (C) 2019 9Elements GmbH <patrick.rudolph(a)9elements.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <device/device.h>
+#include <device/pnp.h>
+#include <stdlib.h>
+#include <superio/conf_mode.h>
+
+#include "it8587e.h"
+
+static void it8587e_init(struct device *dev)
+{
+}
+
+static struct device_operations ops = {
+ .read_resources = pnp_read_resources,
+ .set_resources = pnp_set_resources,
+ .enable_resources = pnp_enable_resources,
+ .enable = pnp_alt_enable,
+ .init = it8587e_init,
+ .ops_pnp_mode = &pnp_conf_mode_870155_aa,
+};
+
+static struct pnp_info pnp_dev_info[] = {
+ { NULL, IT8587E_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { NULL, IT8587E_SP2, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { NULL, IT8587E_SWUC, PNP_IO0 | PNP_IRQ0, 0xfff0, },
+ /* Documentation: Unused */
+ { NULL, IT8587E_KBCM, PNP_IRQ0, },
+ /* Documentation: Program io0 = 0x60 and io1 = 0x64 */
+ { NULL, IT8587E_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
+ { NULL, IT8587E_SMFI, PNP_IO0 | PNP_IRQ0, 0xfff0, },
+ /* Documentation: Program io0 = 0x70-0x73 */
+ { NULL, IT8587E_RTCT, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IO3 | PNP_IRQ0,
+ 0xfffe, 0xfffe, 0xfffe, 0xfffe},
+ /* Documentation: Program io0 = 0x62 and io1 = 0x66 */
+ { NULL, IT8587E_PMC1, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff },
+ /* Documentation: Program io0 = 0x68 and io1 = 0x6c */
+ { NULL, IT8587E_PMC2, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07fc, 0x07fc },
+ /* Documentation: Program io0 = 0x6a and io1 = 0x6e */
+ { NULL, IT8587E_PMC3, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff },
+ { NULL, IT8587E_PMC4, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff },
+ { NULL, IT8587E_PMC5, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff },
+ { NULL, IT8587E_SSPI, PNP_IO0 | PNP_IRQ0, 0xfff8 },
+ { NULL, IT8528E_PECI, PNP_IO0, 0xfff8 },
+};
+
+static void enable_dev(struct device *dev)
+{
+ pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+}
+
+struct chip_operations superio_ite_it8587e_ops = {
+ CHIP_NAME("ITE IT8587E Super I/O")
+ .enable_dev = enable_dev,
+};
--
To view, visit https://review.coreboot.org/c/coreboot/+/36071
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1e541daa2b3d48a4f5a0e7b7fa88a2c2f8a1b0c5
Gerrit-Change-Number: 36071
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Maslowski <info(a)orangecms.org>
Gerrit-Reviewer: Daniel Maslowski <info(a)orangecms.org>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange