-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81a69a5
commit 0fa43f3
Showing
4 changed files
with
105 additions
and
7 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
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* PROJECT: Mobility | ||
* FILE: Mobility.HvGcs.cpp | ||
* PURPOSE: Implementation for Mobility Hyper-V Guest Compatibility Shim | ||
* | ||
* LICENSE: The MIT License | ||
* | ||
* MAINTAINER: MouriNaruto ([email protected]) | ||
*/ | ||
|
||
#include <Uefi.h> | ||
#include <Protocol/GraphicsOutput.h> | ||
|
||
#include <sal.h> | ||
#include <string.h> | ||
|
||
namespace | ||
{ | ||
static EFI_STATUS OutputWideString( | ||
_In_ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL* Output, | ||
_In_ const wchar_t* String) | ||
{ | ||
return Output->OutputString( | ||
Output, | ||
const_cast<CHAR16*>(reinterpret_cast<const CHAR16*>(String))); | ||
} | ||
} | ||
|
||
/** | ||
* Entry point to UEFI Application. | ||
* | ||
* @param ImageHandle The image handle of the UEFI Application. | ||
* @param SystemTable A pointer to the EFI System Table. | ||
* @return EFI_STATUS. If the function succeeds, the return value is | ||
* EFI_SUCCESS. | ||
*/ | ||
EFI_STATUS EFIAPI UefiMain( | ||
_In_ EFI_HANDLE ImageHandle, | ||
_In_ EFI_SYSTEM_TABLE* SystemTable) | ||
{ | ||
::OutputWideString( | ||
SystemTable->ConOut, | ||
L"Mobility Hyper-V Guest Compatibility Shim\r\n" | ||
L"================================================================\r\n" | ||
L"Hello World!\r\n" | ||
L"================================================================\r\n" | ||
L"Press any key to return to the boot menu..."); | ||
{ | ||
UINTN Index = 0; | ||
SystemTable->BootServices->WaitForEvent( | ||
1, | ||
&SystemTable->ConIn->WaitForKey, | ||
&Index); | ||
} | ||
|
||
return EFI_SUCCESS; | ||
} | ||
|
||
#pragma comment(linker, "/entry:UefiMain") |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{30B9DE98-9479-4E1B-AAFA-D754BD5F7182}</ProjectGuid> | ||
<RootNamespace>Mobility.HvGcs</RootNamespace> | ||
<MileProjectType>UefiApplication</MileProjectType> | ||
<TargetName>MoHvGcs</TargetName> | ||
<MileProjectUseProjectProperties>true</MileProjectUseProjectProperties> | ||
<MileProjectCompanyName>Mobility</MileProjectCompanyName> | ||
<MileProjectFileDescription>Mobility Hyper-V Guest Compatibility Shim</MileProjectFileDescription> | ||
<MileProjectInternalName>Mobility.HvGcs</MileProjectInternalName> | ||
<MileProjectLegalCopyright>© Kenji Mouri. All rights reserved.</MileProjectLegalCopyright> | ||
<MileProjectOriginalFilename>Mobility.HvGcs.efi</MileProjectOriginalFilename> | ||
<MileProjectProductName>Mobility</MileProjectProductName> | ||
<MileProjectVersion>1.0.$([System.DateTime]::Today.Subtract($([System.DateTime]::Parse('2024-11-04'))).TotalDays).0</MileProjectVersion> | ||
<MileProjectVersionTag Condition="false">Alpha 1</MileProjectVersionTag> | ||
</PropertyGroup> | ||
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Platform.x64.props" /> | ||
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Cpp.Default.props" /> | ||
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Cpp.props" /> | ||
<Import Project="..\Mile.Uefi\Mile.Uefi.props" /> | ||
<Import Project="..\Mile.Uefi.RuntimeLibrary\Mile.Uefi.RuntimeLibrary.props" /> | ||
<ItemGroup> | ||
<ClCompile Include="Mobility.HvGcs.cpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Mile.HyperV"> | ||
<Version>1.1.419</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
<Import Project="..\Mile.Uefi\Mile.Uefi.targets" /> | ||
<Import Sdk="Mile.Project.Configurations" Version="1.0.1426" Project="Mile.Project.Cpp.targets" /> | ||
</Project> |
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