[coreboot] v3 CS5536 SMBus bug

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Aug 20 15:45:38 CEST 2008


v3 can't use global variables in stage1 or initram. Same applies to
static local variables. See the bug below.

Ideas for fixes? The generic variable infrastructure would be one option.

int smbus_read_byte(u16 device, u8 address)
{
	//BUG here!
	static int first_time = 1;

	if (first_time) {
		smbus_init();
		first_time = 0;
	}

	return do_smbus_read_byte(SMBUS_IO_BASE, device, address);
}

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the coreboot mailing list