System software concall minutes - 2006-12-19

Mitch Bradley wmb at firmworks.com
Wed Dec 20 13:45:59 EST 2006



>> Great. Does this mean the efforts to port the VSA code to a current
>> toolchain are obsolete?
>>     
>
> On behalf of AMD, I would like to say that any such work would be 
> gratefully accepted for our other Geode customers, but as far as OLPC is
> concerned, VSA is nearly obsolete.  Of course, now its all in Forth, which
> is just as incomprehensible to me - so the net effect is about the same. :)
>
>   
The firmware component consists of a few large table of MSR#, MSR_VALUE 
pairs.  The Forth content is incidental, essentially a 2-line loop that 
calls wrmsr on table entries, plus a conditional to modify a few 
registers depending on the memory size.  The early startup MSR-slamming 
is done in assembly language, with a few simple macros to make it easy 
to say "write this value to this msr" without having to mention the same 
3 register names over and over and over.

The values in the tables could have been derived from the PRS code, and 
in fact I used that to help check them.

The component that spoofs the PCI register access is likewise a big 
table that is processed by a few lines of code.  I wrote and tested it 
in Forth, for use by OFW's PCI access, then transliterated it into C for 
use inside the Linux kernel.  The C code consists of less than 30 lines 
of active code (not counting boilerplate like comments, declarations, 
blank lines, lines with just braces, etc).






More information about the Devel mailing list