[coreboot] Real mode ebx corruption

Myles Watson mylesgw at gmail.com
Wed Sep 1 01:34:09 CEST 2010


Has anyone seen corruption of ebx when using real mode for option ROMs?

I'm running the same ROM with SeaBIOS and real mode, and a series of
writes (ax = 1ab1 bx = b10d) works fine with SeaBIOS, but several of
the bx values are corrupted to b100 with real mode.

The only hint I can find is:

	// Put registers back on the stack. The assembler code
	// will later pop them.
	// What happens here is that we force (volatile!) changing
	// the values of the parameters of this function. We do this
	// because we know that they stay alive on the stack after
	// we leave this function. Don't say this is bollocks.
	*(volatile u32 *)&eax = reg_info.eax;
	*(volatile u32 *)&ecx = reg_info.ecx;
	*(volatile u32 *)&edx = reg_info.edx;
	*(volatile u32 *)&ebx = reg_info.ebx;

Since it's real mode, it seems like the only place for corruption is
the call & return.  Am I missing something?

Thanks,
Myles




More information about the coreboot mailing list