Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30806
Change subject: x86/acpi_s3: Remove trailing dots from debug message
......................................................................
x86/acpi_s3: Remove trailing dots from debug message
The dot is not needed, as it is no sentence and followed by a line
break.
Change-Id: I3905853eb7039f9c6d2486a77da47a4460276624
Signed-off-by: Paul Menzel <pmenzel(a)molgen.mpg.de>
---
M src/arch/x86/acpi_s3.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/30806/1
diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c
index ad9fe00..07c0332 100644
--- a/src/arch/x86/acpi_s3.c
+++ b/src/arch/x86/acpi_s3.c
@@ -34,10 +34,10 @@
{
if (acpi_slp_type < 0) {
if (romstage_handoff_is_resume()) {
- printk(BIOS_DEBUG, "S3 Resume.\n");
+ printk(BIOS_DEBUG, "S3 Resume\n");
acpi_slp_type = ACPI_S3;
} else {
- printk(BIOS_DEBUG, "Normal boot.\n");
+ printk(BIOS_DEBUG, "Normal boot\n");
acpi_slp_type = ACPI_S0;
}
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/30806
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3905853eb7039f9c6d2486a77da47a4460276624
Gerrit-Change-Number: 30806
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newchange
Nicola Corna has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31470
Change subject: mb/lenovo/x1_carbon_gen1: Swap Fn-F2 and Fn-F3
......................................................................
mb/lenovo/x1_carbon_gen1: Swap Fn-F2 and Fn-F3
thinkpad_acpi expects the battery hotkey (KEY_BATTERY) on scancode 0x01
(Fn-F2) and the lock hotkey (KEY_COFFEE) on scancode 0x02 (Fn-F3).
This is true for most of the Thinkpads, however on the X1 Carbon Gen1
(and possibly others), the battery hotkey is not present and the lock
one is instead on Fn-F3.
Swap the RHK calls in _Q11 (Fn-F2) and _Q12 (Fn-F3) to fix the issue, so
that the lock hotkey is on F3 and the battery one is on F2 (even if it's
not marked so).
Change-Id: Ib2d96be1a7815d7d03e6e8c6d300fd671c8598ca
Signed-off-by: Nicola Corna <nicola(a)corna.info>
---
M src/ec/lenovo/h8/acpi/ec.asl
M src/mainboard/lenovo/x1_carbon_gen1/dsdt.asl
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/31470/1
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index 327a2cf..6ffba5e 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -197,12 +197,20 @@
Method (_Q11, 0, NotSerialized)
{
+#if IS_ENABLED(EC_LENOVO_H8_SWAP_FNF2_FNF3)
+ ^HKEY.RHK (0x03)
+#else
^HKEY.RHK (0x02)
+#endif
}
Method (_Q12, 0, NotSerialized)
{
+#if IS_ENABLED(EC_LENOVO_H8_SWAP_FNF2_FNF3)
+ ^HKEY.RHK (0x02)
+#else
^HKEY.RHK (0x03)
+#endif
}
Method (_Q64, 0, NotSerialized)
diff --git a/src/mainboard/lenovo/x1_carbon_gen1/dsdt.asl b/src/mainboard/lenovo/x1_carbon_gen1/dsdt.asl
index 8c9bd5a..2696607 100644
--- a/src/mainboard/lenovo/x1_carbon_gen1/dsdt.asl
+++ b/src/mainboard/lenovo/x1_carbon_gen1/dsdt.asl
@@ -20,6 +20,7 @@
#define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.DECB
#define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0
#define EC_LENOVO_H8_ME_WORKAROUND 1
+#define EC_LENOVO_H8_SWAP_FNF2_FNF3 1
#include <arch/acpi.h>
DefinitionBlock(
--
To view, visit https://review.coreboot.org/c/coreboot/+/31470
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib2d96be1a7815d7d03e6e8c6d300fd671c8598ca
Gerrit-Change-Number: 31470
Gerrit-PatchSet: 1
Gerrit-Owner: Nicola Corna <nicola(a)corna.info>
Gerrit-MessageType: newchange
Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33045
Change subject: mb/apple/macbookair4_2: Add CMOS support
......................................................................
mb/apple/macbookair4_2: Add CMOS support
Added CMOS support for MacBook Air 4,2. In future, I hope there will
be more useful options available, because I'm working on macbooks
support.
Also, it may be necessary for hyper_threading support (#29669) once it
will be ready.
Change-Id: I369ed9aeff2098a4840918531be6a34cfc8d2a1e
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.io>
---
M src/mainboard/apple/macbookair4_2/Kconfig
A src/mainboard/apple/macbookair4_2/cmos.default
A src/mainboard/apple/macbookair4_2/cmos.layout
3 files changed, 100 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/45/33045/1
diff --git a/src/mainboard/apple/macbookair4_2/Kconfig b/src/mainboard/apple/macbookair4_2/Kconfig
index 4b2ee8f..263d550 100644
--- a/src/mainboard/apple/macbookair4_2/Kconfig
+++ b/src/mainboard/apple/macbookair4_2/Kconfig
@@ -14,6 +14,8 @@
select SYSTEM_TYPE_LAPTOP
select GFX_GMA_INTERNAL_IS_EDP
select MAINBOARD_HAS_LIBGFXINIT
+ select HAVE_CMOS_DEFAULT
+ select HAVE_OPTION_TABLE
config MAINBOARD_DIR
string
diff --git a/src/mainboard/apple/macbookair4_2/cmos.default b/src/mainboard/apple/macbookair4_2/cmos.default
new file mode 100644
index 0000000..53e85a3
--- /dev/null
+++ b/src/mainboard/apple/macbookair4_2/cmos.default
@@ -0,0 +1 @@
+debug_level=Debug
diff --git a/src/mainboard/apple/macbookair4_2/cmos.layout b/src/mainboard/apple/macbookair4_2/cmos.layout
new file mode 100644
index 0000000..86d55b4
--- /dev/null
+++ b/src/mainboard/apple/macbookair4_2/cmos.layout
@@ -0,0 +1,97 @@
+##
+## 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.
+##
+# -----------------------------------------------------------------
+entries
+# -----------------------------------------------------------------
+# Status Register A
+# -----------------------------------------------------------------
+# Status Register B
+# -----------------------------------------------------------------
+# Status Register C
+#96 4 r 0 status_c_rsvd
+#100 1 r 0 uf_flag
+#101 1 r 0 af_flag
+#102 1 r 0 pf_flag
+#103 1 r 0 irqf_flag
+# -----------------------------------------------------------------
+# Status Register D
+#104 7 r 0 status_d_rsvd
+#111 1 r 0 valid_cmos_ram
+# -----------------------------------------------------------------
+# Diagnostic Status Register
+#112 8 r 0 diag_rsvd1
+# -----------------------------------------------------------------
+0 120 r 0 reserved_memory
+#120 264 r 0 unused
+# -----------------------------------------------------------------
+# RTC_BOOT_BYTE (coreboot hardcoded)
+384 1 e 4 boot_option
+388 4 h 0 reboot_counter
+#390 2 r 0 unused?
+# -----------------------------------------------------------------
+# coreboot config options: console
+#392 3 r 0 unused
+395 4 e 6 debug_level
+#399 1 r 0 unused
+#400 8 r 0 reserved for century byte
+# coreboot config options: southbridge
+408 1 e 1 nmi
+409 2 e 7 power_on_after_fail
+# coreboot config options: EC
+#411 1 e 8 first_battery
+#412 1 e 1 bluetooth
+#413 1 e 1 wwan
+#414 1 e 1 touchpad
+#415 1 e 1 wlan
+#416 1 e 1 trackpoint
+#417 1 e 1 fn_ctrl_swap
+#418 1 e 1 sticky_fn
+#419 2 e 13 usb_always_on
+#421 1 e 9 sata_mode
+#422 2 e 10 backlight
+# coreboot config options: cpu
+#424 8 r 0 unused
+# coreboot config options: northbridge
+#432 5 e 11 gfx_uma_size
+#437 3 r 0 unused
+#440 8 h 0 volume
+# SandyBridge MRC Scrambler Seed values
+896 32 r 0 mrc_scrambler_seed
+928 32 r 0 mrc_scrambler_seed_s3
+960 16 r 0 mrc_scrambler_seed_chk
+# coreboot config options: check sums
+984 16 h 0 check_sum
+# -----------------------------------------------------------------
+enumerations
+#ID value text
+1 0 Disable
+1 1 Enable
+2 0 Enable
+2 1 Disable
+4 0 Fallback
+4 1 Normal
+6 0 Emergency
+6 1 Alert
+6 2 Critical
+6 3 Error
+6 4 Warning
+6 5 Notice
+6 6 Info
+6 7 Debug
+6 8 Spew
+7 0 Disable
+7 1 Enable
+7 2 Keep
+# -----------------------------------------------------------------
+checksums
+checksum 392 447 984
--
To view, visit https://review.coreboot.org/c/coreboot/+/33045
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I369ed9aeff2098a4840918531be6a34cfc8d2a1e
Gerrit-Change-Number: 33045
Gerrit-PatchSet: 1
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-MessageType: newchange
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33641
Change subject: Kconfig: Display a warning if the board is updated incorrectly
......................................................................
Kconfig: Display a warning if the board is updated incorrectly
Even though we have a comment to run make distclean before switching
mainboards, people still ignore this and end up with confusing results.
To try to fix this, save the mainboard directory in a Kconfig symbol
that will not get updated when the mainboard gets changed. This allows
us to compare it to the actual mainboard directory which will be updated
when the platform changes and put up an obnoxious warning in the
mainboard directory. Add another warning in the main menu, because
the initial warning is probably going to be ignored. The main menu
points to some documentation on how to fix the problem.
Note that this will only catch issues going forward, and won't catch
any already saved config that has a problem.
Signed-off-by: Martin Roth <martinroth(a)chromium.org>
Change-Id: I2a1ccb62c7678f264015c87b9004be6a106f804a
---
A Documentation/getting_started/fix_dot_config.md
M src/Kconfig
M src/mainboard/Kconfig
3 files changed, 78 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/33641/1
diff --git a/Documentation/getting_started/fix_dot_config.md b/Documentation/getting_started/fix_dot_config.md
new file mode 100644
index 0000000..17d89d0
--- /dev/null
+++ b/Documentation/getting_started/fix_dot_config.md
@@ -0,0 +1,50 @@
+# How to repair your .config file
+
+## Overview
+Many people rely on a saved .config file for building their
+platform. This is reasonable, but can create unanticipated
+problems.
+
+## TLDR
+* Backup your .config: "cp .config .config_bak"
+* Create the defconfig file: "make savedefconfig"
+* Edit defconfig & delete unknown config lines: "vi defconfig"
+* To just get rid of the warning about a bad .config, remove
+* the CONFIG_MAINBOARD_CHECK line.
+* The SMBIOS lines are probably incorrect as well. The ROM size
+* is very suspect. Check the correct default for your platform.
+* Save the defconfig
+* Generate a new full config:
+* "make -B defconfig KBUILD_DEFCONFIG=defconfig"
+
+## defconfig or "Mini config"
+Instead of saving a "full" config, people should use a defconfig.
+This is just the changes from a default coreboot configuration
+file. It's significantly smaller, and when a new configuration option
+gets added, it just takes the default value for that option when
+expanded into a full .config.
+
+### Generating the defconfig file
+To create the defconfig file, run "make savedefconfig". By default
+this will generate the file in the root coreboot directory and call
+it "defconfig". If there was already a file named "defconfig", this
+will overwrite that file.
+
+### Contents of the defconfig file
+As the defconfig file contains just the differences between the
+platform and the default choices for the platform. For the current
+default platform, the defconfig can actually be an empty file.
+
+Typically the defconfig will contain at least 2 lines - a
+CONFIG_VENDOR_ line and a CONFIG_BOARD_ line. Again though, if you
+are building the default board for any particular vendor, that line
+may not be present.
+
+All additional lines in a defconfig file are options that the user
+has specifically chosen to update in their config.
+
+### Generating a .config from a defconfig
+To expand the defconfig so that can be used, run:
+ DFILE=defconfig; make -B defconfig KBUILD_DEFCONFIG=$DFILE
+
+You can point DFILE to any saved defconfig.
diff --git a/src/Kconfig b/src/Kconfig
index 72d826f..8eae329 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -16,6 +16,15 @@
mainmenu "coreboot configuration"
+if MAINBOARD_CHECK != MAINBOARD_DIR
+comment "***********************************************************************"
+comment "WARNING: Your config is using defaults from a different mainboard "
+comment "than you currently have set. We'd recommend that you delete your "
+comment ".config file and start over, but if you want to try to repair the "
+comment "file, see Documentation/getting_started/fix_dot_config.md "
+comment "***********************************************************************"
+endif
+
menu "General setup"
config COREBOOT_BUILD
@@ -1062,6 +1071,14 @@
mainboard code supports this. On supported Intel platforms this works
by changing the settings in the descriptor.bin file.
+config MAINBOARD_CHECK
+ string "Mainboard dir - Do not change manually"
+ default MAINBOARD_DIR
+ help
+ Check the platform. If this symbol doesn't match the currently
+ selected mainboard directory, give the user warnings that they're
+ probably doing something wrong.
+
endmenu
diff --git a/src/mainboard/Kconfig b/src/mainboard/Kconfig
index c88d317..d9216a9 100644
--- a/src/mainboard/Kconfig
+++ b/src/mainboard/Kconfig
@@ -1,5 +1,16 @@
comment "Important: Run 'make distclean' before switching boards"
+if MAINBOARD_CHECK != MAINBOARD_DIR
+comment "***********************************************************************"
+comment "WARNING: Your config is using defaults from a different mainboard "
+comment "than you currently have set. We'd recommend that you delete your "
+comment ".config file and start over. "
+comment "* *"
+comment "If you ignore this warning and build anyway, you will almost certainly "
+comment "get a bad rom with undefined results. "
+comment "***********************************************************************"
+endif
+
choice
prompt "Mainboard vendor"
default VENDOR_EMULATION
--
To view, visit https://review.coreboot.org/c/coreboot/+/33641
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2a1ccb62c7678f264015c87b9004be6a106f804a
Gerrit-Change-Number: 33641
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33380
Change subject: Console: Allow console UART to be enabled without serial console
......................................................................
Console: Allow console UART to be enabled without serial console
Currently, when we disable serial console, the serial console uart
remains uninitialized. This patch allows coreboot to still set up
the UART, even if we're not sending the console to it.
BUG=b:74392237
TEST=Verify UART still works, even with coreboot console disabled
Signed-off-by: Martin Roth <martinroth(a)chromium.org>
Change-Id: Ic0942634ab8a9fcafdc1ea099721c127202e9f9a
---
M src/console/Kconfig
M src/drivers/uart/Kconfig
M src/include/console/uart.h
3 files changed, 28 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/33380/1
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 61ba667..da769d3 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -33,6 +33,7 @@
bool "Serial port console output"
default y
depends on DRIVERS_UART
+ select ENABLE_UART
help
Send coreboot debug output to a serial port.
@@ -47,7 +48,7 @@
specific UART has to be used (e.g. when the platform code
performs dangerous configurations).
-if CONSOLE_SERIAL
+if ENABLE_UART
comment "I/O mapped, 8250-compatible"
depends on DRIVERS_UART_8250IO
@@ -79,13 +80,13 @@
Map the COM port number to the respective I/O port.
comment "Serial port base address = 0x3f8"
-depends on UART_FOR_CONSOLE = 0
+depends on UART_FOR_CONSOLE = 0 && DRIVERS_UART_8250IO
comment "Serial port base address = 0x2f8"
-depends on UART_FOR_CONSOLE = 1
+depends on UART_FOR_CONSOLE = 1 && DRIVERS_UART_8250IO
comment "Serial port base address = 0x3e8"
-depends on UART_FOR_CONSOLE = 2
+depends on UART_FOR_CONSOLE = 2 && DRIVERS_UART_8250IO
comment "Serial port base address = 0x2e8"
-depends on UART_FOR_CONSOLE = 3
+depends on UART_FOR_CONSOLE = 3 && DRIVERS_UART_8250IO
config UART_OVERRIDE_BAUDRATE
boolean
@@ -156,7 +157,7 @@
default 3
depends on DRIVERS_UART_8250IO || DRIVERS_UART_8250MEM
-endif # CONSOLE_SERIAL
+endif # ENABLE_UART
config SPKMODEM
bool "spkmodem (console on speaker) console output"
diff --git a/src/drivers/uart/Kconfig b/src/drivers/uart/Kconfig
index 1f23a19..9b242fd 100644
--- a/src/drivers/uart/Kconfig
+++ b/src/drivers/uart/Kconfig
@@ -1,6 +1,21 @@
config DRIVERS_UART
bool
+config ENABLE_UART
+ def_bool n
+
+config ENABLE_UART_WITHOUT_CONSOLE
+ bool "Always configure primary UART"
+ depends on DRIVERS_UART
+ select ENABLE_UART
+ help
+ The primary UART has previously only been set up when the serial console
+ is enabled.
+ Selecting this choice will configure the console UART even if the serial
+ console is disabled.
+
+ Select the UART in the console menu
+
config DRIVERS_UART_8250IO
# FIXME: Shouldn't have a prompt, should default to n, and
# should be selected by boards that have it instead.
diff --git a/src/include/console/uart.h b/src/include/console/uart.h
index aed67c2..6bd88ae 100644
--- a/src/include/console/uart.h
+++ b/src/include/console/uart.h
@@ -67,11 +67,16 @@
(ENV_BOOTBLOCK || ENV_ROMSTAGE || ENV_RAMSTAGE || ENV_VERSTAGE || \
ENV_POSTCAR || (ENV_SMM && CONFIG(DEBUG_SMI))))
-#if __CONSOLE_SERIAL_ENABLE__
+#if CONFIG(ENABLE_UART)
static inline void __uart_init(void)
{
uart_init(CONFIG_UART_FOR_CONSOLE);
}
+#else
+static inline void __uart_init(void) {}
+#endif
+
+#if __CONSOLE_SERIAL_ENABLE__
static inline void __uart_tx_byte(u8 data)
{
uart_tx_byte(CONFIG_UART_FOR_CONSOLE, data);
@@ -81,7 +86,6 @@
uart_tx_flush(CONFIG_UART_FOR_CONSOLE);
}
#else
-static inline void __uart_init(void) {}
static inline void __uart_tx_byte(u8 data) {}
static inline void __uart_tx_flush(void) {}
#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/33380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic0942634ab8a9fcafdc1ea099721c127202e9f9a
Gerrit-Change-Number: 33380
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange