ACPI not working
See original GitHub issueOn my new OS, I’m trying to implement ACPI using the class from dewitcher (that was working on older releases) but the problem is that with this :
public static void Shutdown()
{
Console.Clear();
if (PM1a_CNT == null) Init();
if (pm1aIO != null)
{
pm1aIO.Word = (ushort)(SLP_TYPa | SLP_EN);
if (PM1b_CNT != null)
pm1bIO.Word = (ushort)(SLP_TYPb | SLP_EN);
}
Console.WriteLine("Its now safe to turn off the computer.");
}
I get a compilation error :
Error occurred while invoking IL2CPU.
Exception: System.NotImplementedException: Or on types 'System.UInt16' and 'System.Int16' not yet implemented!
… Cosmos.IL2CPU.ILOpCodes.OpNone.DoInterpretStackTypes(Boolean& aSituationChanged) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCodes\OpNone.cs:ligne 723
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 384
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(ILOpCode xNextOpCode, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 436
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(Int32 aPosition, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 430
… Cosmos.IL2CPU.ILOpCode.DoInterpretNextInstructionStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 412
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 389
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(ILOpCode xNextOpCode, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 436
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(Int32 aPosition, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 430
… Cosmos.IL2CPU.ILOpCode.DoInterpretNextInstructionStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 412
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 389
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(ILOpCode xNextOpCode, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 436
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(Int32 aPosition, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 430
… Cosmos.IL2CPU.ILOpCode.DoInterpretNextInstructionStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 412
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 389
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(ILOpCode xNextOpCode, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 436
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(Int32 aPosition, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 430
… Cosmos.IL2CPU.ILOpCode.DoInterpretNextInstructionStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 412
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 389
… Cosmos.IL2CPU.AppAssembler.InterpretInstructionsToDetermineStackTypes(List`1 aCurrentGroup) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\AppAssembler.cs:ligne 698
… Cosmos.IL2CPU.AppAssembler.EmitInstructions(MethodInfo aMethod, List`1 aCurrentGroup, Boolean& emitINT3) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\AppAssembler.cs:ligne 541
… Cosmos.IL2CPU.AppAssembler.ProcessMethod(MethodInfo aMethod, List`1 aOpCodes) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\AppAssembler.cs:ligne 503
… Cosmos.IL2CPU.ILScanner.Assemble() dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:ligne 941
… Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:ligne 257
… Cosmos.IL2CPU.CompilerEngine.Execute() dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\CompilerEngine.cs:ligne 238
(SLP_TYPa, SLP_TYPb and SLP_EN are of type short
)
So I tried to cast them to ushort
like that :
public static void Shutdown()
{
Console.Clear();
if (PM1a_CNT == null) Init();
if (pm1aIO != null)
{
pm1aIO.Word = (ushort)((ushort)SLP_TYPa | (ushort)SLP_EN);
if (PM1b_CNT != null)
pm1bIO.Word = (ushort)((ushort)SLP_TYPb | (ushort)SLP_EN);
}
Console.WriteLine("Its now safe to turn off the computer.");
}
Now I get this error :
Error occurred while invoking IL2CPU.
Exception: System.Exception: Wrong Poptype encountered! (Type = System.UIntPtr, expected = System.Byte*)
… Cosmos.IL2CPU.ILOpCodes.OpField.DoInterpretStackTypes(Boolean& aSituationChanged) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCodes\OpField.cs:ligne 225
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 384
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(ILOpCode xNextOpCode, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 436
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(Int32 aPosition, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 430
… Cosmos.IL2CPU.ILOpCode.DoInterpretNextInstructionStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 412
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 389
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(ILOpCode xNextOpCode, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 436
… Cosmos.IL2CPU.ILOpCode.InterpretInstruction(Int32 aPosition, IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 430
… Cosmos.IL2CPU.ILOpCode.DoInterpretNextInstructionStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 412
… Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary`2 aOpCodes, Stack`1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:ligne 389
… Cosmos.IL2CPU.AppAssembler.InterpretInstructionsToDetermineStackTypes(List`1 aCurrentGroup) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\AppAssembler.cs:ligne 698
… Cosmos.IL2CPU.AppAssembler.EmitInstructions(MethodInfo aMethod, List`1 aCurrentGroup, Boolean& emitINT3) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\AppAssembler.cs:ligne 541
… Cosmos.IL2CPU.AppAssembler.ProcessMethod(MethodInfo aMethod, List`1 aOpCodes) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\AppAssembler.cs:ligne 511
… Cosmos.IL2CPU.ILScanner.Assemble() dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:ligne 941
… Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILScanner.cs:ligne 257
… Cosmos.IL2CPU.CompilerEngine.Execute() dans d:\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\CompilerEngine.cs:ligne 238
I think it’s a bug or something like that. Thanks
Full code for ACPI.cs here
Issue Analytics
- State:
- Created 8 years ago
- Comments:41 (19 by maintainers)
Top Results From Across the Web
ACPI BIOS ERROR on Windows 10/11 [Simplest Solutions]
ACPI BIOS error RAM – Most common hardware cause for blue screen errors is your RAM. If you have this problem on your...
Read more >A Full Guide To Fix ACPI BIOS Error In Windows 10/8/7
If you have outdated or incompatible drivers on your computer, the ACPI BSOD error tends to appear during the PC startup process: the...
Read more >What is ACPI BIOS Error In Windows 10 / 11 and How to Fix It
Some of the common reasons why you would encounter the ACPI_BIOS_ERROR in your Windows 10 PC include, if the device drivers are outdated...
Read more >Bug Check 0xA5 ACPI_BIOS_ERROR - Windows drivers
This bug check indicates that the Advanced Configuration and Power Interface (ACPI) BIOS of the computer is not fully compliant with the ACPI ......
Read more >How to fix ACPI_BIOS_ERROR in Windows 10
Problem. The user is not able to run Windows normally due to a blue screen error. · Cause. This error may be caused...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. Thanks, my Wifi is very bad, will report back after it has downloaded. Thanks for all this btw 😃
Oh, sorry about the emails 😄 I’ll look up how then, thanks