mirror of
https://github.com/AskDavis/Getting-Started-With-ACPI.git
synced 2026-01-01 05:05:57 -08:00
Add more steps to patching
This commit is contained in:
@@ -174,7 +174,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
title: 'Universal',
|
title: 'Universal',
|
||||||
collapsable: false,
|
collapsable: false,
|
||||||
sidebarDepth: 0,
|
sidebarDepth: 1,
|
||||||
children: [
|
children: [
|
||||||
['/Universal/ec-fix', 'Embedded Controller'],
|
['/Universal/ec-fix', 'Embedded Controller'],
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ So lets take a look at our APIC table first:
|
|||||||
|
|
||||||
Here we can see a list of all the CPU threads, and info about each one. Lets look at the first `[Processor Local APIC]` entry:
|
Here we can see a list of all the CPU threads, and info about each one. Lets look at the first `[Processor Local APIC]` entry:
|
||||||
|
|
||||||
```
|
```c
|
||||||
[02Ch 0044 1] Subtable Type : 00 [Processor Local APIC]
|
[02Ch 0044 1] Subtable Type : 00 [Processor Local APIC]
|
||||||
[02Dh 0045 1] Length : 08
|
[02Dh 0045 1] Length : 08
|
||||||
[02Eh 0046 1] Processor ID : 00
|
[02Eh 0046 1] Processor ID : 00
|
||||||
@@ -55,17 +55,63 @@ Next open your DSDT and search for `Processor`:
|
|||||||
|
|
||||||
Here we're given some important info regarding the first CPU:
|
Here we're given some important info regarding the first CPU:
|
||||||
|
|
||||||
```
|
```c
|
||||||
Processor (C000, 0x80, 0x00000410, 0x06)
|
Processor (C000, 0x80, 0x00000410, 0x06)
|
||||||
```
|
```
|
||||||
|
|
||||||
If we check the [ACPI Spec](https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf), section 19.6.108, we see the info is parsed as follows:
|
If we check the [ACPI Spec](https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf), section 19.6.108, we see the info is parsed as follows:
|
||||||
|
|
||||||
```
|
```c
|
||||||
Processor (ProcessorName, ProcessorID, PBlockAddress, PblockLength)
|
Processor (ProcessorName, ProcessorID, PBlockAddress, PblockLength)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Now if we look at the `ProcessorID` section, we notice it's `0x80`, but this doesn't match up with the first entry in our APIC table (`00`). Now we can get a clearer idea of what's wrong with out APIC table and why it kernel panics.
|
Now if we look at the `ProcessorID` section, we notice it's `0x80`, but this doesn't match up with the first entry in our APIC table (`00`). Now we can get a clearer idea of what's wrong with out APIC table and why it kernel panics.
|
||||||
|
|
||||||
|
**note** that your ACPI will very likely be much different, please look closely to what your values are
|
||||||
|
|
||||||
## Patching the APIC table
|
## Patching the APIC table
|
||||||
|
|
||||||
|
Now comes the fun part, were we actually have to re-arrange the APIC's `Processor ID` entries to properly match our DSDT. So to start, lets match up our CPU entry in our DSDT to our APIC.
|
||||||
|
|
||||||
|
| DSDT Entry | APIC Entry |
|
||||||
|
| :--- | :--- |
|
||||||
|
|  |  |
|
||||||
|
|
||||||
|
|
||||||
|
Here can see the DSDT and APIC's entry, and they are mismatched. While we could edit the DSDT, patching the APIC is far easier as its a much smaller file. So lets edit the file to properly reflect the DSDT:
|
||||||
|
|
||||||
|
* Note: While the DSDT is 0x80, the APIC does not need the 0x prefix so our final value in APIC would be simply 80
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Now while we've fixed the initial kernel panic, we've likely created a new due to breaking the rest of the table. So we'll want to keep iterating through until the whole table's been fixed:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Once you've made all your edits, you'll next want to compile the file. See here for more details: [Compiling and decompiling ACPI Tables](../Manual/compile.md)
|
||||||
|
|
||||||
|
### Dropping the old APIC table
|
||||||
|
|
||||||
|
Before we can inject our newly patched APIC table, we'll need to first drop the old APIC table. To do this, you'll want to add a new entry to ACPI -> Delete:
|
||||||
|
|
||||||
|
| Key | Type | Value |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| All | Boolean | YES |
|
||||||
|
| Comment | String | Delete APIC Table |
|
||||||
|
| Enabled | Boolean | YES |
|
||||||
|
| TableLength | Number | 0 |
|
||||||
|
| TableSignature | Data | 41504943 |
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
If you do not have a config.plist yet, keep this Delete section in mind when you head back to the [install guide](https://dortania.github.io/OpenCore-Install-Guide/)
|
||||||
|
|
||||||
|
### Adding our newly patched APIC table
|
||||||
|
|
||||||
|
Quite simple, just add the APIC.aml file we compiled earlier to EFI/OC/ACPI and in your config.plist under ACPI -> Add. If you do not have a config.plist yet, you can head back to the install guide:
|
||||||
|
|
||||||
|
* [OpenCore Install Guide](https://dortania.github.io/OpenCore-Install-Guide/)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
images/Universal/apic-md/apic-check.png
Normal file
BIN
images/Universal/apic-md/apic-check.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 617 KiB |
BIN
images/Universal/apic-md/apic-list.png
Normal file
BIN
images/Universal/apic-md/apic-list.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
BIN
images/Universal/apic-md/apic-modified.png
Normal file
BIN
images/Universal/apic-md/apic-modified.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 620 KiB |
BIN
images/Universal/apic-md/drop-apic.png
Normal file
BIN
images/Universal/apic-md/drop-apic.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 418 KiB |
BIN
images/Universal/apic-md/dsdt-check.png
Normal file
BIN
images/Universal/apic-md/dsdt-check.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 676 KiB |
Reference in New Issue
Block a user