apple_regs.json: Add CNTPCT_ALIAS_EL0

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-05-22 02:47:24 +09:00
parent 81793508ae
commit d82f5db064
2 changed files with 7 additions and 4 deletions

View file

@ -8,6 +8,7 @@ import adt
from contextlib import contextmanager
class ProxyUtils(object):
CODE_BUFFER_SIZE = 0x10000
def __init__(self, p, heap_size=1024 * 1024 * 1024):
self.iface = p.iface
self.proxy = p
@ -38,7 +39,7 @@ class ProxyUtils(object):
self.memalign = self.heap.memalign
self.free = self.heap.free
self.code_buffer = self.malloc(0x10000)
self.code_buffer = self.malloc(self.CODE_BUFFER_SIZE)
self.adt_data = None
self.adt = LazyADT(self)
@ -87,9 +88,10 @@ class ProxyUtils(object):
else:
raise ValueError()
assert len(func) < self.CODE_BUFFER_SIZE
self.iface.writemem(self.code_buffer, func)
self.proxy.dc_cvau(self.code_buffer, 8)
self.proxy.ic_ivau(self.code_buffer, 8)
self.proxy.dc_cvau(self.code_buffer, len(func))
self.proxy.ic_ivau(self.code_buffer, len(func))
self.proxy.set_exc_guard(GUARD.SKIP | (GUARD.SILENT if silent else 0))
ret = call(self.code_buffer | region, r0, r1, r2, r3)

View file

@ -81,7 +81,8 @@
{"index": 0, "name": "SPRR_KMASK_EL12", "fullname": "SPRR Kernel Permission Unlock Mask (EL12)", "enc": [3, 4, 15, 6, 0 ], "width": 32},
{"index": 0, "name": "SPRR_UMASK_EL2", "fullname": "SPRR Permission Unlock Mask (EL2)", "enc": [3, 4, 15, 7, 0 ], "width": 32},
{"index": 0, "name": "SPRR_UMASK_EL12", "fullname": "SPRR Permission Unlock Mask (EL12)", "enc": [3, 4, 15, 8, 0 ], "width": 32},
{"index": 0, "name": "CNTVCT_ALIAS_EL0", "fullname": "Physical timer counter register", "enc": [3, 4, 15, 10, 6 ], "width": 64},
{"index": 0, "name": "CNTPCT_ALIAS_EL0", "fullname": "Physical timer counter register", "enc": [3, 4, 15, 10, 5 ], "width": 64},
{"index": 0, "name": "CNTVCT_ALIAS_EL0", "fullname": "Virtual timer counter register", "enc": [3, 4, 15, 10, 6 ], "width": 64},
{"index": 0, "name": "CTRR_A_LWR_EL2", "fullname": "CTRR A Lower Address (EL2)", "enc": [3, 4, 15, 11, 0 ], "width": 64},
{"index": 0, "name": "CTRR_A_UPR_EL2", "fullname": "CTRR A Upper Address (EL2)", "enc": [3, 4, 15, 11, 1 ], "width": 64},
{"index": 0, "name": "CTRR_CTL_EL2", "fullname": "CTRR Control (EL2)", "enc": [3, 4, 15, 11, 4 ], "width": 64},