Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32951
Change subject: libpayload: Reset PS/2 keyboard
......................................................................
libpayload: Reset PS/2 keyboard
Loading a libpayload based payload like coreinfo or FILO from SeaBIOS
pressing keys does not give the expected results.
For example, pressing F1 gives the character 24 translated to scan code
6a. ESC for example 43 (111).
The problem is not reproducible using the payload directly, that means
without SeaBIOS. The problem seems to be, that SeaBIOS already
initializes the PS/2 controller and AT keyboard.
Comparing it with coreboot’s PS/2 keyboard code, the keyboard needs to
be reset. That seems to fix the issue, when the keyboard was initialized
before.
TEST=Build coreboot for QEMU Q35 with SeaBIOS, and coreinfo as secondary
payload. Run
qemu-system-i386 -M q35 -L /dev/shm -bios build/coreboot.rom -serial stdio
press 3 to select the coreinfo payload, and verify that the keys F1 and
F2 are working.
Change-Id: I2732292ac316d4bc0029ecb5c95fa7d1e7d68947
Signed-off-by: Paul Menzel <pmenzel(a)molgen.mpg.de>
---
M payloads/libpayload/drivers/i8042/i8042.h
M payloads/libpayload/drivers/i8042/keyboard.c
2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/32951/1
diff --git a/payloads/libpayload/drivers/i8042/i8042.h b/payloads/libpayload/drivers/i8042/i8042.h
index 643167e..e864ac9 100644
--- a/payloads/libpayload/drivers/i8042/i8042.h
+++ b/payloads/libpayload/drivers/i8042/i8042.h
@@ -63,6 +63,7 @@
#define I8042_KBCMD_EN 0xf4
#define I8042_KBCMD_DEFAULT_DIS 0xf5
#define I8042_KBCMD_SET_DEFAULT 0xf6
+#define I8042_KBCMD_ACK 0xfa
#define I8042_KBCMD_RESEND 0xfe
#define I8042_KBCMD_RESET 0xff
diff --git a/payloads/libpayload/drivers/i8042/keyboard.c b/payloads/libpayload/drivers/i8042/keyboard.c
index cded638..fea9e71 100644
--- a/payloads/libpayload/drivers/i8042/keyboard.c
+++ b/payloads/libpayload/drivers/i8042/keyboard.c
@@ -317,6 +317,13 @@
/* Enable first PS/2 port */
i8042_cmd(I8042_CMD_EN_KB);
+ /* Reset keyboard and self test (keyboard side) */
+ ret = keyboard_cmd(I8042_KBCMD_RESET);
+ if (ret != I8042_KBCMD_ACK) {
+ printf("ERROR: Keyboard reset failed ACK: 0x%x\n", ret);
+ return;
+ }
+
/* Set scancode set 1 */
ret = keyboard_cmd(I8042_KBCMD_SET_SCANCODE);
if (!ret && !CONFIG(LP_PC_KEYBOARD_IGNORE_INIT_FAILURE))
--
To view, visit https://review.coreboot.org/c/coreboot/+/32951
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2732292ac316d4bc0029ecb5c95fa7d1e7d68947
Gerrit-Change-Number: 32951
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newchange
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33137
Change subject: soc/intel/cannonlake: Do not read SPD again if index hasn't changed
......................................................................
soc/intel/cannonlake: Do not read SPD again if index hasn't changed
With the recent refactoring of memory configuration in
CB:32513 ("soc/intel/cannonlake: Support different SPD read type for
each slot"), meminit_cbfs_spd_index ends up reading SPD from CBFS for
each slot. However, for mainboards that use the same SPD index for
each slot this is unneccessary. This change adds a check to see if
spd_data_ptr is not NULL and current spd index is the same as the last
call to decide if SPD read from CBFS should be skipped.
TEST=Verified that SPD gets read only once on hatch.
Change-Id: I91963b55cea534c92207b2cd9f0caa96df8f222b
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
M src/soc/intel/cannonlake/cnl_memcfg_init.c
1 file changed, 21 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/33137/1
diff --git a/src/soc/intel/cannonlake/cnl_memcfg_init.c b/src/soc/intel/cannonlake/cnl_memcfg_init.c
index 4ebd997..d3e5e83 100644
--- a/src/soc/intel/cannonlake/cnl_memcfg_init.c
+++ b/src/soc/intel/cannonlake/cnl_memcfg_init.c
@@ -91,18 +91,29 @@
static void meminit_cbfs_spd_index(FSP_M_CONFIG *mem_cfg,
int spd_index, uint8_t mem_slot)
{
- size_t spd_data_len;
- uintptr_t spd_data_ptr;
- struct region_device spd_rdev;
+ static size_t spd_data_len;
+ static uintptr_t spd_data_ptr;
+ static int last_spd_index;
assert(mem_slot < NUM_DIMM_SLOT);
- printk(BIOS_DEBUG, "SPD INDEX = %d\n", spd_index);
- if (get_spd_cbfs_rdev(&spd_rdev, spd_index) < 0)
- die("spd.bin not found or incorrect index\n");
- spd_data_len = region_device_sz(&spd_rdev);
- /* Memory leak is ok since we have memory mapped boot media */
- assert(CONFIG(BOOT_DEVICE_MEMORY_MAPPED));
- spd_data_ptr = (uintptr_t)rdev_mmap_full(&spd_rdev);
+
+ if ((spd_data_ptr == 0) || (last_spd_index != spd_index)) {
+ struct region_device spd_rdev;
+
+ printk(BIOS_DEBUG, "SPD INDEX = %d\n", spd_index);
+
+ if (get_spd_cbfs_rdev(&spd_rdev, spd_index) < 0)
+ die("spd.bin not found or incorrect index\n");
+
+ spd_data_len = region_device_sz(&spd_rdev);
+
+ /* Memory leak is ok since we have memory mapped boot media */
+ assert(CONFIG(BOOT_DEVICE_MEMORY_MAPPED));
+
+ spd_data_ptr = (uintptr_t)rdev_mmap_full(&spd_rdev);
+ last_spd_index = spd_index;
+ }
+
meminit_spd_data(mem_cfg, mem_slot, spd_data_len, spd_data_ptr);
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/33137
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I91963b55cea534c92207b2cd9f0caa96df8f222b
Gerrit-Change-Number: 33137
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: newchange
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33144
Change subject: arch/riscv/Kconfig: Make correct default value for CONFIG_ARCH_RISCV_M
......................................................................
arch/riscv/Kconfig: Make correct default value for CONFIG_ARCH_RISCV_M
Change-Id: Ib9329904060cab48d527de1b1ccdab5b6fe71b99
Signed-off-by: Subrata Banik <subrata.banik(a)intel.com>
---
M src/arch/riscv/Kconfig
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/33144/1
diff --git a/src/arch/riscv/Kconfig b/src/arch/riscv/Kconfig
index 9d325af..25a3980 100644
--- a/src/arch/riscv/Kconfig
+++ b/src/arch/riscv/Kconfig
@@ -24,8 +24,8 @@
# one implementation that will not have it due
# to security concerns.
bool
- default n if ARCH_RISCV_M_DISABLED
- default y
+ default y if ARCH_RISCV && !ARCH_RISCV_M_DISABLED
+ default n
config ARCH_RISCV_S
# S (supervisor) mode is for kernels. It is optional.
--
To view, visit https://review.coreboot.org/c/coreboot/+/33144
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib9329904060cab48d527de1b1ccdab5b6fe71b99
Gerrit-Change-Number: 33144
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: newchange
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32846 )
Change subject: soc/intel/skylake: Use PCI func0 if enabled in device tree
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/#/c/32846/1/src/soc/intel/skylake/chip_fsp20.c
File src/soc/intel/skylake/chip_fsp20.c:
https://review.coreboot.org/#/c/32846/1/src/soc/intel/skylake/chip_fsp20.c@…
PS1, Line 113: enabled
"... enabled in device tree, ..." to make it clear that is different than the disabled mentioned in L109 above?
--
To view, visit https://review.coreboot.org/c/coreboot/+/32846
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7c44ee5493eff1f9e04aa891030fde2a6f0c636f
Gerrit-Change-Number: 32846
Gerrit-PatchSet: 1
Gerrit-Owner: Caveh Jalali <caveh(a)google.com>
Gerrit-Reviewer: Caveh Jalali <caveh(a)google.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Gaggery Tsai <gaggery.tsai(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: caveh jalali <caveh(a)chromium.org>
Gerrit-Comment-Date: Mon, 03 Jun 2019 18:38:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment