[LinuxBIOS] Normal vs. fallback images and CMOS
uwe at hermann-uwe.de
Mon Oct 8 02:31:51 CEST 2007
On Sun, Oct 07, 2007 at 05:02:21PM -0700, Jonathan Sturges wrote:
> Let me turn the CMOS question around though. If an embedded board does have a battery, is it possible that it's just for the TOD clock and not CMOS? In other words, if an unknown board has a battery, how can I positively confirm the existence of the CMOS?
> I've got two revisions of the same board, one with battery and one without. They're Winterminal boards, so they don't necessarily need CMOS settings.
I'm just guessing, but maybe just try reading CMOS bytes and see
if it works? If it doesn't I guess junk or 0xff will be returned.
I used something like this:
#define RTC_PORT 0x70
* Read a byte from the specified CMOS address.
* @param addr The CMOS address to read a byte from.
* @return The byte at the given CMOS address.
inline u8 cmos_read(u8 addr)
return inb(RTC_PORT + 1);
http://www.hermann-uwe.de | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the coreboot