-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to BareMetal Unit Test Engine + Fix for Hello World (#1129)
* - WIP * - WIP * - WIP * - WIP * - WIP * - WIP * - BareMetal UnitTestEngine * - BareMetal UnitTestEngine * - BareMetal UnitTestEngine * - BareMetal UnitTestEngine * - Stack Corruption Fix
- Loading branch information
Showing
21 changed files
with
242 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
cd %~dp0 | ||
cd ..\bin | ||
Mosa.Tool.Launcher -autostart -o0 -output-asm -output-debug -output-hash Mosa.Demo.TestWorld.x86.dll | ||
Mosa.Tool.Launcher -autostart -output-asm -output-debug -output-hash Mosa.Demo.TestWorld.x86.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,29 @@ | ||
// Copyright (c) MOSA Project. Licensed under the New BSD License. | ||
|
||
using System; | ||
using Mosa.Kernel.BareMetal; | ||
using Mosa.Kernel.BareMetal.x86; | ||
using Mosa.Runtime.Plug; | ||
using Mosa.UnitTests.Basic; | ||
using Mosa.UnitTests.Optimization; | ||
using Serial = Mosa.Kernel.BareMetal.x86.Serial; | ||
|
||
namespace Mosa.UnitTests.BareMetal.x86; | ||
|
||
/// <summary> | ||
/// Boot | ||
/// </summary> | ||
public static class Boot | ||
{ | ||
/// <summary> | ||
/// Main | ||
/// </summary> | ||
public static void Main() | ||
{ | ||
IDT.SetInterruptHandler(ProcessInterrupt); | ||
|
||
UnitTestEngine.Setup(0x3F8); // Serial.COM1 | ||
|
||
Console.BackgroundColor = ConsoleColor.Blue; | ||
Console.Clear(); | ||
Console.SetCursorPosition(0, 0); | ||
Console.ForegroundColor = ConsoleColor.Yellow; | ||
Console.Write("MOSA OS Version 2.4 - UnitTest"); | ||
Console.WriteLine(); | ||
Console.WriteLine(); | ||
var result = ArrayLayoutTests.C_4(); | ||
|
||
UnitTestEngine.DisplayUpdate(); | ||
|
||
UnitTestEngine.Setup(1); | ||
IDT.SetInterruptHandler(ProcessInterrupt); | ||
|
||
UnitTestEngine.Setup(Serial.COM1); | ||
UnitTestEngine.EnterTestReadyLoop(); | ||
} | ||
|
||
public static void ProcessInterrupt(uint interrupt, uint errorCode) | ||
{ | ||
UnitTestEngine.Process(); | ||
} | ||
private static void ProcessInterrupt(uint interrupt, uint errorCode) => UnitTestEngine.Process(); | ||
|
||
private static void ForceTestCollection() | ||
{ | ||
// required to force assembly to be referenced and loaded | ||
CommonTests.OptimizationTest1(); | ||
} | ||
|
||
[Plug("Mosa.Runtime.StartUp::BootOptions")] | ||
public static void SetBootOptions() | ||
{ | ||
BootSettings.EnableDebugOutput = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.