Ring Check.

This commit is contained in:
José Pedro 2017-08-05 18:04:48 +01:00
parent 150bc00fe2
commit 41db0bedaf
14 changed files with 74 additions and 125 deletions

View file

@ -32,6 +32,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Core.DebugStub", "so
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Kernel", "source\Cosmos.Debug.Kernel\Cosmos.Debug.Kernel.csproj", "{EDE13333-B2E6-4E04-B995-209B8BDFA9D4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RingCheck", "source\RingCheck\RingCheck.csproj", "{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -120,6 +122,14 @@ Global
{EDE13333-B2E6-4E04-B995-209B8BDFA9D4}.Release|Any CPU.Build.0 = Release|Any CPU
{EDE13333-B2E6-4E04-B995-209B8BDFA9D4}.Release|x86.ActiveCfg = Release|Any CPU
{EDE13333-B2E6-4E04-B995-209B8BDFA9D4}.Release|x86.Build.0 = Release|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Debug|x86.ActiveCfg = Debug|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Debug|x86.Build.0 = Debug|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Release|Any CPU.Build.0 = Release|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Release|x86.ActiveCfg = Release|Any CPU
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -135,5 +145,9 @@ Global
{8037EF30-3CC2-4555-ACF0-8392250FAE2C} = {46490D36-261E-4D53-85BA-D4F71F09373C}
{D8E80776-2800-469B-AE31-D1C016D5E8D3} = {D232F471-5A59-438F-87EA-E1809E3BEDB4}
{EDE13333-B2E6-4E04-B995-209B8BDFA9D4} = {46490D36-261E-4D53-85BA-D4F71F09373C}
{CCC115FA-1E7E-4013-95C2-B43FCCF27DFF} = {C286932C-3F6D-47F0-BEEF-26843D1BB11B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4B900D20-A763-44BD-BCD1-A61B32E80D94}
EndGlobalSection
EndGlobal

View file

@ -19,7 +19,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="15.1.1012" />
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.1012" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.1.1012" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.1012" />

View file

@ -16,6 +16,9 @@
<BinFormat Condition="$(BinFormat) == ''">bin</BinFormat>
<CosmosBuildTaskAssemblyFile Condition="'$(CosmosBuildTaskAssemblyFile)' == ''">$(VSIPDir)\Cosmos.Build.MSBuild.dll</CosmosBuildTaskAssemblyFile>
<AssemblySearchPaths>$(CosmosDir)\Kernel</AssemblySearchPaths>
<!--
<CosmosKernelAssembly>$(OutDir)$(TargetName)$(TargetExt)</CosmosKernelAssembly>
-->
</PropertyGroup>
<ItemGroup Condition="$(KernelPkg) == ''">
@ -36,6 +39,7 @@
<Reference Remove="System.Core" />
</ItemGroup>
<UsingTask TaskName="Cosmos.Build.MSBuild.RingCheck" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.IL2CPU" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.NAsm" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<UsingTask TaskName="Cosmos.Build.MSBuild.MakeISO" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
@ -44,6 +48,7 @@
<UsingTask TaskName="Cosmos.Build.MSBuild.ExtractMapFromElfFile" AssemblyFile="$(CosmosBuildTaskAssemblyFile)"/>
<Target Name="CoreCompile">
<Error Text="The Release configuration isn't currently supported!" Condition="$(Configuration) == 'Release'" />
<Error Text="File %(Compile.Identity) is set to compile, but .Cosmos projects don't compile any source themselves!" Condition="$(Compile) != ''"/>
<CreateProperty Value="true" Condition="$(BinFormat) == 'elf'">
<Output PropertyName="IsELF" TaskParameter="Value"/>
@ -51,6 +56,9 @@
<CreateProperty Value="false" Condition="$(BinFormat) == 'bin'">
<Output PropertyName="IsELF" TaskParameter="Value"/>
</CreateProperty>
<!--
<Cosmos.Build.MSBuild.RingCheck AssemblyPath="$(CosmosKernelAssembly)" WorkingDir="$(TargetDir)1" />
-->
<Cosmos.Build.MSBuild.IL2CPU KernelPkg="$(KernelPkg)" DebugMode="$(DebugMode)" DebugEnabled="$(DebugEnabled)" StackCorruptionDetectionEnabled="$(StackCorruptionDetectionEnabled)" StackCorruptionDetectionLevel="$(StackCorruptionDetectionLevel)" TraceAssemblies="$(TraceAssemblies)" IgnoreDebugStubAttribute="$(IgnoreDebugStubAttribute)" DebugCom="1" UseNAsm="true" References="@(ReferencePath)" AssemblySearchDirs="$(AssemblySearchPaths)" OutputFilename="$(TargetDir)$(MSBuildProjectName).asm" EnableLogging="true" EmitDebugSymbols="$(DebugSymbols)" CosmosBuildDir="$(CosmosDir)\Build" WorkingDir="$(TargetDir)"/>
<Cosmos.Build.MSBuild.NAsm InputFile="$(TargetDir)$(MSBuildProjectName).asm" OutputFile="$(TargetDir)$(MSBuildProjectName).obj" IsELF="$(IsELF)" ExePath="$(NasmFile)"/>
<!-- ELF only -->

View file

@ -1,9 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>

View file

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using Microsoft.Build.Framework;
using Cosmos.Build.Common;
namespace Cosmos.Build.MSBuild
{
public class RingCheck : BaseToolTask
{
[Required]
public string KernelAssemblyPath { get; set; }
[Required]
public string WorkingDir { get; set; }
private List<string> mAssemblySearchPaths;
public override bool Execute()
{
return ExecuteTool(WorkingDir, Path.Combine(CosmosPaths.Build, "RingCheck", "RingCheck.exe"), KernelAssemblyPath, "Ring Check");
}
}
}

View file

@ -1,11 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.Build.MSBuild
{
public static class TestClass
{
}
}

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Cosmos.IL2CPU.API.Attribs {
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Field, AllowMultiple = true)]

View file

@ -2,12 +2,11 @@
<PropertyGroup>
<TargetFramework>netstandard1.5</TargetFramework>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>Cosmos.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Authors>Cosmos</Authors>
<Company>Cosmos</Company>
</PropertyGroup>
<ItemGroup>

View file

@ -138,7 +138,7 @@ namespace Cosmos.CPU {
#endregion
[AsmMarker(AsmMarker.Type.Int_LastKnownAddress)]
private static uint mLastKnownAddress;
private static uint mLastKnownAddress = 0;
private static IRQDelegate[] mIRQ_Handlers = new IRQDelegate[256];

View file

@ -56,17 +56,17 @@
<Compile Remove="*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\source\Kernel\Cosmos.CPU\Cosmos.CPU.csproj">
<ProjectReference Include="..\00-CPU\Cosmos.CPU\Cosmos.CPU.csproj">
<Name>Cosmos.CPU</Name>
<Project>{fc65d765-990d-4f00-b240-8dd17fa91ea9}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\source\Kernel\Cosmos.HAL\Cosmos.HAL.csproj">
<ProjectReference Include="..\20-HAL\Cosmos.HAL\Cosmos.HAL.csproj">
<Name>Cosmos.HAL</Name>
<Project>{3f8ede0e-61bd-4d01-95f5-4a5a17f6221e}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\source\Kernel\Cosmos.Platform\Cosmos.Platform.csproj">
<ProjectReference Include="..\10-Platform\Cosmos.Platform\Cosmos.Platform.csproj">
<Name>Cosmos.Platform</Name>
<Project>{63843265-d889-47d2-883e-595289c99f42}</Project>
<Private>True</Private>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
</configuration>

View file

@ -1,9 +1,19 @@
using System;
using System.Text;
namespace RingCheck {
class Program {
static void Main(string[] args) {
namespace RingCheck
{
class Program
{
static void Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("Usage: ringcheck <path-to-kernel>");
return;
}
var xKernelAssemblyPath = args[1];
}
}
}

View file

@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RingCheck")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RingCheck")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0ee3df1c-44e6-4669-88aa-d8d2612da817")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View file

@ -1,52 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>RingCheck</RootNamespace>
<AssemblyName>RingCheck</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cosmos.IL2CPU.API\Cosmos.IL2CPU.API.csproj">
<Project>{a9469897-4fd8-49e7-97f1-fe420a2b75b9}</Project>
<Name>Cosmos.IL2CPU.API</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>