Skip to content

Comments

Fix/pass original waking vector#26

Merged
Alon-L merged 4 commits intomainfrom
fix/pass-original-waking-vector
Sep 24, 2025
Merged

Fix/pass original waking vector#26
Alon-L merged 4 commits intomainfrom
fix/pass-original-waking-vector

Conversation

@Alon-L
Copy link
Owner

@Alon-L Alon-L commented Sep 24, 2025

#16

The previous way of passing AML methods was restricted to "method header" and "method body". This exists to interface with iasl's output.
Instead, the new `aml_method_part` struct can encompass multiple aml
sections of code.
The sleep hooks (_PTS and SetVariable) override the waking vector to
point to core, but they also need to store the original waking vector so
core can return back to the kernel when it's done.

Ideally we'd want to directly store the waking vector inside core's
header, but it doesn't seem to be mapped for the AML VM, so the _PTS
hook can't reach it. It might also not be available to the UEFI Runtime
Services environment, but I haven't checked that.

Instead, we can use the second reserved field in the FACS table, which
is 24-bytes long. We use the beginning of this field to store the
original waking vector, and then retrieve it in core.
@Alon-L Alon-L merged commit 0d57dc6 into main Sep 24, 2025
1 check passed
@Alon-L Alon-L deleted the fix/pass-original-waking-vector branch September 24, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant