[coreboot] [PATCH][v3] read actual memory size in qemu-i386

Patrick Georgi patrick at georgi-clan.de
Fri Jun 6 23:30:42 CEST 2008

Peter Stuge schrieb:
> On Fri, Jun 06, 2008 at 11:01:06PM +0200, Patrick Georgi wrote:
>> -	ramsize = "128";
> Is this parameter now used anywhere else?
The only other reference for "ramsize" I find is doc/design/newboot.lyx, 
which was wrong on this already (I don't see any way to change that 
value via kconfig). Unfortunately I don't have lyx, and I fear that 
mangling that file into compliance by hand will only break it. How to go 
on there?
> Maybe nicer to have the same style on all comments?
Sorry, you're right. I added myself to the top header (which I didn't 
see before). I'll post a new patch when the other open issues are resolved.
>> +static int inb_cmos(int port)
>> +{
>> +	outb(port, 0x70);
>> +	return inb(0x71);
>> +}
>> +
> Is this available somewhere else? Should it be?
It seems to be an official interface that bochs/qemu adopted for their 
purpose (nvramtool uses these ports, too), but I can't see any other use 
in cbv3 except nvramtool, which is userland.
It could (together with a write operation) be provided for future use. 
It might even be combined with nvramtool (but that's a different layer: 
boot code vs. userland, so I don't feel good with that).

In my opinion, moving them (two functions, read/write) as static 
functions to a header would be the best option. It's only drawn in when 
necessary, it's probably inlined anyway, and if they get used more 
regularily, we can still consider moving them to a separate source file 
in lib/. I'd look if that header could be used both for boot code and 
userland code, but not if that involves too many hacks.

Thanks for the review,

More information about the coreboot mailing list