-
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
6922f94
commit d4faf0f
Showing
4 changed files
with
125 additions
and
0 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,77 @@ | ||
/* | ||
* PROJECT: Mobility | ||
* FILE: Mobility.MinUap.cpp | ||
* PURPOSE: Implementation for Mobility Minimum UEFI Application Project | ||
* | ||
* LICENSE: The MIT License | ||
* | ||
* MAINTAINER: MouriNaruto ([email protected]) | ||
*/ | ||
|
||
#include <Mile.Project.Version.h> | ||
|
||
#include <Uefi.h> | ||
|
||
#ifndef _In_ | ||
#define _In_ | ||
#endif // !_In_ | ||
|
||
#ifndef _Out_ | ||
#define _Out_ | ||
#endif // !_Out_ | ||
|
||
#define MOBILITY_MINUAP_VERSION_STRING \ | ||
MILE_PROJECT_VERSION_STRING L" (Build " \ | ||
MILE_PROJECT_MACRO_TO_STRING(MILE_PROJECT_VERSION_BUILD) L")" | ||
|
||
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 Minimum UEFI Application Project" | ||
L" " MOBILITY_MINUAP_VERSION_STRING L"\r\n" | ||
L"(c) Kenji Mouri. All rights reserved.\r\n" | ||
L"\r\n"); | ||
|
||
::OutputWideString( | ||
SystemTable->ConOut, | ||
L"Hello World!\r\n"); | ||
|
||
::OutputWideString( | ||
SystemTable->ConOut, | ||
L"\r\n" | ||
L"Press any key to return to the boot menu...\r\n"); | ||
{ | ||
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,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{A158BB1B-480D-4622-B0F1-517D8F366BC1}</ProjectGuid> | ||
<RootNamespace>Mobility.MinUap</RootNamespace> | ||
<MileProjectType>UefiApplication</MileProjectType> | ||
<TargetName>MoMinUap</TargetName> | ||
<MileProjectUseProjectProperties>true</MileProjectUseProjectProperties> | ||
<MileProjectCompanyName>Mobility</MileProjectCompanyName> | ||
<MileProjectFileDescription>Mobility Minimum UEFI Application Project</MileProjectFileDescription> | ||
<MileProjectInternalName>Mobility.MinUap</MileProjectInternalName> | ||
<MileProjectLegalCopyright>© Kenji Mouri. All rights reserved.</MileProjectLegalCopyright> | ||
<MileProjectOriginalFilename>MoMinUap.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.Platform.ARM64.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" /> | ||
<ItemGroup> | ||
<ClCompile Include="Mobility.MinUap.cpp" /> | ||
</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