summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Nt32Pkg/Include/Guid/WinNtSystemConfig.h35
-rw-r--r--Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c41
-rw-r--r--Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h2
-rw-r--r--Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf9
-rw-r--r--Nt32Pkg/Nt32Pkg.dec2
-rw-r--r--Nt32Pkg/Nt32Pkg.dsc64
-rw-r--r--Nt32Pkg/Nt32Pkg.fdf1
7 files changed, 124 insertions, 30 deletions
diff --git a/Nt32Pkg/Include/Guid/WinNtSystemConfig.h b/Nt32Pkg/Include/Guid/WinNtSystemConfig.h
new file mode 100644
index 000000000..08225fb8b
--- /dev/null
+++ b/Nt32Pkg/Include/Guid/WinNtSystemConfig.h
@@ -0,0 +1,35 @@
+/**@file
+ Setup Variable data structure for NT32 platform.
+
+Copyright (c) 2009, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+
+**/
+
+#ifndef __WIN_NT_SYSTEM_CONFIGUE_H__
+#define __WIN_NT_SYSTEM_CONFIGUE_H__
+
+#define EFI_WIN_NT_SYSTEM_CONFIG_GUID \
+ { 0xb347f047, 0xaf8c, 0x490e, { 0xac, 0x07, 0x0a, 0xa9, 0xb7, 0xe5, 0x38, 0x58 }}
+
+#pragma pack(1)
+typedef struct {
+ //
+ // Console output mode
+ //
+ UINT32 ConOutColumn;
+ UINT32 ConOutRow;
+} WIN_NT_SYSTEM_CONFIGURATION;
+#pragma pack()
+
+
+extern EFI_GUID gEfiWinNtSystemConfigGuid;
+
+#endif
diff --git a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c
index 6970ceb00..3c981fb21 100644
--- a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c
+++ b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c
@@ -23,6 +23,44 @@ Abstract:
#include "BdsPlatform.h"
CHAR16 mFirmwareVendor[] = L"TianoCore.org";
+WIN_NT_SYSTEM_CONFIGURATION mSystemConfigData;
+
+VOID
+SetupVariableInit (
+ VOID
+ )
+{
+ EFI_STATUS Status;
+ UINTN Size;
+
+ Size = sizeof (mSystemConfigData);
+ Status = gRT->GetVariable (
+ L"Setup",
+ &gEfiWinNtSystemConfigGuid,
+ NULL,
+ &Size,
+ (VOID *) &mSystemConfigData
+ );
+
+ if (EFI_ERROR (Status)) {
+ //
+ // SetupVariable is corrupt
+ //
+ mSystemConfigData.ConOutRow = PcdGet32 (PcdConOutColumn);
+ mSystemConfigData.ConOutColumn = PcdGet32 (PcdConOutRow);
+
+ Status = gRT->SetVariable (
+ L"Setup",
+ &gEfiWinNtSystemConfigGuid,
+ EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ sizeof (mSystemConfigData),
+ (VOID *) &mSystemConfigData
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((EFI_D_ERROR, "Failed to save Setup Variable to non-volatile storage, Status = %r\n", Status));
+ }
+ }
+}
//
// BDS Platform Functions
@@ -35,7 +73,7 @@ PlatformBdsInit (
Routine Description:
- Platform Bds init. Incude the platform firmware vendor, revision
+ Platform Bds init. Include the platform firmware vendor, revision
and so crc check.
Arguments:
@@ -64,6 +102,7 @@ Returns:
//
gBS->CalculateCrc32 ((VOID *) gST, sizeof (EFI_SYSTEM_TABLE), &gST->Hdr.CRC32);
+ SetupVariableInit ();
}
EFI_STATUS
diff --git a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h
index 5188ba51c..99a2a4ccf 100644
--- a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h
+++ b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h
@@ -27,6 +27,7 @@ Abstract:
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseLib.h>
#include <Library/PcdLib.h>
@@ -37,6 +38,7 @@ Abstract:
#include <Protocol/WinNtThunk.h>
#include <Protocol/WinNtIo.h>
#include <Guid/Bmp.h>
+#include <Guid/UnixSystemConfig.h>
extern BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[];
extern EFI_DEVICE_PATH_PROTOCOL *gPlatformConnectSequence[];
diff --git a/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf b/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf
index 53efebded..1154110a9 100644
--- a/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf
+++ b/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf
@@ -46,6 +46,7 @@
BaseLib
MemoryAllocationLib
UefiBootServicesTableLib
+ UefiRuntimeServicesTableLib
BaseMemoryLib
DebugLib
PcdLib
@@ -53,3 +54,11 @@
[Guids]
gEfiDefaultBmpLogoGuid
+ gEfiWinNtSystemConfigGuid
+
+[Pcd.common]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
+
+[Depex]
+ gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid
diff --git a/Nt32Pkg/Nt32Pkg.dec b/Nt32Pkg/Nt32Pkg.dec
index 3db1c9fdc..8ead63969 100644
--- a/Nt32Pkg/Nt32Pkg.dec
+++ b/Nt32Pkg/Nt32Pkg.dec
@@ -61,7 +61,7 @@
gEfiWinNtPhysicalDisksGuid = { 0x0C95A92F, 0xA006, 0x11D4, { 0xBC, 0xFA, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}
gEfiWinNtVirtualDisksGuid = { 0x0C95A928, 0xA006, 0x11D4, { 0xBC, 0xFA, 0x00, 0x80, 0xC7, 0x3C, 0x88, 0x81 }}
gEfiNt32PkgTokenSpaceGuid = { 0x0D79A645, 0x1D91, 0x40a6, { 0xA8, 0x1F, 0x61, 0xE6, 0x98, 0x2B, 0x32, 0xB4 }}
-
+ gEfiWinNtSystemConfigGuid = { 0xb347f047, 0xaf8c, 0x490e, { 0xac, 0x07, 0x0a, 0xa9, 0xb7, 0xe5, 0x38, 0x58 }}
##
# Protocols provided by Nt32Pkg for all architecture.
diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc
index b892a4e59..ddd29b43c 100644
--- a/Nt32Pkg/Nt32Pkg.dsc
+++ b/Nt32Pkg/Nt32Pkg.dsc
@@ -225,7 +225,7 @@
WinNtLib|Nt32Pkg/Library/DxeWinNtLib/DxeWinNtLib.inf
OemHookStatusCodeLib|Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/DxeNt32OemHookStatusCodeLib.inf
DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
- PrintLib|MdeModulePkg/Library/EdkDxePrintLib/EdkDxePrintLib.inf
+ PrintLib|MdeModulePkg/Library/DxePrintLibPrint2Protocol/DxePrintLibPrint2Protocol.inf
################################################################################
@@ -367,6 +367,9 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0
gEfiMdeModulePkgTokenSpaceGuid.PcdPlatformBootTimeOutDefault|10
+[PcdsDynamicHii.common.DEFAULT]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|0x0053 0x0065 0x0074 0x0075 0x0070|gEfiWinNtSystemConfigGuid|0x0|80 # Variable: L"Setup"
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|0x0053 0x0065 0x0074 0x0075 0x0070|gEfiWinNtSystemConfigGuid|0x4|25 # Variable: L"Setup"
###################################################################################################
#
@@ -441,7 +444,10 @@
MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
- MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+ MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf {
+ <LibraryClasses>
+ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
+ }
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
@@ -480,6 +486,7 @@
IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
+ MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf {
<LibraryClasses>
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
@@ -505,42 +512,43 @@
#
# Libraries common to PEI and DXE
#
- # EdkCompatibilityPkg\Foundation\Efi\Guid\EfiGuidLib.inf
- # EdkCompatibilityPkg\Foundation\Framework\Guid\EdkFrameworkGuidLib.inf
- # EdkCompatibilityPkg\Foundation\Guid\EdkGuidLib.inf
- # EdkCompatibilityPkg\Foundation\Library\EfiCommonLib\EfiCommonLib.inf
- # EdkCompatibilityPkg\Foundation\Cpu\Pentium\CpuIA32Lib\CpuIA32Lib.inf
- # EdkCompatibilityPkg\Foundation\Cpu\Itanium\CpuIA64Lib\CpuIA64Lib.inf
- # EdkCompatibilityPkg\Foundation\Library\CustomizedDecompress\CustomizedDecompress.inf
- # EdkCompatibilityPkg\Foundation\Library\CompilerStub\CompilerStubLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\Hob\HobLib.inf
+ # EdkCompatibilityPkg/Foundation/Efi/Guid/EfiGuidLib.inf
+ # EdkCompatibilityPkg/Foundation/Framework/Guid/EdkFrameworkGuidLib.inf
+ # EdkCompatibilityPkg/Foundation/Guid/EdkGuidLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib.inf
+ # EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/CpuIA32Lib.inf
+ # EdkCompatibilityPkg/Foundation/Cpu/Itanium/CpuIa64Lib/CpuIA64Lib.inf
+ # EdkCompatibilityPkg/Foundation/Library/CustomizedDecompress/CustomizedDecompress.inf
+ # EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/Hob/HobLib.inf
#
# PEI libraries
#
- # EdkCompatibilityPkg\Foundation\Framework\Ppi\EdkFrameworkPpiLib.inf
- # EdkCompatibilityPkg\Foundation\Ppi\EdkPpiLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Pei\PeiLib\PeiLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Pei\Hob\PeiHobLib.inf
+ # EdkCompatibilityPkg/Foundation/Framework/Ppi/EdkFrameworkPpiLib.inf
+ # EdkCompatibilityPkg/Foundation/Ppi/EdkPpiLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Pei/Hob/PeiHobLib.inf
#
# DXE libraries
#
- # EdkCompatibilityPkg\Foundation\Core\Dxe\ArchProtocol\ArchProtocolLib.inf
- # EdkCompatibilityPkg\Foundation\Efi\Protocol\EfiProtocolLib.inf
- # EdkCompatibilityPkg\Foundation\Framework\Protocol\EdkFrameworkProtocolLib.inf
- # EdkCompatibilityPkg\Foundation\Protocol\EdkProtocolLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\EfiDriverLib\EfiDriverLib.inf
- # EdkCompatibilityPkg\Foundation\Library\RuntimeDxe\EfiRuntimeLib\EfiRuntimeLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\Graphics\Graphics.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\EfiIfrSupportLib\EfiIfrSupportLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\Print\PrintLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\EfiScriptLib\EfiScriptLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\EfiUiLib\EfiUiLib.inf
+ # EdkCompatibilityPkg/Foundation/Core/Dxe/ArchProtocol/ArchProtocolLib.inf
+ # EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
+ # EdkCompatibilityPkg/Foundation/Framework/Protocol/EdkFrameworkProtocolLib.inf
+ # EdkCompatibilityPkg/Foundation/Protocol/EdkProtocolLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/Graphics/Graphics.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/EfiIfrSupportLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/Print/PrintLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/EfiScriptLib/EfiScriptLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/EfiUiLib/EfiUiLib.inf
#
# Print/Graphics Library consume SetupBrowser Print Protocol
#
- # EdkCompatibilityPkg\Foundation\Library\Dxe\PrintLite\PrintLib.inf
- # EdkCompatibilityPkg\Foundation\Library\Dxe\GraphicsLite\Graphics.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/PrintLite/PrintLib.inf
+ # EdkCompatibilityPkg/Foundation/Library/Dxe/GraphicsLite/Graphics.inf
+
diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf
index db0244487..ef201f60d 100644
--- a/Nt32Pkg/Nt32Pkg.fdf
+++ b/Nt32Pkg/Nt32Pkg.fdf
@@ -202,6 +202,7 @@ INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
+INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
INF IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf ##This driver follows UEFI specification definition