Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34791 )
Change subject: soc/intel/cannonlake: Speed up postcar loading using intermediate caching
......................................................................
soc/intel/cannonlake: Speed up postcar loading using intermediate caching
This patch ensures intermediate caching is enabled to speed up
loading and decompression of next stage as we are still in romstage
and car tear down will be handled by next stage at its entry.
TEST=cbmem -t shows ~2-4ms time savings in warm reboot case with this
CL.
Change-Id: I3ba63887acb5c4bdeaf3e21c24fb0e631362962c
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
M src/soc/intel/cannonlake/romstage/romstage.c
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/34791/1
diff --git a/src/soc/intel/cannonlake/romstage/romstage.c b/src/soc/intel/cannonlake/romstage/romstage.c
index 94b9899..04a9d53 100644
--- a/src/soc/intel/cannonlake/romstage/romstage.c
+++ b/src/soc/intel/cannonlake/romstage/romstage.c
@@ -127,6 +127,21 @@
printk(BIOS_DEBUG, "%d DIMMs found\n", mem_info->dimm_cnt);
}
+/*
+ * 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_ramstage_caching(uintptr_t base, size_t size)
+{
+ int mtrr = get_free_var_mtrr();
+
+ if (mtrr == -1)
+ return;
+
+ set_var_mtrr(mtrr, base, size, MTRR_TYPE_WRPROT);
+}
+
asmlinkage void car_stage_entry(void)
{
bool s3wake;
@@ -160,6 +175,8 @@
printk(BIOS_DEBUG, "top_of_ram = 0x%lx\n", top_of_ram);
top_of_ram -= 16*MiB;
postcar_frame_add_mtrr(&pcf, top_of_ram, 16*MiB, MTRR_TYPE_WRBACK);
+ /* enabling intermediate caching */
+ enable_ramstage_caching(top_of_ram, 16*MiB);
/* Cache the ROM as WP just below 4GiB. */
postcar_frame_add_romcache(&pcf, MTRR_TYPE_WRPROT);
--
To view, visit https://review.coreboot.org/c/coreboot/+/34791
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3ba63887acb5c4bdeaf3e21c24fb0e631362962c
Gerrit-Change-Number: 34791
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/+/34805 )
Change subject: arch/x86: Add postcar_frame_add_ramcache() API
......................................................................
arch/x86: Add postcar_frame_add_ramcache() API
This patch adds new API for intermediate caching top_of_ram
and setting up required MTRR for next stage.
Change-Id: Iddafb573afb4799de64754a94816d7f3f2f4982f
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, 30 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/34805/1
diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h
index 293ca02..7dc4049 100644
--- a/src/arch/x86/include/arch/cpu.h
+++ b/src/arch/x86/include/arch/cpu.h
@@ -329,6 +329,13 @@
void postcar_frame_add_romcache(struct postcar_frame *pcf, int type);
/*
+ * Add variable MTRR covering the Top of RAM with given MTRR type.
+ */
+void postcar_frame_add_ramcache(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 35e139f..8a1f6cb 100644
--- a/src/arch/x86/postcar_loader.c
+++ b/src/arch/x86/postcar_loader.c
@@ -120,6 +120,29 @@
postcar_frame_add_mtrr(pcf, CACHE_ROM_BASE, CACHE_ROM_SIZE, type);
}
+/*
+ * 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_ram_cache(uintptr_t base, size_t size)
+{
+ int mtrr = get_free_var_mtrr();
+
+ if (mtrr == -1)
+ return;
+
+ set_var_mtrr(mtrr, base, size, MTRR_TYPE_WRPROT);
+}
+
+void postcar_frame_add_ramcache(struct postcar_frame *pcf,
+ uintptr_t addr, size_t size, int type)
+{
+ /* enable intermediate caching for Top of RAM */
+ enable_top_of_ram_cache(addr, size);
+ 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/+/34805
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iddafb573afb4799de64754a94816d7f3f2f4982f
Gerrit-Change-Number: 34805
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: newchange
Marc Karasek has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38904 )
Change subject: Fixed configuration for DDR Size discovered by Coreboot
......................................................................
Fixed configuration for DDR Size discovered by Coreboot
For qemu-riscv value was incorrect. It was set to 32768 which
in turn was being used as 32768MB (32+GB), instead of the 32MB
it was intended to represent.
Change value so it is a select option based on in menuconfig
based on what you want coreboot to "discover" on boot.
Current three options are :
128MB
256MB
512MB
NOTE: You must specify greater than what is chosen from
the above items on the qemu cmdline.
Signed-off-by: Marc Karasek <mkarasek(a)cryptocoretech.com>
Change-Id: Idef44eb8baf3e89d7c74fa452fc60b7beefa2c48
---
M src/mainboard/emulation/qemu-riscv/Kconfig
1 file changed, 27 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/38904/1
diff --git a/src/mainboard/emulation/qemu-riscv/Kconfig b/src/mainboard/emulation/qemu-riscv/Kconfig
index 4d4c900..2a119a3 100644
--- a/src/mainboard/emulation/qemu-riscv/Kconfig
+++ b/src/mainboard/emulation/qemu-riscv/Kconfig
@@ -54,9 +54,35 @@
int
default 1
+choice
+ prompt "DRAM SIZE MB"
+ help
+ Select the size of the DDR coreboot will find.
+ Note: You must specify a -m <size> greater than
+ what is chosen here.
+
+ config COREBOOT_DDR_SIZE_128M
+ bool "128 MB"
+ help
+ Choose this option if you want coreboot to find 127MB DDR
+
+ config COREBOOT_DDR_SIZE_256M
+ bool "256 MB"
+ help
+ Choose this option if you want coreboot to find 255MB DDR
+
+ config COREBOOT_DDR_SIZE_512M
+ bool "512 MB"
+ help
+ Choose this option if you want coreboot to find 512MB DDR
+endchoice
+
config DRAM_SIZE_MB
int
- default 32768
+ default 32
+ default 32 if COREBOOT_DDR_SIZE_128M
+ default 64 if COREBOOT_DDR_SIZE_256M
+ default 128 if COREBOOT_DDR_SIZE_512M
config OPENSBI_PLATFORM
string
--
To view, visit https://review.coreboot.org/c/coreboot/+/38904
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idef44eb8baf3e89d7c74fa452fc60b7beefa2c48
Gerrit-Change-Number: 38904
Gerrit-PatchSet: 1
Gerrit-Owner: Marc Karasek <marckarasek(a)gmail.com>
Gerrit-MessageType: newchange
Matthew Garrett has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37991 )
Change subject: Add a doc describing an ACPI device for controlling platform radios.
......................................................................
Add a doc describing an ACPI device for controlling platform radios.
Signed-off-by: Matthew Garrett <mjg59(a)google.com>
Change-Id: I94dc058825cb147aca0d007d68885d4bfbe580a8
---
M Documentation/acpi/index.md
A Documentation/acpi/rfkill.md
M src/arch/x86/include/arch/acpi.h
3 files changed, 111 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/37991/1
diff --git a/Documentation/acpi/index.md b/Documentation/acpi/index.md
index 8add8db..d10bca5 100644
--- a/Documentation/acpi/index.md
+++ b/Documentation/acpi/index.md
@@ -9,3 +9,7 @@
## devicetree
- [Adding devices to a device tree](devicetree.md)
+
+## Radio device control
+
+- [Exposing an ACPI device for controlling radios](rfkill.md)
diff --git a/Documentation/acpi/rfkill.md b/Documentation/acpi/rfkill.md
new file mode 100644
index 0000000..ef54f16
--- /dev/null
+++ b/Documentation/acpi/rfkill.md
@@ -0,0 +1,106 @@
+# Coreboot platform rfkill control
+
+## Introduction
+
+Many devices support platform-level control over integrated radio devices
+such as wifi or bluetooth cards. However, the ACPI specification provides
+no generic mechanism for operating systems to interact with these platform
+interfaces. This has led to a proliferation of vendor-specific control
+mechanisms. Coreboot ports to existing platforms tend to mimic those
+interfaces and make use of existing drivers, but this doesn't solve the
+problem for devices where coreboot is the primary firmware implementation.
+
+This specification defines an ACPI device that exposes an interface for
+controlling any radios defined by the platform. It is intended to allow for
+generic OS drivers to be written which will then work on any coreboot
+platform that implements this specification.
+
+## Device specification
+
+The coreboot rfkill device must be declared with a _HID of "BOOT0001".
+It must implement the following ACPI methods:
+
+### DEVS
+
+This method provides a list of the supported radios whose state can be
+controlledvia this device. It takes no arguments and returns a single
+integer. The integer is a bitmask of radio types supported by the device,
+defined as follows:
+
+| Bit | Radio type |
+|-----|---------------|
+| 0 | Wifi |
+| 1 | Bluetooth |
+| 2 | Ultra-Wideband|
+| 3 | WiMax |
+| 4 | WWAN |
+| 5 | GPS |
+| 6 | FM |
+| 7 | NFC |
+
+### SSTA
+
+This defines the mutable ("soft") state of all radios in the system. This
+method takes no arguments and returns a single integer. The integer is a
+bitmask representing radio state using the same values as defined in
+DEVS. If a bit is 1 then the radio is enabled. If a bit is 0 then the radio
+is not present. If a bit is not set in the value returned by the DEVS method
+then the meaning of the bit returned by SSTA is undefined. The state
+returned by SSTA can be overridden by the CNTL method.
+
+### HSTA
+
+This defines the immutable ("hard") state of all radios in the system. This
+method takes no arguments and returns a single integer. The integer is a
+bitmask representing radio state using the same values as defined in
+DEVS. If a bit is 1 then the radio is enabled. If a bit is 0 then the radio
+is disabled. If a bit is not set in the value returned by the DEVS method
+then the meaning of the bit returned by HSTA is undefined. The state
+returned by HSTA cannot be overridden by the CNTL method.
+
+### CNTL
+
+This method takes a single integer as an argument and returns nothing. The
+argument is a bitmask representing radio state using the same values as
+defined in DEVS. If a bit is 1 then the platform should enable the
+corresponding radio. If a bit is 0 then the platform should disable the
+corresponding radio. This method only alters the soft radio state, not the
+hard radio state.
+
+### Notifications
+
+The platform will send a Notify with a value of 0x80 if the state is updated
+via any mechanism other than an OS request. The OS should then re-evaluate
+the state by calling SSTA and HSTA.
+
+## Implementation design
+
+Two types of blocking are defined - "soft" and "hard". Soft state can be
+overridden on request by the OS, for example in response to a hotkey
+press. Hard state cannot be overridden by the OS, and should correspond to
+cases where some external interface has requested that radios be disabled
+(for example, a physical switch on the side of the device). Hard and soft
+state should be tracked independently - for instance, if a radio is
+currently enabled and then disabled via a physical switch being moved, the
+state returned by SSTA should still indicate that the radio is enabled while
+the state returned by HSTA should indicate that the radio is disabled. If
+the OS then requests that the radio be disabled via the CNTL method, SSTA
+and HSTA should now both indicate that the radio is disabled. If the
+physical switch is now switched back, HSTA should indicate that the radio is
+enabled but SSTA should still indicate that the radio is disabled. Only when
+the OS requests that the radio be enabled via CNTL should the radio be
+re-enabled.
+
+If the platform alters the radio state (in response to any form of policy
+decision or in response to a physical switch), it should update the soft
+block state (if the OS can override this decision) or the hard block state
+(if the OS cannot override this decision) and then call Notify on the device
+with an argument of 0x80.
+
+If the platform provides more than one radio of a given type, it should
+implement an additional rfkill device. Each radio should only be represented
+in a single device.
+
+If an rfkill device should be explicitly tied to a radio device, then the
+radio should be exposed in the ACPI device heirarchy and an rfkill device
+that controls only that radio implemented as a child of that device.
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 68475c1..e87df04 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -64,6 +64,7 @@
/* List of ACPI HID that use the coreboot ACPI ID */
enum coreboot_acpi_ids {
COREBOOT_ACPI_ID_CBTABLE = 0x0000, /* BOOT0000 */
+ COREBOOT_ACPI_ID_RFKILL = 0x0001, /* BOOT0001 */
COREBOOT_ACPI_ID_MAX = 0xFFFF, /* BOOTFFFF */
};
--
To view, visit https://review.coreboot.org/c/coreboot/+/37991
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I94dc058825cb147aca0d007d68885d4bfbe580a8
Gerrit-Change-Number: 37991
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Garrett <mjg59(a)google.com>
Gerrit-MessageType: newchange
Xiang Wang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37593 )
Change subject: soc/sifive/fu540: Fix RISCV_ARCH / RISCV_ABI to support float
......................................................................
soc/sifive/fu540: Fix RISCV_ARCH / RISCV_ABI to support float
fu540 hart 0 is based on rv64imac, other hart is based on rv64imafdc.
coreboot supports low-privileged non-aligned memory access, which
requires the compiler to enable floating-point functionality.
Compiling the src/arch/riscv/fp_asm.S file before the correction will
not generate any instructions.
Change-Id: I0f4828046aeb4803d4437c6adad2191684a632f7
Signed-off-by: Xiang Wang <merle(a)hardenedlinux.org>
---
M src/soc/sifive/fu540/Kconfig
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/37593/1
diff --git a/src/soc/sifive/fu540/Kconfig b/src/soc/sifive/fu540/Kconfig
index 97c67bf..4ff2827 100644
--- a/src/soc/sifive/fu540/Kconfig
+++ b/src/soc/sifive/fu540/Kconfig
@@ -30,11 +30,11 @@
config RISCV_ARCH
string
- default "rv64imac"
+ default "rv64imafdc"
config RISCV_ABI
string
- default "lp64"
+ default "lp64d"
config RISCV_CODEMODEL
string
--
To view, visit https://review.coreboot.org/c/coreboot/+/37593
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0f4828046aeb4803d4437c6adad2191684a632f7
Gerrit-Change-Number: 37593
Gerrit-PatchSet: 1
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-MessageType: newchange
Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30747
Change subject: cpu/amd/microcode: Search all containers
......................................................................
cpu/amd/microcode: Search all containers
Currently, it’s aborted if the first file is not found.
The commit was only tested with all microcode containers present in
CBFS.
If only one microcode update container is present, which is not the
first, it is skipped.
Change the return to continue to traverse all elements.
Fixes: 83e4c5613 (cpu/amd/microcode: Update parser to use stock microcode blobs)
Change-Id: I5195ff0334cf49cadc25de31822a9f2f2cd90490
Signed-off-by: Paul Menzel <pmenzel(a)molgen.mpg.de>
---
M src/cpu/amd/microcode/microcode.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/30747/1
diff --git a/src/cpu/amd/microcode/microcode.c b/src/cpu/amd/microcode/microcode.c
index e8ab175..622c6db 100644
--- a/src/cpu/amd/microcode/microcode.c
+++ b/src/cpu/amd/microcode/microcode.c
@@ -214,7 +214,7 @@
spin_unlock(romstage_microcode_cbfs_lock());
#endif
#endif
- return;
+ continue;
}
amd_update_microcode(ucode, ucode_len, equivalent_processor_rev_id);
--
To view, visit https://review.coreboot.org/c/coreboot/+/30747
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5195ff0334cf49cadc25de31822a9f2f2cd90490
Gerrit-Change-Number: 30747
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newchange
Christoph Pomaska has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35911 )
Change subject: [WIP] Documentation/basics: Add glossary
......................................................................
[WIP] Documentation/basics: Add glossary
The glossary is to contain common abbreviations and specific vocabulary.
Change-Id: I2ef9130f9cfecacdc0033deba3cde582fb991f54
Signed-off-by: Christoph Pomaska <c.pomaska(a)hosting.de>
---
A Documentation/basics/glossary.md
1 file changed, 27 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/35911/1
diff --git a/Documentation/basics/glossary.md b/Documentation/basics/glossary.md
new file mode 100644
index 0000000..f820bf1
--- /dev/null
+++ b/Documentation/basics/glossary.md
@@ -0,0 +1,27 @@
+# Glossary
+
+## Intro
+This page explains the most common abbreviations and terms. It also contains additional reference for some more detailed info.
+
+## Intel-specific
+
+- IFD: Intel Flash Descriptor\
+ The Intel Flash Descriptor is used on Intel platforms to split the contents of a flash chip into multiple parts (regions).
+ Most boards contain the following regions:
+ * ifd
+ * me
+ * gbe
+ * bios
+ * platform data
+- ME: Intel Management Engine
+ The Intel Management Engine is a co-processor that runs proprietary code which resides next to the bios-firmware within the "me" flash-region.
+ On older platforms it is possible to disable the ME by removing the code from the flash-chip. Since Sandybridge it is only possible to disable the ME by removing most parts of it and making it crash on startup, disabling a watchdog that shuts off the whole system 30 minutes after startup. Since Skylake it not possible to remove anything from the ME without breaking it.
+- GbE: Gigabit Ethernet
+ This regions contains a firmware blob for Intel Gigabit Ethernet hardware. It is usually not used for mainboards that dont have Intel Gigabit ethernet onboard.
+- BIOS: Basic Input Output System
+ The BIOS region contains the firmware that is required to boot up and initialize the system/mainboard. This is the region where coreboot is usually written to.
+
+## coreboot-specific
+- CBFS: coreboot file system
+ The coreboot filesystem contains the files that are require for coreboot to work, such as the bootblock, payloads and romstage/ramstage binaries.
+
--
To view, visit https://review.coreboot.org/c/coreboot/+/35911
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2ef9130f9cfecacdc0033deba3cde582fb991f54
Gerrit-Change-Number: 35911
Gerrit-PatchSet: 1
Gerrit-Owner: Christoph Pomaska <github(a)aufmachen.jetzt>
Gerrit-MessageType: newchange
Christoph Pomaska has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35910 )
Change subject: Documentation: Add basics section
......................................................................
Documentation: Add basics section
As discussed on the coreboot mailing list, I decided to create a section
called "basics" for basic hard- and software information and
documentation.
Change-Id: Ia7d3b4c6ee203708d4058c4e52550e1ed24c64d1
Signed-off-by: Christoph Pomaska <c.pomaska(a)hosting.de>
---
A Documentation/basics/index.md
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/35910/1
diff --git a/Documentation/basics/index.md b/Documentation/basics/index.md
new file mode 100644
index 0000000..a3ebff7
--- /dev/null
+++ b/Documentation/basics/index.md
@@ -0,0 +1,8 @@
+# basic and general information about hardware
+
+This section contains basic information and documentation about hardware
+that a coreboot dev has to deal with.
+
+## x86
+* [Super I/O](superio.md)
+
--
To view, visit https://review.coreboot.org/c/coreboot/+/35910
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia7d3b4c6ee203708d4058c4e52550e1ed24c64d1
Gerrit-Change-Number: 35910
Gerrit-PatchSet: 1
Gerrit-Owner: Christoph Pomaska <github(a)aufmachen.jetzt>
Gerrit-MessageType: newchange