msrtool: add support for code generation from xml files
Search all *.msr.xml files in directory, creating *.c files from them,
produce *.patch for msrtool.c and msrtool.h
Signed-off-by: Anton Kochkov <[email protected]>
---

Attachment: generate.py
Description: Binary data

<msrarray name="sample" description="Sample 1 processors family and Co">
<!-- known cpus -->
<cpu family="0x6" model="0x17" stepping="5" />
<cpu family="0x80" model="0xab" stepping="10" />
<!-- possible types = { "ro", "wo", "rw" } -->
<msr address="0x0" type="ro" name="ID" description="Platform ID">
<!-- possible types = { "hex", "bin", "dec", "oct" } -->
<bitfield start="63" size="1" name="id_enabler" description="bla-bla" type="bin">
<value number="1" description="enable" />
<value number="0" description="disable" />
</bitfield>
</msr>
<msr address="0xa" type="rw" name="IP" description="new_kf">
</msr>
</msrarray>
<msrarray name="sample2" description="Sample 2 processors family and Co">
<!-- known cpus -->
<cpu family="0x6" model="0x17" stepping="5" />
<cpu family="0x80" model="0xab" stepping="10" />
<!-- possible types = { "ro", "wo", "rw" } -->
<msr address="0x0" type="ro" name="ID" description="Platform ID">
<!-- possible types = { "hex", "bin", "dec", "oct" } -->
<bitfield start="63" size="1" name="id_enabler" description="bla-bla" type="bin">
<value number="1" description="enable" />
<value number="0" description="disable" />
</bitfield>
</msr>
<msr address="0xa" type="rw" name="IP" description="new_kf">
</msr>
</msrarray>
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to