coreboot/src/drivers/pc80/rtc
Yu-Ping Wu d8bed2d001 drivers/pc80/rtc/mc146818rtc: Add assertion of bank selection for AMD
As described in CB:83495, in AMD platforms, the bit 4 of CMOS Register A
is bank selection. Since the MC146818 driver accesses VBNV via Bank 0,
the value set in cmos_init() must not contain that bit.

To prevent RTC_FREQ_SELECT_DEFAULT from being incorrectly modified, add
an static assertion about the bank selection for AMD. Note that the
kernel driver also ensures RTC_AMD_BANK_SELECT isn't set for AMD [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/rtc/rtc-mc146818-lib.c?id=3ae8fd4157

BUG=b:346716300
TEST=none
BRANCH=skyrim

Change-Id: I6122201914c40604f86dcca6025b55c595ef609e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-07-23 07:54:39 +00:00
..
Kconfig drivers: Add SPDX license headers to Kconfig files 2024-02-18 01:59:32 +00:00
Makefile.mk driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
mc146818rtc.c drivers/pc80/rtc/mc146818rtc: Add assertion of bank selection for AMD 2024-07-23 07:54:39 +00:00
mc146818rtc_boot.c
option.c drivers/pc80/rtc/option.c: Reset only CMOS range covered by checksum 2023-11-13 14:18:17 +00:00
post.c commonlib/console/post_code.h: Change post code prefix to POSTCODE 2023-06-23 15:06:04 +00:00