|
| 1 | +#!/usr/bin/env python3 |
| 2 | +# SPDX-License-Identifier: MIT |
| 3 | +import sys, pathlib |
| 4 | +sys.path.append(str(pathlib.Path(__file__).resolve().parents[1])) |
| 5 | + |
| 6 | +from m1n1.setup import * |
| 7 | + |
| 8 | +#for i in (0x28e580350, 0x28e580328, 0x28e580380, 0x28e580378): |
| 9 | + #p.write32(i, 0) |
| 10 | + |
| 11 | +sts = p.read32(0x20002100c) |
| 12 | +print(f"status: {sts:#x}") |
| 13 | +p.write32(0x200021010, 0) |
| 14 | +p.write32(0x20002100c, 0xfff) |
| 15 | +time.sleep(0.1) |
| 16 | +sts = p.read32(0x20002100c) |
| 17 | +print(f"status: {sts:#x}") |
| 18 | + |
| 19 | +print(f"ERRLOG0: {p.read32(0x20000070c):#x}") |
| 20 | +print(f"ERRLOG1: {p.read32(0x200000710):#x}") |
| 21 | +print(f"ERRLOG2: {p.read32(0x200000714):#x}") |
| 22 | +print(f"ERRLOG3: {p.read32(0x200000718):#x}") |
| 23 | +print(f"ERRLOG4: {p.read32(0x20000071c):#x}") |
| 24 | + |
| 25 | +p.write32(0x20000070c, 0xffffffff) |
| 26 | + |
| 27 | +#p.fb_shutdown() |
| 28 | +u.inst("tlbi vmalle1is") |
| 29 | + |
| 30 | +#p.memset32(fb, 0xffffffff, 3024 * 1964 * 4) |
| 31 | +#p.dc_cvac(fb, 3024 * 1964 * 4) |
| 32 | + |
| 33 | +#p.memset32(0x100_80000000, 0xffffffff, 0x80000000) |
| 34 | + |
| 35 | +#p.memcpy32(fb, fb + 0x1000, 0x800) |
| 36 | +#p.memset32(fb, 0xfffff, 3024 * 1964 * 4) |
| 37 | +#p.memset32(fb, 0xffffffff, 3024 * 1964 * 4) |
| 38 | +#p.memcpy32(0x100_80000000, fb + 0x1000, 0x1800) |
| 39 | +#p.read8(fb + 0x10) |
| 40 | +#p.write8(fb + 0x200, 0xdeadbeef) |
| 41 | +#p.memset32(fb, 0xfffffff, 3024 * 1964 * 4) |
| 42 | + |
| 43 | +#p.iodev_write(IODEV.FB, "test\n", 5) |
0 commit comments