pciread32(uint bus, uint device, uint function, uint reg)
DESCRIPTION These functions provide access to PCI configuration space. All of the functions take
parameters for the bus, device, function, and register to be accessed. The pciwrite functions
also take a parameter val, which is the value to be written to the specified register. For the
pcimod functions, mask identifies which bits in the specified register are to be modified (i.e.
which bits in val are significant).
Although physical PCI configuration space accesses must be 32-bits wide, these functions
allow safe accesses of smaller widths as well as accesses that cross register boundaries. For
example,
parameters for the bus, device, function, and register to be accessed. The pciwrite functions
also take a parameter val, which is the value to be written to the specified register. For the
pcimod functions, mask identifies which bits in the specified register are to be modified (i.e.
which bits in val are significant).
Although physical PCI configuration space accesses must be 32-bits wide, these functions
allow safe accesses of smaller widths as well as accesses that cross register boundaries. For
example,
pciread32(0, 0, 0, 2)
would return a 32-bit value constructed from bytes 2 and 3 of the register at offset 0 and
bytes 0 and 1 of the register at offset 4
bytes 0 and 1 of the register at offset 4
returns :
The pciread functions return the value read from the specified register.
沒有留言:
張貼留言