Hector Martin
25f4500cea
utils.h: Do sysreg defines in a way that allows extracting the fields
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-25 19:51:08 +09:00
Hector Martin
3b6f32775b
apple_regs.json: IPI and VM timer reg bit definitions
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-25 19:50:05 +09:00
Hector Martin
0192bd6617
gxf: Add gxf_enabled()
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-25 19:49:12 +09:00
Hector Martin
989625ac65
adt.py: Support /-separated node path accesses
2021-05-22 04:42:38 +09:00
Hector Martin
4cc22c73c0
hv.py: Add a novm mode without stage 2 translation
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 04:42:38 +09:00
Hector Martin
81bf0ad578
apple_regs.json: More GXF and SPRR registers
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 04:42:38 +09:00
Hector Martin
aacbdf0949
GXF_STATUS -> GXF_STATUS_EL1
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 04:42:38 +09:00
Hector Martin
a9c189fe27
hv.py: Add more sysreg redirects
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 04:42:38 +09:00
Hector Martin
5f7aded3ce
find_sprr_regs.py: Port to find_regs.py, fixes
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 04:42:38 +09:00
Hector Martin
30e14f1a0b
find_regs: Modular version of find_all_regs.py
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
3bc591708b
apple_regs.json: Add GXF_CONFIG_EL{2, 12}
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
d82f5db064
apple_regs.json: Add CNTPCT_ALIAS_EL0
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
81793508ae
proxyutils.py: Use sysreg_parse() for mrs/msr
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
91a94992ea
proxyutils.py: Improve the various exec() modes
...
Now we can just say call="el1" etc., and it takes care of the region for
you.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
d0995e0653
proxyutils: Make GuardedHeap able to take a single Heap argument
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
7bdff8ad10
sysreg.py: Add sysreg_parse() function
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
09cdebf08b
gxf: Don't try to touch HCR_EL2 if GXF is enabled
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 03:21:01 +09:00
Hector Martin
76dca8c891
memory: Unbork EL0 execution
...
We need to make m1n1 itself EL0-executable.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-22 02:48:17 +09:00
Hector Martin
da440672a8
uartproxy: Send events without copying data to a giant buffer
...
We don't have 64K of stack.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-16 19:04:51 +09:00
Hector Martin
7abebaec88
iodev: Add iodev_queue() API to queue data without kicking transmission
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-16 19:04:51 +09:00
Mark Kettenis
e23e89849f
proxy: linux.py: fix tty initialization
...
commit 35fddd51
broke loading a kernel without explitly specifying
a tty. Fix this.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2021-05-16 18:47:00 +09:00
Hector Martin
957bf40d20
proxy.py: Add debug for rx events
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-16 18:46:35 +09:00
Sven Peter
35fddd5117
proxy: linux.py: allow to load u-boot before Linux
...
right now u-boot can bring up the PCIe bus such that Linux only requires
a very minimal driver. this new --u-boot flag for linux.py allows to
load u-boot before the Linux kernel to make use of this.
This requires a small hack to inject the booti command into the default
u-boot boot environment.
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-05-16 02:45:46 +09:00
Mark Kettenis
9604907b2d
pcie: minimal initialization
...
Minimal initialization of the PCIe hardware such that the tunable
can be applied such that they don't have to be passed along in
the devicetree.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2021-05-16 02:43:44 +09:00
Adam Reviczky
570bfa1a17
apple_regs: add missing brackets ( #55 )
...
apple_regs.json: Typo: add some missing brackets.
Signed-off-by: Adam Reviczky <adam.reviczky@kclalumni.net>
2021-05-16 02:42:20 +09:00
Hector Martin
3283987ba9
proxy.py: Fix spurious garbage printed to TTY
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-16 00:04:33 +09:00
Hector Martin
28ab4e1611
hv_vm: Handle load/store instructions with update
...
These don't get instruction syndromes, so we need to stop relying on
that to determine the access size.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 23:57:48 +09:00
Hector Martin
afc088840d
hv: Add Python-side MMIO emulation hooks
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 23:57:48 +09:00
Hector Martin
323b02ce1d
hv: Implement basic MMIO tracing to Python
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 23:57:48 +09:00
Hector Martin
a1f6b2502a
usb_dwc3: Send a ZLP after multiple-of-512 transfers
...
This fixes the stalling issue with readmem() of a multiple of 512 bytes.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 21:47:22 +09:00
Hector Martin
57708b529f
usb_dwc3: Change xfer_in_progress to a bool
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 21:47:22 +09:00
Hector Martin
58489bf72c
iodev, usb: Add flush() call to flush buffers to the host
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 21:47:22 +09:00
Hector Martin
67c7043b9a
utils: In EL1, instead of rebooting, break into HV
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 20:42:50 +09:00
Hector Martin
03b70eed94
hv_vm: Move dprintf macro to utils.h, add more debugging
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 20:38:32 +09:00
Hector Martin
3de3b54b7e
hv_asm: Restore all registers on return to guest
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 20:36:39 +09:00
Janne Grunau
a742f05532
usb/hv: add second CDC ACM interface for virtualized UART
...
Signed-off-by: Janne Grunau <j@jannau.net>
2021-05-15 19:47:08 +09:00
Sven Peter
4a893dc57a
apple_regs: document more SPRR regs
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-05-15 16:38:45 +09:00
Sven Peter
d324e368b8
apple_regs.json: fix EL3 typo
...
Signed-off-by: Sven Peter <sven@svenpeter.dev>
2021-05-15 16:38:45 +09:00
Hector Martin
87ae3a91fd
hv.py: Nuke all the PCIe/TB nodes for the hypervisor Type C port
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 01:39:54 +09:00
Hector Martin
5d3f154d0f
hv_vm: Correctly split software mapped L2 blocks
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 01:28:44 +09:00
Hector Martin
bf34611bf4
hv_vm: Add out-of-bounds IPA check
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 01:15:17 +09:00
Hector Martin
e919b63a02
hv_vm: Add register-offset LDR/STR emulation, fix bugs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-15 00:43:39 +09:00
Hector Martin
1a5ba2c67e
hv_vm: Fix bad asserts
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-14 21:49:11 +09:00
Hector Martin
e9aa876d12
Add missing xnutools.py
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-13 22:46:07 +09:00
Hector Martin
11fb2a403b
adt.py: Unbork reg parsing, fix some stuff
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-13 22:44:50 +09:00
Hector Martin
7358e79d74
hv.py: Support pointer auth correctly
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-13 21:28:52 +09:00
Hector Martin
248011f7a1
apple_regs.json: Correct VM pauth registers
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-13 21:28:31 +09:00
Hector Martin
920ff59483
exception: Unbork EL1 stack
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-13 21:14:58 +09:00
Hector Martin
11ef3bb461
proxyutils.py: Allow mrs/msr to pass region (for EL1 etc)
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-13 20:10:51 +09:00
Hector Martin
757213b7a9
apple_regs.json: Add some EL1 registers for AP
...
Still not sure how to enable APSTS_EL12...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-13 20:10:34 +09:00