354d17523f
This requires root access. And on recent Linux kernels, with CONFIG_STRICT_DEVMEM option enabled, only address ranges listed in /proc/iomem can be accessed. The above compiled-time option can be however overriden with boot-time option "iomem=relaxed". This also removed separate read/write paths - there unlikely would be a case when they're different.
17 lines
326 B
Python
17 lines
326 B
Python
# This test requires root privilege, so is usually skipped
|
|
# It also assumes x86 legacy hardware (with Video BIOS present).
|
|
|
|
try:
|
|
import machine
|
|
except ImportError:
|
|
print("SKIP")
|
|
import sys
|
|
sys.exit()
|
|
|
|
try:
|
|
print(hex(machine.mem16[0xc0000]))
|
|
except OSError:
|
|
print("SKIP")
|
|
import sys
|
|
sys.exit()
|