Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35827 )
Change subject: drivers/pc80/rtc: Cache cmos_layout.bin region device ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35827/3/src/drivers/pc80/rtc/mc1468... File src/drivers/pc80/rtc/mc146818rtc.c:
https://review.coreboot.org/c/coreboot/+/35827/3/src/drivers/pc80/rtc/mc1468... PS3, Line 252: struct cbfsf fh; This might be all you need, if you just decide to skip optimisation for platforms with CAR migration:
MAYBE_STATIC struct cbfsf fh;
if (! region_device_sz(&(fh->data))) cbfs_locate_in_region();
https://review.coreboot.org/c/coreboot/+/35827/3/src/drivers/pc80/rtc/mc1468... PS3, Line 274: cbfs_file_data(cmos_layout_rdev, &fh); You need this.
https://review.coreboot.org/c/coreboot/+/35827/3/src/drivers/pc80/rtc/mc1468... PS3, Line 278: rdev = car_get_ptr(layout_rdev_p); You are confusing this with '*rdev = ' perhaps? This only assigns (local) pointer variable a new value.