Processor merge

This commit is contained in:
kudzu_cp 2008-05-07 01:34:31 +00:00
parent 10f917cf34
commit 60a57a1ac5
9 changed files with 17 additions and 48 deletions

View file

@ -89,7 +89,6 @@
<Compile Include="PC\DebugUtil.cs" />
<Compile Include="PC\Global.cs" />
<Compile Include="PC\Interrupts.cs" />
<Compile Include="PC\Processor.cs" />
<Compile Include="TempDictionary.cs" />
<Compile Include="Global.cs" />
<Compile Include="Old\DebugUtil.cs" />
@ -97,7 +96,6 @@
<Compile Include="Old\Keyboard.cs" />
<Compile Include="Old\PIT.cs" />
<Compile Include="Bus\PCIBus.cs" />
<Compile Include="Processor.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Old\RTC.cs" />
<Compile Include="Old\Screen\Text.cs" />

View file

@ -4,10 +4,5 @@ using System.Text;
namespace Cosmos.Hardware {
public class Global {
protected static Processor mProcessor;
public static Processor Processor {
get { return mProcessor; }
}
}
}

View file

@ -7,7 +7,7 @@ using HW = Cosmos.Hardware;
namespace Cosmos.Hardware.PC {
public class Global : Cosmos.Hardware.Global {
public static void Init(bool noATA, bool noATAOld, bool noATA2) {
mProcessor = new Processor();
Kernel.CPU.CreateGDT();
Bus.CPU.PIC.Init();
//All old.. need to port ----------------

View file

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.Hardware.PC {
public class Processor : Cosmos.Hardware.Processor {
public Processor() {
Processor.CreateGDT();
}
// Plugged
public static void CreateGDT() { }
}
}

View file

@ -1,8 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Cosmos.Hardware {
public abstract class Processor {
}
}

View file

@ -11,6 +11,9 @@ namespace Cosmos.Kernel.Plugs {
public static void CreateIDT() {
}
[PlugMethod(MethodAssembler = typeof(Assemblers.CreateGDT))]
public static void CreateGDT() { }
[PlugMethod(MethodAssembler = typeof(Assemblers.GetAmountOfRAM))]
public static uint GetAmountOfRAM() {
return 0;

View file

@ -64,7 +64,6 @@
<Compile Include="Assemblers\ZeroFill.cs" />
<Compile Include="CultureInfo.cs" />
<Compile Include="Hardware\PC\Bus\CPUBus.cs" />
<Compile Include="Hardware\PC\Processor.cs" />
<Compile Include="HeapImpl.cs" />
<Compile Include="String.cs" />
<Compile Include="Console.cs" />

View file

@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using Indy.IL2CPU.Plugs;
namespace Cosmos.Kernel.Plugs.Hardware.PC {
[Plug(Target = typeof(Cosmos.Hardware.PC.Processor))]
class Processor {
[PlugMethod(MethodAssembler = typeof(Assemblers.CreateGDT))]
public static void CreateGDT() { }
}
}

View file

@ -11,14 +11,19 @@ namespace Cosmos.Kernel {
/// Gets the amount of RAM in MB's.
/// </summary>
/// <returns></returns>
// Plugged
protected static uint GetAmountOfRAM() {
return 0;
}
// Plugged
protected static uint GetEndOfKernel() {
return 0;
}
// Plugged
public static void CreateGDT() { }
public static uint AmountOfMemory {
get {
return GetAmountOfRAM();
@ -31,17 +36,21 @@ namespace Cosmos.Kernel {
}
}
public static void ZeroFill(uint aStartAddress, uint aLength) {
// Plugged
public static void ZeroFill(uint aStartAddress, uint aLength) {
}
public static uint GetCurrentESP() {
// Plugged
public static uint GetCurrentESP() {
return 0;
}
public static uint GetEndOfStack() {
// Plugged
public static uint GetEndOfStack() {
return 0;
}
// Plugged
public static void DoTest() {
}
}