diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 03:20:29 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 03:20:29 +0000 |
commit | fcf24bad4a7b0e7acb540caaa618f53547033d85 (patch) | |
tree | e29a168a163f17bc13ce42c064c29f1880048848 /Nt32Pkg | |
parent | bdb869f653607684d3c98449b467920dc19c83d2 (diff) | |
download | edk2-fcf24bad4a7b0e7acb540caaa618f53547033d85.tar.gz edk2-fcf24bad4a7b0e7acb540caaa618f53547033d85.tar.bz2 edk2-fcf24bad4a7b0e7acb540caaa618f53547033d85.zip |
Update Nt32 platform to use dynamic HII pcd to save console output mode.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7579 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg')
-rw-r--r-- | Nt32Pkg/Include/Guid/WinNtSystemConfig.h | 35 | ||||
-rw-r--r-- | Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c | 41 | ||||
-rw-r--r-- | Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h | 2 | ||||
-rw-r--r-- | Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf | 9 | ||||
-rw-r--r-- | Nt32Pkg/Nt32Pkg.dec | 2 | ||||
-rw-r--r-- | Nt32Pkg/Nt32Pkg.dsc | 64 | ||||
-rw-r--r-- | Nt32Pkg/Nt32Pkg.fdf | 1 |
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 0000000000..08225fb8b6 --- /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 6970ceb008..3c981fb21a 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 5188ba51c9..99a2a4ccf9 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 53efebdedd..1154110a97 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 3db1c9fdc4..8ead639695 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 b892a4e594..ddd29b43cb 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 db0244487a..ef201f60d9 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
|