acpi: remerge uacpi as inhouse

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
kaguya
2026-04-15 13:42:16 -04:00
parent d66e042ec1
commit 4f0480fa84
155 changed files with 43506 additions and 0 deletions
@@ -0,0 +1,48 @@
// Name: Global lock works
// Expect: int => 0
DefinitionBlock ("", "DSDT", 2, "uTEST", "TESTTABL", 0xF0F0F0F0)
{
Method (CHEK, 1, Serialized, 15)
{
If (Arg0 != 0) {
Debug = "Failed to acquire the global lock!"
Return (1)
}
Return (0)
}
Method (MAIN, 0, Serialized)
{
Local0 = 0
Debug = "Acquiring the lock manually!"
Local0 += CHEK(Acquire (_GL, 0xFFFF))
Local0 += CHEK(Acquire (_GL, 0xFFFF))
Local0 += CHEK(Acquire (_GL, 0xFFFF))
Local0 += CHEK(Acquire (_GL, 0xFFFF))
Debug = "Doing a field write..."
OperationRegion(NVSM, SystemMemory, 0x100000, 128)
Field (NVSM, AnyAcc, Lock, WriteAsZeros) {
FILD, 1,
}
FILD = 1
Debug = "Write done, we should still be holding the lock!"
Release(_GL)
Release(_GL)
Release(_GL)
Debug = "Should release NOW!"
Release(_GL)
// TODO? Would be nice to have some way to actually verify that a lock is held...
Return (Local0)
}
}