Hi,
+/* NOTE: +To avoid confusion, it is important to keep in mind that in this file, +the term CMOS does NOT refer to the RTC, but instead the NVRAM as a whole. +While this technically includes the RTC part, the main focus wouldn't be it, +and instead be the configurable parts (i.e. BIOS settings). +*/
Hmm, this adds more confusion rather than avoids it.
+u8 nvram_read(u8 addr){
- u16 rtc_port = addr < 128 ? RTC_PORT_STANDARD : RTC_PORT_EXTENDED;
- outb(addr, rtc_port);
- return inb(rtc_port + 1);
+}
So, this clearly does access the cmos (with "cmos" meaning "the nv storage of the rtc chip").
+static struct cb_cmos_entries *lookup_cmos_entry(struct cb_cmos_option_table *option_table, const char *name)
This looks like it goes access structs in cbfs to figure where in the cmos the config data you want read is located.
I have to agree with Kevin that storing config data in cmos is a bad idea. It's not reliable. Also there isn't much space. The bootorder file is not designed to be space efficient and can be relatively large. There is a reason why UEFI goes store configuration data (aka EFI variables) in flash instead.
take care, Gerd