Difference between revisions of "Developer Manual/Super IO"

From coreboot
Jump to navigation Jump to search
(Fleshed out a bit more the subject and clarified some things)
Line 34: Line 34:
== Virtual Logical Devices (vLDN) ==
== Virtual Logical Devices (vLDN) ==


Many Super I/O's use register 0x30 of one logical device number (LDN) for more than one function enable.
Some Super I/O's use register 0x30 of one of the logical device numbers (LDN) to also enable other logical device's functions.
For example, it can be used to enable some GPIOs, GAME, MIDI etc. To overcome this issue a concept of virtual LDN has been introduced.
For example, in the case of the W83627EHF chip, register 0x30 of LDN 0x9 was used to enable multiple devices (GPIO2 = bit0, GPIO3 = bit1, GPIO4 = bit2 and GPIO5 = bit3). To overcome this issue a concept of virtual LDN has been [https://www.coreboot.org/pipermail/coreboot/2008-February/030912.html introduced].


Virtual LDN's can be used in Coreboot to map the enable bit position in register 0x30 to virtual LDN, which will just enable the functionality map to that bit.
Virtual LDN's can be used in Coreboot to uniquely map the enable bit position in register 0x30 of an LDN, this allows to use a general way to handle any bit enable operation required without special cases.


Original LDN always just switch on or off bit0 of register 0x30, however a virtual LDN is created as follows.
Originally, except in cases such as the W83627EHF's, to enable or disable an LDN's functionality you only had to just switch on or off bit0 of the register 0x30, however a virtual LDN is created as follows:
Low [7:0] bits are used to describe the original LDN. High [10:8] bits select the position of the bit enable in the register 0x30.
* Low [7:0] bits are used to describe the original LDN.  
If LDN is 0x7 it will handle bit0 of register 0x30. If the (virtual) LDN is 0x107 it will handle bit1 of same register etc.
* High [10:8] bits select the position of the bit enable in the register 0x30.


TODO: Improvements needed here for the layman.
Note: the bit positions are in hex.
 
I.e. W83627EHF chip
 
In order to enable the GPIO5 (bit3 of register 0x30) this is what the virtual LDN has to look like this:
 
*[0000 0011] [0000 1001] = 0x309
* ^^^^^^^^^  ^^^^^^^^^
*      |          |
*      |          +------- Original LDN
*      |
*      |
*      +------- Position inside register 0x30
 
Note: if the virtual LDN is 0x7 it will handle bit0 of register 0x30.


== Source layout ==
== Source layout ==

Revision as of 23:22, 2 March 2016