Commit graph

369 commits

Author SHA1 Message Date
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
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
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
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
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
aa11841808 m1n1.adt: s/gate/psidx/
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 21:59:13 +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
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
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
Hector Martin
eec6bbdeaf m1n1.hw.dart: Fix dirty cache clobbering on iomap_at()
Fixes: #102

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-29 00:03:39 +09:00
Alyssa Rosenzweig
eb466796d8 fw.dcp: Add some stubs needed for modesetting
This isn't enough to set the video mode yet but it gets us further. I
think allocate_memory/map_buf/powerOnDART need real implementations,
otherwise setting a video mode crashes the DCP in an APIODMA interrupt
handler, whatever that is.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2021-08-24 21:09:35 +09:00
Hector Martin
e6d3b6b6c6 m1n1.adt: Handle borked reg properties
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-24 12:20:31 +09:00
Hector Martin
d0731de381 m1n1.hv: Fix pac_mask for linux
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 23:10:28 +09:00
Hector Martin
c39fe2fbde m1n1.fw.asc: Handle syslog/ioreporting buffer size properly
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 23:10:28 +09:00
Hector Martin
1666d86d43 fw.asc.mgmt: Handle version negotiation properly
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 23:04:23 +09:00
Hector Martin
cc39491863 m1n1.proxy: Allow overriding default timeout with M1N1TIMEOUT
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 17:03:20 +09:00
Hector Martin
017f050fff hv_vuart: Implement RX & enough to support Linux
This works to get to a serial shell on Linux, and to use m1n1-as-LV1
proxyclient with M1N1DEVICE=/dev/m1n1-sec

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-23 17:02:28 +09:00
Hector Martin
c2c6da3df2 fw.dcp.ipc: Remove junk prints
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:53:32 +09:00
Hector Martin
fa3b1ddcf6 experiments/dcp.py: Add DCP driver example
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:40:18 +09:00
Hector Martin
de5b5d996c m1n1.fw.dcp: Add DCP client framework, port tracer to it
This also includes an update to the macOS 12.0 beta ABI

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:39:17 +09:00
Hector Martin
b32aec3786 m1n1.trace.asc: Use shared reg/msg definitions, improve syslog
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:37:09 +09:00
Hector Martin
27a0a15eee m1n1.hw/fw.asc: Add basic ASC driver and RTKit handling
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:36:49 +09:00
Hector Martin
7b01b0525b m1n1.trace.asc: Be more clear about endpoint number in log
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:34:24 +09:00
Hector Martin
105b671fb3 m1n1.hw.dart: Add mutation functions (iomap, iowrite)
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:33:18 +09:00
Hector Martin
fc5ce75c21 m1n1.adt: Add repr()
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:32:26 +09:00
Hector Martin
fe503a3802 m1n1.proxy: Handle zero-length readmem()
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:32:07 +09:00
Hector Martin
a96e277b56 m1n1.utils: Add Constant support to Register
This allows setting register fields to an expected contant value, e.g.
because they are opcodes for a variable-format register (like a mailbox)

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:31:10 +09:00
Hector Martin
b00b36620a m1n1.utils: Add unhex() helper
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:30:38 +09:00
Hector Martin
f8110dd409 hv_exc: Handle M1RACLES mitigation here due to 12.0 spam
macOS 12.0 added a silly ineffective "mitigation" that clears the
register on every context switch. This doesn't actually mitigate
anything, but it does make this sysreg trap performance-critical,
so we have to move its handling into the C side.

Signed-off-by: Hector Martin <marcan@marcan.st>
2021-08-14 16:30:18 +09:00
Andrew Worsley
bd5211909e Fix Exception when no Signature present
Signed-off-by: Andrew Worsley <amworsley@gmail.com>
2021-08-03 23:54:23 +09:00
Pip Cet
d709b047d8 proxyclient/m1n1/utils.py: don't compact non-adjacent ranges
Signed-off-by: Pip Cet <pipcet@gmail.com>
2021-08-03 13:53:41 +09:00
Andrew Worsley
1d932888f9 Add command categories to reduce command clutter
Based on a suggestion from Ludwig Schubert it now uses the inspect class
to generate signatures of the functions for the help messages and
the qualified names which is a big improvement.

Also greatly reduced the clutter by putting the class functions into seperate
categories based on their class name. Now the top level help fits on one
page making it much more readable.

Signed-off-by: Andrew Worsley <amworsley@gmail.com>
2021-08-03 13:52:31 +09:00
Andrew Worsley
ddb6951abb Fix some review comments, spacing
Signed-off-by: Andrew Worsley <amworsley@gmail.com>
2021-08-03 13:52:31 +09:00
Andrew Worsley
255f1bac16 Add some doc string to write/read/mrs/msr
Signed-off-by: Andrew Worsley <amworsley@gmail.com>
2021-08-03 13:52:31 +09:00
Andrew Worsley
eab52cc855 Extend help to all commands
Also print 1 line summary or full output if called directly on command

Signed-off-by: Andrew Worsley <amworsley@gmail.com>
2021-08-03 13:52:31 +09:00