Skip to content

Commit 0301b32

Browse files
committed
Fix nested lists
Fixes: #204 Signed-off-by: Davide Cavalca <[email protected]>
1 parent c6940cc commit 0301b32

16 files changed

+182
-182
lines changed

docs/alt/boot-process-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The PARTUUID of the EFI system partition assigned to the currently booted OS is
4242
Here's where it gets a bit hairy. m1n1, u-boot, Linux, and the device trees have somewhat complex and subtle version interdependencies.
4343

4444
* m1n1 stage 2 is in charge of some hardware init, and patching in dynamic values into the device trees. This means that newer kernel hardware support often depends on a m1n1 update, either to initialize things or to add more device tree data, or both.
45-
* In general, we prefer to keep Linux drivers simple and put "magic" init (e.g. random magic sets of register writes, which Apple loves to describe in their variant of a DT) in m1n1. Same with things related to the memory controller, clock configurations that we can reasonably leave static, etc. The exception is when Linux has no choice but to do this dynamically at runtime. Apple likes to leave way too much to the XNU kernel (which m1n1 replaces), including ridiculous things like turning on the system-level L3 cache, and we don't want Linux to have to deal with that. This also highly increases our chances of existing kernels working (at least partially) on newer SoCs/platforms with only DT changes, which is good for e.g. forward-compatibility of distro install images. For example, PCIe on M2 required no driver-level changes, only changes to the m1n1 initialization.
45+
* In general, we prefer to keep Linux drivers simple and put "magic" init (e.g. random magic sets of register writes, which Apple loves to describe in their variant of a DT) in m1n1. Same with things related to the memory controller, clock configurations that we can reasonably leave static, etc. The exception is when Linux has no choice but to do this dynamically at runtime. Apple likes to leave way too much to the XNU kernel (which m1n1 replaces), including ridiculous things like turning on the system-level L3 cache, and we don't want Linux to have to deal with that. This also highly increases our chances of existing kernels working (at least partially) on newer SoCs/platforms with only DT changes, which is good for e.g. forward-compatibility of distro install images. For example, PCIe on M2 required no driver-level changes, only changes to the m1n1 initialization.
4646
* U-Boot generally doesn't change much once properly brought up on any given SoC, and only cares about a subset of DT info.
4747
* Linux needs DT data to bring up hardware, so new hardware needs DT updates. Our canonical DT repository is part of our Linux tree itself, but remember changes here often need m1n1 (stage 2) updates to make things actually work.
4848

docs/hw/cpu/system-registers.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -679,25 +679,25 @@ The AArch64 FEAT_AFT feature implements equivalent support, but Apple implemente
679679
#### MIDR_EL1 (ARM standard)
680680

681681
* [15:4] PartNum
682-
* 1: Alcatraz Cyclone (A7 / H6P)
683-
* 2: Fiji Typhoon (A8 / H7P)
684-
* 3: Capri Typhoon (A8X / H7G)
685-
* 4: Malta / Elba Twister (TSMC A9 / A9X / H8P / H8G)
686-
* 5: Maui Twister (Samsung A9 / H8P)
687-
* 6: Cayman / Gibraltar Hurricane-Zephyr (A10 / T2 / H9P / H9M Fusion core)
688-
* 7: Myst Hurricane-Zephyr (A10X / H9G Fusion core)
689-
* 8: Skye Monsoon (A11 / H10 p-core)
690-
* 9: Skye Mistral (A11 / H10 e-core)
691-
* 11: Cyprus Vortex (A12 / H11P p-core)
692-
* 12: Cyprus Tempest (A12 / H11P e-core)
693-
* 15: M9 (S4/S5)
694-
* 16: Aruba Vortex (A12X/Z / H11G p-core)
695-
* 17: Aruba Tempest (A12X/Z / H11G e-core)
696-
* 18: Cebu Lightning (A13 / H12 p-core)
697-
* 19: Cebu Thunder (A13 / H12 e-core)
698-
* 34: M1 Icestorm (H13G e-core)
699-
* 35: M1 Firestorm (H13G p-core)
700-
* 38: Turks (S6 / M10)
682+
* 1: Alcatraz Cyclone (A7 / H6P)
683+
* 2: Fiji Typhoon (A8 / H7P)
684+
* 3: Capri Typhoon (A8X / H7G)
685+
* 4: Malta / Elba Twister (TSMC A9 / A9X / H8P / H8G)
686+
* 5: Maui Twister (Samsung A9 / H8P)
687+
* 6: Cayman / Gibraltar Hurricane-Zephyr (A10 / T2 / H9P / H9M Fusion core)
688+
* 7: Myst Hurricane-Zephyr (A10X / H9G Fusion core)
689+
* 8: Skye Monsoon (A11 / H10 p-core)
690+
* 9: Skye Mistral (A11 / H10 e-core)
691+
* 11: Cyprus Vortex (A12 / H11P p-core)
692+
* 12: Cyprus Tempest (A12 / H11P e-core)
693+
* 15: M9 (S4/S5)
694+
* 16: Aruba Vortex (A12X/Z / H11G p-core)
695+
* 17: Aruba Tempest (A12X/Z / H11G e-core)
696+
* 18: Cebu Lightning (A13 / H12 p-core)
697+
* 19: Cebu Thunder (A13 / H12 e-core)
698+
* 34: M1 Icestorm (H13G e-core)
699+
* 35: M1 Firestorm (H13G p-core)
700+
* 38: Turks (S6 / M10)
701701

702702
* [31:24] Implementer (0x61 = 'a' = Apple)
703703

docs/hw/soc/agx.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ Data structures: see [channels.py](https://github.com/AsahiLinux/m1n1/blob/main/
6868
#### CPU->GPU channels
6969

7070
* Work Channels: four groups (0-3), each with three channels, one per GPU work type
71-
* TA (Tile Accelerator; vertex processing)
72-
* 3D (3D; pixel processing)
73-
* CP (Compute)
71+
* TA (Tile Accelerator; vertex processing)
72+
* 3D (3D; pixel processing)
73+
* CP (Compute)
7474

7575
TODO: there is probably some priority scheme for work submitted to different channels.
7676

@@ -79,14 +79,14 @@ Data structures: see [channels.py](https://github.com/AsahiLinux/m1n1/blob/main/
7979
#### GPU->CPU channels
8080

8181
* Event: work-related event notifications
82-
* Work completion flag events
82+
* Work completion flag events
8383
* These have a 128-bit array indicating which event indices are firing
84-
* Fault notifications
84+
* Fault notifications
8585
* GPU faults seem to be quite poorly handled as a stop-the-world process; macOS actually goes off dumping GPU MMIO registers directly, and the firmware seems to be quite clueless as to what to do.
8686
* Statistics messages
87-
* We ignore these. The firmware will complain once if the buffer overflows, but it's harmless.
87+
* We ignore these. The firmware will complain once if the buffer overflows, but it's harmless.
8888
* Firmware syslogs
89-
* This one is weird in that there are multiple sub-channels for some reason, with control structures laid out contiguously.
89+
* This one is weird in that there are multiple sub-channels for some reason, with control structures laid out contiguously.
9090
* An unknown channel (tracing?)
9191

9292
### GPU contexts
@@ -181,14 +181,14 @@ Note: this is all summarized and glosses over tons of unknown/fixed/magic number
181181
* Timestamp 3 ptr
182182
* Unknown buffer 2 (empty)
183183
* Embedded structures:
184-
* Tiler parameters (tile counts/etc)
185-
* TA work struct 2
184+
* Tiler parameters (tile counts/etc)
185+
* TA work struct 2
186186
* TVB tilemap ptr
187187
* TVB list ptr
188188
* Three small buffers passed from userspace (alyssa calls these "deflake")
189189
* Command encoder ptr (i.e. actual gfx pipeline to run, from userspace)
190190
* Pipeline window base (4GiB window into VAs used for 32-bit shader pointers)
191-
* TA work struct 3
191+
* TA work struct 3
192192
* One of the deflake ptrs
193193
* Encoder ID (unique ID, GPU likely does not care)
194194
* "Unknown buffer" (the one with incrementing numbers, from userspace)
@@ -270,7 +270,7 @@ This blocks 3D until TA is done. Unclear what black magic makes partial renders
270270
* Timestamp 2 ptr
271271
* Timestamp 3 ptr
272272
* Embedded structures:
273-
* 3D work struct 1
273+
* 3D work struct 1
274274
* Some floats?
275275
* Depth clear value
276276
* Stencil clear value

docs/platform/dev-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ $ M1N1DEVICE=/dev/ttyACM0
319319
$ export M1N1DEVICE
320320
$ python3 proxyclient/tools/shell.py
321321
```
322-
* Can start up a terminal program on the 2nd tty which linux console output can be made to go to
322+
* Can start up a terminal program on the 2nd tty which linux console output can be made to go to
323323
```
324324
picocom /dev/ttyACM1
325325
```

docs/platform/open-os-interop-old.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ An OS on an Apple Silicon machine, as seen by Apple's tooling, means a portion o
1717
For third-party OSes, we propose the following GPT partition structure per OS:
1818

1919
1. APFS container partition ("stub macOS") (~2.5GB) with:
20-
* iBoot2, firmware, XNU kernel, RecoveryOS (all required by the platform)
21-
* m1n1 as fuOS kernel, with chainloading config pointing to the EFI partition
22-
* ~empty root/data filesystem subvolumes
20+
* iBoot2, firmware, XNU kernel, RecoveryOS (all required by the platform)
21+
* m1n1 as fuOS kernel, with chainloading config pointing to the EFI partition
22+
* ~empty root/data filesystem subvolumes
2323
2. EFI system partition (FAT32) (~512MB) with:
24-
* m1n1 stage 2 + device trees + U-Boot
25-
* GRUB or another UEFI OS loader boot the target kernel
24+
* m1n1 stage 2 + device trees + U-Boot
25+
* GRUB or another UEFI OS loader boot the target kernel
2626
3. root/boot/etc. partitions (OS-specific)
2727

2828
Rationale: this arrangement pairs together a third-party OS with an APFS-resident OS as seen by Apple's tooling, and allows users to use the native boot picker (with a11y support). It avoids potential trouble down the road which could come from having multiple OSes attempt to manage the SEP under a shared OS context. It also lets us have independent secure-boot chains for OSes (once that is implemented), with the fuOS image containing the root of trust for subsequent boot stages, bridged to the machine chain of trust by the user with their machine owner credentials during installation.
@@ -41,39 +41,39 @@ A typical boot of a reference Linux system will go as follows, continuing on fro
4141

4242
* iBoot2 loads the custom kernel, which is a build of m1n1
4343
* m1n1 stage 1 runs and
44-
* Parses the Apple Device Tree (ADT) to obtain machine-specific information
45-
* Performs additional hardware initialization (machine-specific)
44+
* Parses the Apple Device Tree (ADT) to obtain machine-specific information
45+
* Performs additional hardware initialization (machine-specific)
4646
* E.g. memory controller details, USB-C charging, HDMI display (on Mac Mini)
47-
* Displays its logo on the screen (replacing the Apple logo)
48-
* Loads its embedded configuration, which directs it to chainload from a FAT32 partition
49-
* Initializes the NVMe controller
50-
* Searches the GPT for the partition configured for chainloading, by PARTUUID.
51-
* Mounts the partition as FAT32
52-
* Searches for the filename configured for chainloading and loads it
53-
* Shuts down the NVMe controller
54-
* Chainloads to the loaded instance of m1n1 (as a raw binary blob), including forwarding any /chosen property configurations found in its embedded config.
47+
* Displays its logo on the screen (replacing the Apple logo)
48+
* Loads its embedded configuration, which directs it to chainload from a FAT32 partition
49+
* Initializes the NVMe controller
50+
* Searches the GPT for the partition configured for chainloading, by PARTUUID.
51+
* Mounts the partition as FAT32
52+
* Searches for the filename configured for chainloading and loads it
53+
* Shuts down the NVMe controller
54+
* Chainloads to the loaded instance of m1n1 (as a raw binary blob), including forwarding any /chosen property configurations found in its embedded config.
5555
* m1n1 stage 2 runs and
56-
* Parses the Apple Device Tree (ADT) to obtain machine-specific information
57-
* Re-initializes hardware, including anything stage 1 did not do (e.g. due to it being older)
58-
* Searches its embedded payloads to find Device Trees and an embedded U-Boot image
59-
* Selects an embedded Device Tree (FDT) appropriate for the current platform
60-
* Personalizes the FDT with dynamic information transplanted from the ADT
61-
* Performs any other hardware initialization to prepare the machine environment for Linux
62-
* Loads the embedded U-Boot image and jumps to it
56+
* Parses the Apple Device Tree (ADT) to obtain machine-specific information
57+
* Re-initializes hardware, including anything stage 1 did not do (e.g. due to it being older)
58+
* Searches its embedded payloads to find Device Trees and an embedded U-Boot image
59+
* Selects an embedded Device Tree (FDT) appropriate for the current platform
60+
* Personalizes the FDT with dynamic information transplanted from the ADT
61+
* Performs any other hardware initialization to prepare the machine environment for Linux
62+
* Loads the embedded U-Boot image and jumps to it
6363
* U-Boot runs and
64-
* Parses the FDT
65-
* Initializes the keyboard for input
66-
* Initializes NVMe
67-
* Prompts the user to break into a shell if requested
68-
* Mounts the appropriate EFI System Partition
69-
* Brings up basic EFI services
70-
* Locates the default EFI bootloader in the ESP, e.g. GRUB, and boots it
64+
* Parses the FDT
65+
* Initializes the keyboard for input
66+
* Initializes NVMe
67+
* Prompts the user to break into a shell if requested
68+
* Mounts the appropriate EFI System Partition
69+
* Brings up basic EFI services
70+
* Locates the default EFI bootloader in the ESP, e.g. GRUB, and boots it
7171
* GRUB runs and
72-
* Uses EFI disk access services to mount the /boot filesystem (could be the ESP itself, could be something else)
73-
* Locates its configuration file and additional components
74-
* Presents the user with a boot menu, using EFI console/input services
75-
* Loads the kernel and initramfs from /boot
76-
* Jumps to the kernel
72+
* Uses EFI disk access services to mount the /boot filesystem (could be the ESP itself, could be something else)
73+
* Locates its configuration file and additional components
74+
* Presents the user with a boot menu, using EFI console/input services
75+
* Loads the kernel and initramfs from /boot
76+
* Jumps to the kernel
7777
* The Linux kernel boots as it would on any other UEFI+FDT platform
7878

7979
This boot chain is designed to progressively bring the system closer to a "typical" ARM64 machine, so that subsequent layers have to worry less about the particulars of Apple Silicon machines.
@@ -122,11 +122,11 @@ Future installation options could include:
122122

123123
* USB netinstall images/bundles, setting up the installer as "bootable install media". This can be set up by just unpacking some files to a FAT32 partition on a USB drive, so it is easy for users to use, and will allow them to select the installer from the boot picker ([more info](introduction.md#boot-picker) on how this magic works). It would still fetch the OS to be installed from the internet.
124124
* USB local install images/bundles, which can also serve as UEFI install media for later or for other platforms. This will install the target OS from USB, but will still hit Apple's CDN for the Apple components, making the install not truly offline.
125-
* An option for end users to add the Apple components, e.g. by running a script from the USB drive, making it fully offline
126-
* An option for end users to add the Apple components when creating the USB installer, e.g. by running a script that downloads them and provisions the installer in one go, instead of a pre-baked image.
125+
* An option for end users to add the Apple components, e.g. by running a script from the USB drive, making it fully offline
126+
* An option for end users to add the Apple components when creating the USB installer, e.g. by running a script that downloads them and provisions the installer in one go, instead of a pre-baked image.
127127
* We want to add this as a feature to the online installer, e.g. "create a bootable USB installer" instead of actually doing the install.
128128
* Packaging as a macOS app (this would already be part of USB install modes anyway)
129-
* Though this runs into GateKeeper issues with unsigned downloads if downloaded "normally" by users from a browser...
129+
* Though this runs into GateKeeper issues with unsigned downloads if downloaded "normally" by users from a browser...
130130

131131
## Firmware provisioning
132132

@@ -150,8 +150,8 @@ The stub OS installer collects available platform firmware from the IPSW, and pa
150150

151151
* firmware.tar: Tarball containing the firmware, in a structure compatible with the `/lib/firmware` hierarchy (e.g. `brcm/foo.bin`).
152152
* manifest.txt: A text file containing lines of the following two forms:
153-
* `LINK <src> <tgt>` : hard link
154-
* `FILE <name> SHA256 <hash>`: file
153+
* `LINK <src> <tgt>` : hard link
154+
* `FILE <name> SHA256 <hash>`: file
155155

156156
These files are then placed in the EFI system partition under the `vendorfw` directory.
157157

0 commit comments

Comments
 (0)