mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
Merge pull request #1481 from CosmosOS/multiboot_plug
Added plug for Multiboot.GetMBIAddress()
This commit is contained in:
commit
25639bc279
2 changed files with 21 additions and 2 deletions
|
|
@ -25,6 +25,7 @@ namespace ProcessorTests
|
||||||
TestVendorNameIsNotBlank();
|
TestVendorNameIsNotBlank();
|
||||||
TestCycleCount();
|
TestCycleCount();
|
||||||
TestCycleRateIsNotZero();
|
TestCycleRateIsNotZero();
|
||||||
|
TestMultiboot();
|
||||||
|
|
||||||
TestController.Completed();
|
TestController.Completed();
|
||||||
}
|
}
|
||||||
|
|
@ -36,6 +37,11 @@ namespace ProcessorTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TestMultiboot()
|
||||||
|
{
|
||||||
|
Assert.IsTrue(Multiboot.GetMBIAddress() != 0, $"Multiboot.GetMBIAddress works {Multiboot.GetMBIAddress()}");
|
||||||
|
}
|
||||||
|
|
||||||
public void TestBrandStringBlank()
|
public void TestBrandStringBlank()
|
||||||
{
|
{
|
||||||
string brandString = CPU.GetCPUBrandString();
|
string brandString = CPU.GetCPUBrandString();
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,25 @@
|
||||||
using Cosmos.Core;
|
using Cosmos.Core;
|
||||||
using IL2CPU.API.Attribs;
|
using IL2CPU.API.Attribs;
|
||||||
|
using XSharp;
|
||||||
|
using XSharp.Assembler;
|
||||||
|
|
||||||
namespace Cosmos.Core_Asm
|
namespace Cosmos.Core_Asm
|
||||||
{
|
{
|
||||||
[Plug(Target = typeof(Multiboot))]
|
[Plug(Target = typeof(Multiboot))]
|
||||||
public class MultibootImpl
|
public class MultibootImpl
|
||||||
{
|
{
|
||||||
[PlugMethod(Assembler = typeof(MultibootAsm))]
|
[PlugMethod(Assembler = typeof(MultibootImplAsm))]
|
||||||
public static uint GetMBIAddress() => throw null;
|
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