summaryrefslogtreecommitdiff
path: root/src/drivers/pc80/rtc
diff options
context:
space:
mode:
authorJonathon Hall <jonathon.hall@puri.sm>2023-05-01 10:19:56 -0400
committerMatt DeVillier <matt.devillier@gmail.com>2023-05-08 17:50:59 +0000
commite12b313844da92ff91dd0ff47a85c2fd0789a475 (patch)
tree98e84430c0495d6441761d203995b00835e41342 /src/drivers/pc80/rtc
parentd6e0a90aa0bd574b28b6c9b4b46289bf46a208db (diff)
drivers/pc80/rtc/option.c: Allow CMOS defaults to extend to bank 1
CMOS defaults greater than 128 bytes long will extend to bank 1. Change-Id: I9ee8364d01dd8520be101de3f83d2302d50c7283 Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74902 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/drivers/pc80/rtc')
-rw-r--r--src/drivers/pc80/rtc/option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/pc80/rtc/option.c b/src/drivers/pc80/rtc/option.c
index e8e2345133..bb295cc3d8 100644
--- a/src/drivers/pc80/rtc/option.c
+++ b/src/drivers/pc80/rtc/option.c
@@ -211,7 +211,8 @@ void sanitize_cmos(void)
return;
u8 control_state = cmos_disable_rtc();
- for (i = 14; i < MIN(128, length); i++)
+ /* Max length of 256 spans bank 0 and bank 1 */
+ for (i = 14; i < MIN(256, length); i++)
cmos_write_inner(cmos_default[i], i);
cmos_restore_rtc(control_state);
}