[LinuxBIOS] Reading PMBASE, SMI_EN or SMI_STS

Andon Tschauschev atschauschev at yahoo.com
Mon May 21 15:18:53 CEST 2007


Hello,

I make my student project, details under 
http://gladnon.wikidot.com .

So, I have a few *problems*... I want to read the registers PMBASE, SMI_EN, SMI_STS (related to System Management Mode -- SMM). Please, see attached file, this is my example program.

The mechanism (standard PCI configuration mechanism) to read/write from/to PMBASE, SMI_EN, SMI_STS is taken from:
 www.ssi.gouv.fr/fr/sciences/fichiers/lti/cansecwest2006-duflot-paper.pdf
 (site 6)

However, the example program doesnt make what I want.  I probed it on my machine, chipset is ICH3M. Executed as root the output is either
---
PMBASE = 0x900007
Address of SMI_EN  (PMBASE + 0x30): 0x900037
Address of SMI_STS (PMBASE + 0x34): 0x90003b
Saved value in SMI_EN : 0x900007
Saved value in SMI_STS: 0x900007
---
or
---
PMBASE = 0x54001ff
 Address of SMI_EN  (PMBASE + 0x30): 0x540022f
 Address of SMI_STS (PMBASE + 0x34): 0x5400233
 Saved value in SMI_EN : 0x54001ff
 Saved value in SMI_STS: 0x54001ff
 ---
or
---
  PMBASE = 0x60000
 Address of SMI_EN  (PMBASE + 0x30): 0x60030
 Address of SMI_STS (PMBASE + 0x34): 0x60034
Saved value in SMI_EN : 0x60000
 Saved value in SMI_STS: 0x60000
---
depending on it, if executed on normal console or  xterm. Sometimes, while executing, system freezes or crashes with "Kernel panic -- not syncing: Attempted to kill the idle task!" ... Furthermore, I think, that the saved values in PMBASE, SMI_EN and SMI_STS shouldnt be the same.

So, I have two questions:
1. Did I understood correctly how this pci mechanism for accessing registers works? If not, how can I access them?
2. Why does the system crash, since I'm accessing registers only read-only (except "outl(0xCF8, address)")?

Thank you in advance!

Andon



       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20070521/80d5fdf6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_content_of_pmbase.c
Type: text/x-csrc
Size: 1575 bytes
Desc: 2183369603-get_content_of_pmbase.c
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20070521/80d5fdf6/attachment.c>


More information about the coreboot mailing list