mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 20:14:27 +01:00
devmem3
This commit is contained in:
@@ -70,3 +70,32 @@ BR2_PACKAGE_HOST_DTC=y
|
||||
# TODO: have a look at: https://github.com/kaiwan/device-memory-readwrite
|
||||
#
|
||||
BR2_PACKAGE_DEVMEM2=y
|
||||
|
||||
# Provides setpci and a lspci more advanced than Busybox's
|
||||
#
|
||||
# setpci can read and write to PCI configuration registers.
|
||||
#
|
||||
# Read is possible from Linux with:
|
||||
#
|
||||
# hexdump /sys/bus/pci/devices/0000:00:05.0/config
|
||||
#
|
||||
# but setpci provies nice human readable register names, e.g.:
|
||||
#
|
||||
# setpci --dumpregs
|
||||
#
|
||||
# then and then get the values with either bus or device id:
|
||||
#
|
||||
# setpci -s 0000:00:05.0 BASE_ADDRESS_0
|
||||
# setpci -d 1234:11e9 BASE_ADDRESS_0
|
||||
#
|
||||
# Note however that BASE_ADDRESS_0 also appears when you do:
|
||||
#
|
||||
# lspci -v
|
||||
#
|
||||
# Then you can try messing with that address with:
|
||||
#
|
||||
# devmem2 0xfeb52000 w 0x12345678
|
||||
#
|
||||
# which for our pci_min device fires interrupts.
|
||||
#
|
||||
BR2_PACKAGE_PCIUTILS=y
|
||||
|
||||
Reference in New Issue
Block a user