Re: [edk2] [Patch] Nt32Pkg: Remove old useless bds platform lib.
Reviewed-by: Ruiyu Ni ruiyu...@intel.com -Original Message- From: Dong, Eric Sent: Monday, August 3, 2015 10:57 AM To: Ni, Ruiyu ruiyu...@intel.com; edk2-devel@lists.01.org Subject: [Patch] Nt32Pkg: Remove old useless bds platform lib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong eric.d...@intel.com --- Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c | 561 -- Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h | 119 --- Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf | 63 Nt32Pkg/Library/Nt32BdsLib/PlatformData.c | 227 Nt32Pkg/Nt32Pkg.dsc | 1 - 5 files changed, 971 deletions(-) delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/PlatformData.c diff --git a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c deleted file mode 100644 index 0055223..000 --- a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c +++ /dev/null @@ -1,561 +0,0 @@ -/**@file - -Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.BR -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. - -Module Name: - - BdsPlatform.c - -Abstract: - - This file include all platform action which can be customized - by IBV/OEM. - -**/ - -#include BdsPlatform.h - -WIN_NT_SYSTEM_CONFIGURATION mSystemConfigData; - -VOID -SetupVariableInit ( - VOID - ) -{ - EFI_STATUS Status; - UINTN Size; - - Size = sizeof (mSystemConfigData); - Status = gRT-GetVariable ( - LSetup, - gEfiWinNtSystemConfigGuid, - NULL, - Size, - (VOID *) mSystemConfigData - ); - - if (EFI_ERROR (Status)) { -// -// SetupVariable is corrupt -// -mSystemConfigData.ConOutRow = PcdGet32 (PcdConOutColumn); -mSystemConfigData.ConOutColumn = PcdGet32 (PcdConOutRow); - -Status = gRT-SetVariable ( -LSetup, -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 -// -VOID -EFIAPI -PlatformBdsInit ( - VOID - ) -/*++ - -Routine Description: - - Platform Bds init. Include the platform firmware vendor, revision - and so crc check. - -Arguments: - -Returns: - - None. - ---*/ -{ - BdsLibSaveMemoryTypeInformation (); - SetupVariableInit (); -} - -EFI_STATUS -PlatformBdsConnectConsole ( - IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole - ) -/*++ - -Routine Description: - - Connect the predefined platform default console device. Always try to find - and enable the vga device if have. - -Arguments: - - PlatformConsole - Predfined platform default console device array. - -Returns: - - EFI_SUCCESS - Success connect at least one ConIn and ConOut -device, there must have one ConOut device is -active vga device. - - EFI_STATUS - Return the status of -BdsLibConnectAllDefaultConsoles () - ---*/ -{ - EFI_STATUS Status; - UINTN Index; - - Index = 0; - Status = EFI_SUCCESS; - - // - // Have chance to connect the platform default console, - // the platform default console is the minimue device group - // the platform should support - // - while (PlatformConsole[Index].DevicePath != NULL) { -// -// Update the console variable with the connect type -// -if ((PlatformConsole[Index].ConnectType CONSOLE_IN) == CONSOLE_IN) { - BdsLibUpdateConsoleVariable (LConIn, PlatformConsole[Index].DevicePath, NULL); -} - -if ((PlatformConsole[Index].ConnectType CONSOLE_OUT) == CONSOLE_OUT) { - BdsLibUpdateConsoleVariable (LConOut, PlatformConsole[Index].DevicePath, NULL); -} - -if ((PlatformConsole[Index].ConnectType STD_ERROR) == STD_ERROR) { - BdsLibUpdateConsoleVariable (LErrOut,
[edk2] [Patch] Nt32Pkg: Remove old useless bds platform lib.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong eric.d...@intel.com --- Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c | 561 -- Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h | 119 --- Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf | 63 Nt32Pkg/Library/Nt32BdsLib/PlatformData.c | 227 Nt32Pkg/Nt32Pkg.dsc | 1 - 5 files changed, 971 deletions(-) delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf delete mode 100644 Nt32Pkg/Library/Nt32BdsLib/PlatformData.c diff --git a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c deleted file mode 100644 index 0055223..000 --- a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c +++ /dev/null @@ -1,561 +0,0 @@ -/**@file - -Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.BR -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. - -Module Name: - - BdsPlatform.c - -Abstract: - - This file include all platform action which can be customized - by IBV/OEM. - -**/ - -#include BdsPlatform.h - -WIN_NT_SYSTEM_CONFIGURATION mSystemConfigData; - -VOID -SetupVariableInit ( - VOID - ) -{ - EFI_STATUS Status; - UINTN Size; - - Size = sizeof (mSystemConfigData); - Status = gRT-GetVariable ( - LSetup, - gEfiWinNtSystemConfigGuid, - NULL, - Size, - (VOID *) mSystemConfigData - ); - - if (EFI_ERROR (Status)) { -// -// SetupVariable is corrupt -// -mSystemConfigData.ConOutRow = PcdGet32 (PcdConOutColumn); -mSystemConfigData.ConOutColumn = PcdGet32 (PcdConOutRow); - -Status = gRT-SetVariable ( -LSetup, -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 -// -VOID -EFIAPI -PlatformBdsInit ( - VOID - ) -/*++ - -Routine Description: - - Platform Bds init. Include the platform firmware vendor, revision - and so crc check. - -Arguments: - -Returns: - - None. - ---*/ -{ - BdsLibSaveMemoryTypeInformation (); - SetupVariableInit (); -} - -EFI_STATUS -PlatformBdsConnectConsole ( - IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole - ) -/*++ - -Routine Description: - - Connect the predefined platform default console device. Always try to find - and enable the vga device if have. - -Arguments: - - PlatformConsole - Predfined platform default console device array. - -Returns: - - EFI_SUCCESS - Success connect at least one ConIn and ConOut -device, there must have one ConOut device is -active vga device. - - EFI_STATUS - Return the status of -BdsLibConnectAllDefaultConsoles () - ---*/ -{ - EFI_STATUS Status; - UINTN Index; - - Index = 0; - Status = EFI_SUCCESS; - - // - // Have chance to connect the platform default console, - // the platform default console is the minimue device group - // the platform should support - // - while (PlatformConsole[Index].DevicePath != NULL) { -// -// Update the console variable with the connect type -// -if ((PlatformConsole[Index].ConnectType CONSOLE_IN) == CONSOLE_IN) { - BdsLibUpdateConsoleVariable (LConIn, PlatformConsole[Index].DevicePath, NULL); -} - -if ((PlatformConsole[Index].ConnectType CONSOLE_OUT) == CONSOLE_OUT) { - BdsLibUpdateConsoleVariable (LConOut, PlatformConsole[Index].DevicePath, NULL); -} - -if ((PlatformConsole[Index].ConnectType STD_ERROR) == STD_ERROR) { - BdsLibUpdateConsoleVariable (LErrOut, PlatformConsole[Index].DevicePath, NULL); -} - -Index++; - } - // - // Connect the all the default console with current cosole variable - // - Status = BdsLibConnectAllDefaultConsoles (); - -