From aa115881945d47a31f7a62291df61af2b325a342 Mon Sep 17 00:00:00 2001 From: gdong1 Date: Tue, 10 Nov 2009 10:03:05 +0000 Subject: Enable UID support in NT32 platform git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9402 6f19259b-4bc3-4df7-8a09-765794883524 --- Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c | 65 +++++++++++++++++++++++++++++++ Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h | 7 ++++ Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf | 3 ++ Nt32Pkg/Nt32Pkg.dsc | 2 + Nt32Pkg/Nt32Pkg.fdf | 2 + 5 files changed, 79 insertions(+) (limited to 'Nt32Pkg') diff --git a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c index edfcbcfd58..0e5b9f5953 100644 --- a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c +++ b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.c @@ -344,6 +344,11 @@ PlatformBdsPolicyBehavior ( // PlatformBdsConnectSequence (); + // + // Perform user identification process + // + PlatformBdsUserIdentify (); + // // Notes: current time out = 0 can not enter the // front page @@ -363,6 +368,10 @@ PlatformBdsPolicyBehavior ( PlatformBdsConnectConsole (gPlatformConsole); PlatformBdsDiagnostics (EXTENSIVE, FALSE, BaseMemoryTest); BdsLibConnectAll (); + // + // Perform user identification process + // + PlatformBdsUserIdentify (); ProcessCapsules (BOOT_ON_FLASH_UPDATE); break; @@ -374,6 +383,11 @@ PlatformBdsPolicyBehavior ( PlatformBdsConnectConsole (gPlatformConsole); PlatformBdsDiagnostics (EXTENSIVE, FALSE, BaseMemoryTest); + // + // Perform user identification process + // + PlatformBdsUserIdentify (); + // // In recovery boot mode, we still enter to the // frong page now @@ -403,6 +417,11 @@ PlatformBdsPolicyBehavior ( // PlatformBdsConnectSequence (); + // + // Perform user identification process + // + PlatformBdsUserIdentify (); + // // Give one chance to enter the setup if we // have the time out @@ -558,3 +577,49 @@ LockKeyboards ( { return EFI_UNSUPPORTED; } + + +EFI_STATUS +PlatformBdsUserIdentify ( + VOID + ) +/*++ + + Routine Description: + + This function is to identify a valid user, if successed, handle the deferred images. + + Arguments: + + None. + + Returns: + + EFI_SUCCESS - User successfully identified. + +--*/ +{ + EFI_STATUS Status; + EFI_USER_MANAGER_PROTOCOL *Manager; + EFI_USER_PROFILE_HANDLE User; + + // + // Locate user manager driver + // + Status = gBS->LocateProtocol ( + &gEfiUserManagerProtocolGuid, + NULL, + &Manager + ); + if (EFI_ERROR (Status)) { + return Status; + } + + // + // Identity user + // + Status = Manager->Identify (Manager, &User); + return Status; +} + + diff --git a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h index d9aafc8fcd..02136a29ea 100644 --- a/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h +++ b/Nt32Pkg/Library/Nt32BdsLib/BdsPlatform.h @@ -37,6 +37,8 @@ Abstract: #include #include +#include +#include #include extern BDS_CONSOLE_CONNECT_ENTRY gPlatformConsole[]; @@ -116,4 +118,9 @@ PlatformBdsEnterFrontPage ( IN BOOLEAN ConnectAllHappened ); +EFI_STATUS +PlatformBdsUserIdentify ( + VOID + ); + #endif // _BDS_PLATFORM_H diff --git a/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf b/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf index 3708d679cb..c74e4d3dd3 100644 --- a/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf +++ b/Nt32Pkg/Library/Nt32BdsLib/Nt32BdsLib.inf @@ -56,6 +56,9 @@ [Guids] gEfiWinNtSystemConfigGuid +[Protocols] + gEfiUserManagerProtocolGuid + [Pcd.common] gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc index 406ef8ffe5..ca82a285e5 100644 --- a/Nt32Pkg/Nt32Pkg.dsc +++ b/Nt32Pkg/Nt32Pkg.dsc @@ -464,6 +464,8 @@ MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf + SecurityPkg/UserIdentification/UserIdentificationDxe/UserIdentityManager.inf + SecurityPkg/UserIdentification/UserManagerDxe/UserProfileManager.inf [BuildOptions] DEBUG_*_IA32_DLINK_FLAGS = /EXPORT:InitializeDriver=$(IMAGE_ENTRY_POINT) /ALIGN:4096 /FILEALIGN:4096 /SUBSYSTEM:CONSOLE RELEASE_*_IA32_DLINK_FLAGS = /ALIGN:4096 /FILEALIGN:4096 diff --git a/Nt32Pkg/Nt32Pkg.fdf b/Nt32Pkg/Nt32Pkg.fdf index d2d8ccea76..2938b6bd5d 100644 --- a/Nt32Pkg/Nt32Pkg.fdf +++ b/Nt32Pkg/Nt32Pkg.fdf @@ -226,6 +226,8 @@ INF Nt32Pkg/WinNtGopDxe/WinNtGopDxe.inf INF Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystemDxe.inf INF MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf INF MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf +INF SecurityPkg/UserIdentification/UserIdentificationDxe/UserIdentityManager.inf +INF SecurityPkg/UserIdentification/UserManagerDxe/UserProfileManager.inf INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf -- cgit v1.2.3