mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 04:18:43 +00:00
Added plug for Multiboot.GetMBIAddress()
This commit is contained in:
parent
ec840b04a7
commit
0d426695ac
2 changed files with 21 additions and 2 deletions
|
|
@ -25,6 +25,7 @@ namespace ProcessorTests
|
|||
TestVendorNameIsNotBlank();
|
||||
TestCycleCount();
|
||||
TestCycleRateIsNotZero();
|
||||
TestMultiboot();
|
||||
|
||||
TestController.Completed();
|
||||
}
|
||||
|
|
@ -36,6 +37,11 @@ namespace ProcessorTests
|
|||
}
|
||||
}
|
||||
|
||||
public void TestMultiboot()
|
||||
{
|
||||
Assert.IsTrue(Multiboot.GetMBIAddress() != 0, $"Multiboot.GetMBIAddress works {Multiboot.GetMBIAddress()}");
|
||||
}
|
||||
|
||||
public void TestVendorNameIsNotBlank()
|
||||
{
|
||||
string vendorName = CPU.GetCPUVendorName();
|
||||
|
|
|
|||
|
|
@ -1,12 +1,25 @@
|
|||
using Cosmos.Core;
|
||||
using IL2CPU.API.Attribs;
|
||||
using XSharp;
|
||||
using XSharp.Assembler;
|
||||
|
||||
namespace Cosmos.Core_Asm
|
||||
{
|
||||
[Plug(Target = typeof(Multiboot))]
|
||||
public class MultibootImpl
|
||||
{
|
||||
[PlugMethod(Assembler = typeof(MultibootAsm))]
|
||||
public static uint GetMBIAddress() => throw null;
|
||||
[PlugMethod(Assembler = typeof(MultibootImplAsm))]
|
||||
public static uint GetMBIAddress()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class MultibootImplAsm : AssemblerMethod
|
||||
{
|
||||
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
|
||||
{
|
||||
XS.Push("MultibootSignature");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue