mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 22:09:12 +00:00
Moved extensions to Cosmos.Kernel
This commit is contained in:
parent
e2c9a8e8d9
commit
c54e466b88
23 changed files with 29 additions and 37 deletions
|
|
@ -17,8 +17,9 @@ namespace KudzuTest {
|
|||
var xPCIDevice = Cosmos.Hardware.PC.Bus.PCIBus.Devices[d];
|
||||
string xVendor = xDeviceIDs.FindVendor(xPCIDevice.VendorID);
|
||||
|
||||
if (xVendor == default(string))
|
||||
if (xVendor == null) {
|
||||
xVendor = ToHex(xPCIDevice.VendorID, 4);
|
||||
}
|
||||
|
||||
System.Console.Write(xPCIDevice.Bus + "-" + xPCIDevice.Slot + "-" + xPCIDevice.Function);
|
||||
System.Console.Write(" " + xVendor + ":" + ToHex(xPCIDevice.DeviceID, 4));
|
||||
|
|
|
|||
|
|
@ -134,9 +134,6 @@ namespace Cosmos.Kernel.FileSystem
|
|||
}
|
||||
}
|
||||
|
||||
private ATA _ata;
|
||||
private Header _header;
|
||||
|
||||
public Fat16(ATA ata)
|
||||
{
|
||||
}
|
||||
|
|
@ -147,7 +144,7 @@ namespace Cosmos.Kernel.FileSystem
|
|||
|
||||
public void Open()
|
||||
{
|
||||
_header = new Header();
|
||||
//_header = new Header();
|
||||
|
||||
// TODO: Read the header.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@
|
|||
<Compile Include="Bus\USB\USBHostOHCI.cs" />
|
||||
<Compile Include="Bus\USB\USBHostOHCIRegisters.cs" />
|
||||
<Compile Include="Device.cs" />
|
||||
<Compile Include="Extension\NumberSystem\Binary.cs" />
|
||||
<Compile Include="Extension\NumberSystem\Hex.cs" />
|
||||
<Compile Include="KeyboardOld.cs" />
|
||||
<Compile Include="Network\Devices\RTL8139\BinaryHelper.cs" />
|
||||
<Compile Include="Network\Devices\RTL8139\Packet.cs" />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using System.Text;
|
|||
using Cosmos.Hardware.Network;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Cosmos.Hardware;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Cosmos.Hardware;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Cosmos.Hardware;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
//using System.Linq;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Cosmos.Hardware;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Cosmos.Hardware;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Cosmos.Hardware;
|
||||
using Cosmos.Hardware.PC.Bus;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
||||
{
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ namespace Cosmos.Hardware.Network.Devices.RTL8139.Register
|
|||
break;
|
||||
default:
|
||||
throw new Exception("Illegal Transmit Status Descriptor");
|
||||
break;
|
||||
}
|
||||
|
||||
return xMem.Read32(address);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.TCPIPModel.NetworkLayer.IPv4
|
||||
{
|
||||
|
|
@ -21,12 +20,12 @@ namespace Cosmos.Hardware.Network.TCPIPModel.NetworkLayer.IPv4
|
|||
|
||||
//TODO: Get the correct bits and bytes...
|
||||
//TODO: Maybe some endinan conversions are needed.
|
||||
var p = new IPv4Packet();
|
||||
p.Version = data[0];
|
||||
p.HeaderLength = data[1];
|
||||
//var p = new IPv4Packet();
|
||||
//p.Version = data[0];
|
||||
//p.HeaderLength = data[1];
|
||||
//etc...
|
||||
|
||||
return p;
|
||||
//return p;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace Cosmos.Hardware.Network.TCPIPModel.PhysicalLayer.Ethernet2
|
||||
{
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@
|
|||
<Compile Include="AddressSpace.cs" />
|
||||
<Compile Include="CPU.cs" />
|
||||
<Compile Include="CPUBus.cs" />
|
||||
<Compile Include="Extension\Binary.cs" />
|
||||
<Compile Include="Extension\Hex.cs" />
|
||||
<Compile Include="Global.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Cosmos.Hardware.Extension.NumberSystem
|
||||
{
|
||||
public static class Binary
|
||||
{
|
||||
namespace Cosmos.Kernel {
|
||||
public static class BinaryExtension {
|
||||
#region Extension methods
|
||||
|
||||
public static string ToBinary(this byte n)
|
||||
|
|
@ -2,9 +2,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Cosmos.Hardware.Extension.NumberSystem
|
||||
{
|
||||
public static class Hex
|
||||
namespace Cosmos.Kernel {
|
||||
public static class HexExtension
|
||||
{
|
||||
|
||||
#region C# 3.0 Extension Methods
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware.Network.Devices.RTL8139;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace FrodeTest.Shell
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using System.Text;
|
|||
using Cosmos.Hardware.Network.TCPIPModel.NetworkLayer.IPv4;
|
||||
using Cosmos.Hardware.Network.TCPIPModel.PhysicalLayer.Ethernet2;
|
||||
using Cosmos.Hardware.Network.Devices.RTL8139;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
using Cosmos.Hardware.Network;
|
||||
|
||||
namespace FrodeTest.Test
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Cosmos.Hardware.Extension.NumberSystem;
|
||||
using Cosmos.Kernel;
|
||||
|
||||
namespace FrodeTest.Test
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ namespace SteveKernel
|
|||
|
||||
Console.WriteLine("dumping memory space:");
|
||||
|
||||
for (uint i = 0; i < mas.Size; i++)
|
||||
//for (uint i = 0; i < mas.Size; i++)
|
||||
// Conver to extensino method as per your commetns. :)
|
||||
//Console.Write(PCIBus.ToHex(mas.Read8Unchecked(i),2) +" ");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue