typedef struct { CHAR16 UnicodeWeight; UINT8 Attributes; UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; } EFI_NARROW_GLYPH;
{ 0x0020, //0x20 - , UCS-2 ASCII 0x00, //, , {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},// , ,
{ 0x0041, // 0x41 - “A” 0x00, // {0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00}},// “A”,
set NASM_PREFIX=C:\FW\NASM\ call c:\FW\edk2\edksetup.bat --nt32 build –p Nt32Pkg/Nt32Pkg.dsc -m EducationPkg\Matreshka\Matreshka.inf
–p Nt32Pkg/Nt32Pkg.dsc
-m EducationPkg\Matreshka\Matreshka.inf
set NASM_PREFIX=C:\FW\NASM\ call c:\FW\edk2\edksetup.bat --nt32 build
set NASM_PREFIX=C:\FW\NASM\ call c:\FW\edk2\edksetup.bat --nt32 build clean
C:\FW\edk2\Build\NT32IA32\DEBUG_VS2010x86\IA32\SecMain.exe
C:\FW\edk2\Build\NT32IA32\DEBUG_VS2010x86\IA32\
C:\FW\edk2\Nt32Pkg\Nt32Pkg.dsc
EducationPkg/MyFirstDriver/MyFirstDriver.inf
EducationPkg\Matreshka\Matreshka.inf
# Add new modules here
C:\FW\edk2\Build\NT32IA32\DEBUG_VS2010x86\IA32
# load MyFirstdriver.efi
load Matreshka.efi
C:\FW\edk2\EducationPkg\MyFirstDriver
EFI_STATUS EFIAPI MyTestString(void){ EFI_STATUS Status; EFI_HII_FONT_PROTOCOL *mHiiFontProtocol; EFI_FONT_DISPLAY_INFO *FontInfo; CHAR16 TestString[] = L" , Test String\n\r"; // , , Status = gST->ConOut->OutputString(gST->ConOut, TestString); // , DEBUG((EFI_D_INFO, "OutputString status = %r\n\r", Status)); //, // EFI_HII_FONT_PROTOCOL Status = gBS->LocateProtocol ( // , , &gEfiHiiFontProtocolGuid, // , NULL, // (VOID **) &mHiiFontProtocol ); if (EFI_ERROR (Status)) { // , return EFI_UNSUPPORTED; } // Status = mHiiFontProtocol->GetFontInfo ( mHiiFontProtocol, NULL, NULL, //, &FontInfo, NULL ); DEBUG((EFI_D_INFO, "GetFontInfo status = %r, current font has '%s' name\n\r", Status, FontInfo->FontInfo.FontName)); return EFI_SUCCESS; }
MyTestString(); return Status; }
#include "Matreshka.h"
#include "Matreshka.h" #include <Protocol/HiiFont.h> EFI_STATUS EFIAPI MyTestString(void);
//DEBUG((EFI_D_INFO, "OutputString() status = %r\n\r", Status));
UINTN Count = 0; EFI_IMAGE_OUTPUT *Blt = NULL;
// \0 while (TestString[Count]) { // Status = mHiiFontProtocol->GetGlyph ( // mHiiFontProtocol, // TestString[Count], // NULL, &Blt, NULL ); if (Blt != NULL) { FreePool (Blt); Blt = NULL; } // UCS-2 DEBUG ((EFI_D_INFO,"Current symbol code is 0x%04x\t",TestString[Count++])); // , DEBUG ((EFI_D_INFO,"Status: %r\r\n", Status)); }
return EFI_SUCCESS;
{ 0x0410, 0x00, {0x00,0x00,0x00,0x30,0x78,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0411, 0x00, {0x00,0x00,0x00,0xfe,0x62,0x60,0x7c,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0412, 0x00, {0x00,0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0413, 0x00, {0x00,0x00,0x00,0xfe,0x62,0x62,0x60,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0414, 0x00, {0x00,0x00,0x00,0x3e,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xff,0xc3,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0415, 0x00, {0x00,0x00,0x00,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0416, 0x00, {0x00,0x00,0x00,0x99,0xdb,0x5a,0x7e,0x3c,0x7e,0x5a,0xdb,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0417, 0x00, {0x00,0x00,0x00,0x3c,0x66,0x46,0x06,0x1c,0x06,0x46,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0418, 0x00, {0x00,0x00,0x00,0xc6,0xc6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0419, 0x00, {0x00,0x00,0x18,0xd6,0xf6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x041a, 0x00, {0x00,0x00,0x00,0xe6,0x66,0x6c,0x6c,0x78,0x6c,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x041b, 0x00, {0x00,0x00,0x00,0x1e,0x3e,0x66,0x66,0x66,0x66,0x66,0x66,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x041c, 0x00, {0x00,0x00,0x00,0xc6,0xee,0xfe,0xfe,0xd6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x041d, 0x00, {0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x041e, 0x00, {0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x041f, 0x00, {0x00,0x00,0x00,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0420, 0x00, {0x00,0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0421, 0x00, {0x00,0x00,0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xc0,0xc6,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0422, 0x00, {0x00,0x00,0x00,0x7e,0x5a,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0423, 0x00, {0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3e,0x06,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0424, 0x00, {0x00,0x00,0x00,0x18,0x7e,0xdb,0xdb,0xdb,0xdb,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0425, 0x00, {0x00,0x00,0x00,0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0426, 0x00, {0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xfe,0x06,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0427, 0x00, {0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0428, 0x00, {0x00,0x00,0x00,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0429, 0x00, {0x00,0x00,0x00,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x042a, 0x00, {0x00,0x00,0x00,0xe0,0xe0,0x60,0x60,0x7c,0x66,0x66,0x66,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x042b, 0x00, {0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xf6,0xde,0xde,0xde,0xf6,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x042c, 0x00, {0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x042d, 0x00, {0x00,0x00,0x00,0x78,0xcc,0xc6,0x06,0x1e,0x06,0xc6,0xcc,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x042e, 0x00, {0x00,0x00,0x00,0xce,0xdb,0xdb,0xfb,0xfb,0xdb,0xdb,0xdb,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x042f, 0x00, {0x00,0x00,0x00,0x3f,0x66,0x66,0x66,0x3e,0x36,0x66,0x66,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0430, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x06,0x3e,0x66,0x66,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0431, 0x00, {0x00,0x00,0x00,0x00,0x00,0x02,0x3e,0x60,0x7c,0x66,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0432, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x66,0x7c,0x66,0x66,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0433, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0434, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x36,0x36,0x36,0x36,0x7f,0x63,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0435, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x7e,0x60,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0436, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x6b,0x3e,0x3e,0x6b,0x49,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0437, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x46,0x1c,0x06,0x46,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0438, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x6e,0x7e,0x76,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0439, 0x00, {0x00,0x00,0x00,0x04,0x0c,0x08,0x66,0x66,0x6e,0x7e,0x76,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x043a, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6c,0x78,0x6c,0x64,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x043b, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x1e,0x16,0x36,0x26,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x043c, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x77,0x6b,0x6b,0x63,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x043d, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x7e,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x043e, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x66,0x66,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x043f, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0440, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0x00,0x00,0x00,0x00,0x00}}, { 0x0441, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x60,0x60,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0442, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0443, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x33,0x33,0x1f,0x03,0x33,0x1e,0x00,0x00,0x00,0x00,0x00}}, { 0x0444, 0x00, {0x00,0x00,0x00,0x00,0x00,0x08,0x3e,0x6b,0x6b,0x6b,0x3e,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0445, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x36,0x1c,0x1c,0x36,0x63,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0446, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7f,0x03,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0447, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x3e,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0448, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x6b,0x6b,0x6b,0x6b,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0449, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x6b,0x6b,0x6b,0x6b,0x6b,0x7f,0x01,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x044a, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x70,0x3e,0x33,0x33,0xbe,0x80,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x044b, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x63,0x63,0x7b,0x6f,0x6f,0x7b,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x044c, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x7c,0x66,0x66,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x044d, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x1e,0x06,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x044e, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x7b,0x7b,0x7b,0x7b,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x044f, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x66,0x66,0x3e,0x36,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0450, 0x00, {0x00,0x00,0x6c,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0451, 0x00, {0x00,0x00,0x00,0x48,0x48,0x00,0x78,0xcc,0xfc,0xc0,0xcc,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0452, 0x00, {0x00,0x00,0x00,0x3c,0x66,0xc6,0xc0,0xf0,0xc0,0xc6,0x66,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0453, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xcc,0xf0,0xc0,0xcc,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0454, 0x00, {0x00,0x00,0xcc,0xcc,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0455, 0x00, {0x00,0x00,0x00,0x66,0x66,0x00,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
C:\FW\edk2\MdeModulePkg\Universal\Console\GraphicsConsoleDxe\LaffStd.c
EFI_NARROW_GLYPH gUsStdNarrowGlyphData[] = { // // Unicode glyphs from 0x20 to 0x7e are the same as ASCII characters 0x20 to 0x7e // { 0x0020, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}, { 0x0021, 0x00, {0x00,0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00}}, ...
{ 0x00ff, 0x00, {0x00,0x00,0x00,0xC6,0xC6,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00}},
#langdef en "English" #langdef es "Spanish" #langdef cn "Chinese" #string STR_HELLO_WORLD #language en "Hello World" #language es "Hola Mundo" #language cn "您好世界"
fs0: load Matreshka.efi exit
C:\FW\edk2\MdePkg\MdePkg.dec
## Default platform supported RFC 4646 languages: (American) English & French. # @Prompt Default Value of PlatformLangCodes Variable. gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes|"en;fr;en-US;fr-FR;ru-RU"|VOID*|0x0000001e
C:\FW\edk2\MdeModulePkg\Application\UiApp\FrontPageStrings.uni
#langdef en-US "English" #langdef fr-FR "Français" #langdef en "Standard English" #langdef fr "Standard Français" #langdef ru-RU ""
#string STR_LANGUAGE_SELECT #language en-US "Select Language" #language fr-FR "Choisir la Langue" #language ru-RU " " #string STR_LANGUAGE_SELECT_HELP #language en-US "This is the option one adjusts to change the language for the current system" #language fr-FR "Ceci est l'option que celui ajuste changer la langue pour le système actuel" #language ru-RU " " #string STR_CONTINUE_PROMPT #language en-US "Continue" #language fr-FR "Continuer" #language ru-RU "" #string STR_RESET_STRING #language en-US "Reset" #language fr-FR "Reset" #language ru-RU ""
#string STR_NULL_STRING #language en-US " " #language fr-FR " " #language ru-RU " " #string STR_FRONT_PAGE_CPU_MODEL #language en-US "" #language fr-FR "" #language ru-RU " Pentium" #string STR_FRONT_PAGE_CPU_SPEED #language en-US "" #language fr-FR "" #language ru-RU " 100 "
Source: https://habr.com/ru/post/338634/
All Articles