Commit graph

954 commits

Author SHA1 Message Date
Hector Martin
77fbb05623 m1n1.adt: Pretty-print functions
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-16 17:06:51 +09:00
Hector Martin
961f8eae4d m1n1.adt: Print a useful diag when a prop fails to parse
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-16 16:48:22 +09:00
Hector Martin
de8b490b01 m1n1.adt: Add some mcc props
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-16 16:47:45 +09:00
Hector Martin
3b6a645db6 m1n1.adt: Support master (templated) ADTs properly
They used to parse but not round-trip, now they do

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-16 16:47:22 +09:00
Hector Martin
10880ca1a6 hv_vm: Unbork >32bit mmiotrace
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-16 03:01:10 +09:00
Hector Martin
9ecaeb9e1b m1n1.hv: Add SMP support
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:32:57 +09:00
Hector Martin
09a44e5a92 hv_exc: Disable stolen time accounting
This doesn't work with SMP.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:32:57 +09:00
Hector Martin
509481d5d5 hv: Add SMP support
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:32:57 +09:00
Hector Martin
d68e4e42dd m1n1.trace: Show CPU number in default MMIO PrintTracer 2021-09-15 23:32:57 +09:00
Hector Martin
e88d55005a m1n1.trace: Use hv.log() in Tracer.log() 2021-09-15 23:32:57 +09:00
Hector Martin
a4efa373f3 m1n1.trace: Make Tracer.trace() take read/write args
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:32:57 +09:00
Hector Martin
81aaa72740 m1n1.hv: Improve pmgr hack messages
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:32:57 +09:00
Hector Martin
2598b3a7ba m1n1.hv: Only patch exception handling on CPU#0
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:27:21 +09:00
Hector Martin
e06e58e864 m1n1.xnutools: Update decode_debugger_state() for 12.0
We need to find a better way of doing this...

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:26:45 +09:00
Hector Martin
184a516367 hv_exc: Make IPI/IRQ/timer/PMC emulation storage per-CPU
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:26:14 +09:00
Hector Martin
290e851d98 m1n1.hv: Add read/write args to hv.trace_range()
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:25:12 +09:00
Hector Martin
683161eef4 m1n1.hv: Make sysreg storage per-CPU
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
3871fa1e2f m1n1.hv: Add hv.log() that prepends CPU index, use it
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
56b54a6641 hv_vm/hv_exc: Add cpu_id to exception & mmiotrace structs
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
a13a23d5fa iodev: Add a spinlock and allow console for secondaries
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
cd59d39686 memory.h: Add mmu_active() function
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
c690eb1c9d utils: Make spinlocks reentrant
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
787c46e8c7 hv_exc: Add a Big Hypervisor Lock
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
d53b40da48 memory: Add mmu_init_secondary() to init MMU for secondaries
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
52f432f0f6 memory: Add guard pages at the end of stacks
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
6627873267 m1n1.hv, run_guest.py: Make exception hook enable an argument
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
2f8beb02b4 cpu_regs.h: Add more registers needed for HV config
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
8752d5fbba gxf: Per-CPU gxf stack
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
368b48a365 hv_wdt: Make HV WDT CPU configurable and WDT optional
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
6c186f8468 hv_asm: Move SP saving to a variable, per-CPU
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:24:37 +09:00
Hector Martin
c317b73b8c utils: Add a basic spinlock implementation
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:19:37 +09:00
Hector Martin
bb7c8ad3c5 hv_asm: Unmask SErrors inside the HV
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:19:37 +09:00
Hector Martin
90b10ef9f7 smp: Add smp_id() and use TPIDR_EL[12] to keep the SMP ID
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:19:37 +09:00
Hector Martin
571a19c9a3 smp: Align secondary_stacks & export to header
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 22:00:29 +09:00
Hector Martin
aa11841808 m1n1.adt: s/gate/psidx/
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 21:59:13 +09:00
Hector Martin
56e279fe64 Makefile: Add -Wstack-usage=1024
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 21:58:14 +09:00
Hector Martin
4acc3d7c7f hv_vm: Mask off operand size for store emulation
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 17:42:03 +09:00
Hector Martin
496516ded0 m1n1.adt: PMGR and function call stuff
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 17:11:45 +09:00
Hector Martin
dfb10956bc m1n1.fw.dcp: Add OSSerialize parser for DCPAV properties
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 17:08:21 +09:00
Hector Martin
9b91c90f3a m1n1.utils: Move FourCC definition here
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 17:08:21 +09:00
Mark Kettenis
4e88360eb1 main: Fix compiler error
Older versions of GCC throw a "initializer element is not contstant"
error.  Fix this.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2021-09-03 10:59:46 +09:00
Hector Martin
395c072a75 Makefile: Keep build_tag up to date
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-31 23:18:49 +09:00
Hector Martin
fa50bb6474 fb: Do not restore logo when using kboot
Also don't clear the whole screen, only the console section so the logo
is glitchless.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-31 14:10:52 +09:00
Mark Kettenis
77b0cdb7c9 pcie: Only initialize ports that are actually present
The macbook pro and macbook air only have a single PCIe port

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2021-08-31 02:07:24 +09:00
Hector Martin
56799d34e8 usb_dwc3: Properly handle CDC status separately per pipe
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-30 23:53:05 +09:00
Hector Martin
219950235c fw.dcp.ipc: Define rt_bw_config_t properly
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-30 12:09:36 +09:00
Hector Martin
4df78129aa m1n1.shell: Fix broken signature thing for some objects
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-29 01:36:27 +09:00
Hector Martin
63547f6fc9 m1n1.fw.asc.mgmt: Print endpoints
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-29 01:36:01 +09:00
Hector Martin
0584200aaf m1n1.fw.dcp.manager: Make map_buf() work
What it needs to do is map the buffer to the disp dart stream 4,
apparently (or maybe the stream varies?)

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-29 01:35:25 +09:00
Hector Martin
43c93af949 m1n1.fw.asc: Handle DARTless ASCs
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-29 01:32:27 +09:00