diff options
Diffstat (limited to 'MdeModulePkg/Logo')
| -rw-r--r-- | MdeModulePkg/Logo/Logo.c | 314 | ||||
| -rw-r--r-- | MdeModulePkg/Logo/Logo.idf | 20 | ||||
| -rw-r--r-- | MdeModulePkg/Logo/Logo.inf | 64 | ||||
| -rw-r--r-- | MdeModulePkg/Logo/Logo.uni | 32 | ||||
| -rw-r--r-- | MdeModulePkg/Logo/LogoDxe.inf | 112 | ||||
| -rw-r--r-- | MdeModulePkg/Logo/LogoDxe.uni | 32 | ||||
| -rw-r--r-- | MdeModulePkg/Logo/LogoDxeExtra.uni | 28 | ||||
| -rw-r--r-- | MdeModulePkg/Logo/LogoExtra.uni | 28 |
8 files changed, 315 insertions, 315 deletions
diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c index 8ab874d2da..8e80e52222 100644 --- a/MdeModulePkg/Logo/Logo.c +++ b/MdeModulePkg/Logo/Logo.c @@ -1,157 +1,157 @@ -/** @file
- Logo DXE Driver, install Edkii Platform Logo protocol.
-
-Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-#include <Uefi.h>
-#include <Protocol/HiiDatabase.h>
-#include <Protocol/GraphicsOutput.h>
-#include <Protocol/HiiImageEx.h>
-#include <Protocol/PlatformLogo.h>
-#include <Protocol/HiiPackageList.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/DebugLib.h>
-
-typedef struct {
- EFI_IMAGE_ID ImageId;
- EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE Attribute;
- INTN OffsetX;
- INTN OffsetY;
-} LOGO_ENTRY;
-
-EFI_HII_IMAGE_EX_PROTOCOL *mHiiImageEx;
-EFI_HII_HANDLE mHiiHandle;
-LOGO_ENTRY mLogos[] = {
- {
- IMAGE_TOKEN (IMG_LOGO),
- EdkiiPlatformLogoDisplayAttributeCenter,
- 0,
- 0
- }
-};
-
-/**
- Load a platform logo image and return its data and attributes.
-
- @param This The pointer to this protocol instance.
- @param Instance The visible image instance is found.
- @param Image Points to the image.
- @param Attribute The display attributes of the image returned.
- @param OffsetX The X offset of the image regarding the Attribute.
- @param OffsetY The Y offset of the image regarding the Attribute.
-
- @retval EFI_SUCCESS The image was fetched successfully.
- @retval EFI_NOT_FOUND The specified image could not be found.
-**/
-EFI_STATUS
-EFIAPI
-GetImage (
- IN EDKII_PLATFORM_LOGO_PROTOCOL *This,
- IN OUT UINT32 *Instance,
- OUT EFI_IMAGE_INPUT *Image,
- OUT EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE *Attribute,
- OUT INTN *OffsetX,
- OUT INTN *OffsetY
- )
-{
- UINT32 Current;
-
- if ((Instance == NULL) || (Image == NULL) ||
- (Attribute == NULL) || (OffsetX == NULL) || (OffsetY == NULL))
- {
- return EFI_INVALID_PARAMETER;
- }
-
- Current = *Instance;
- if (Current >= ARRAY_SIZE (mLogos)) {
- return EFI_NOT_FOUND;
- }
-
- (*Instance)++;
- *Attribute = mLogos[Current].Attribute;
- *OffsetX = mLogos[Current].OffsetX;
- *OffsetY = mLogos[Current].OffsetY;
- return mHiiImageEx->GetImageEx (mHiiImageEx, mHiiHandle, mLogos[Current].ImageId, Image);
-}
-
-EDKII_PLATFORM_LOGO_PROTOCOL mPlatformLogo = {
- GetImage
-};
-
-/**
- Entrypoint of this module.
-
- This function is the entrypoint of this module. It installs the Edkii
- Platform Logo protocol.
-
- @param ImageHandle The firmware allocated handle for the EFI image.
- @param SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The entry point is executed successfully.
-
-**/
-EFI_STATUS
-EFIAPI
-InitializeLogo (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
- EFI_HII_PACKAGE_LIST_HEADER *PackageList;
- EFI_HII_DATABASE_PROTOCOL *HiiDatabase;
- EFI_HANDLE Handle;
-
- Status = gBS->LocateProtocol (
- &gEfiHiiDatabaseProtocolGuid,
- NULL,
- (VOID **)&HiiDatabase
- );
- ASSERT_EFI_ERROR (Status);
-
- Status = gBS->LocateProtocol (
- &gEfiHiiImageExProtocolGuid,
- NULL,
- (VOID **)&mHiiImageEx
- );
- ASSERT_EFI_ERROR (Status);
-
- //
- // Retrieve HII package list from ImageHandle
- //
- Status = gBS->OpenProtocol (
- ImageHandle,
- &gEfiHiiPackageListProtocolGuid,
- (VOID **)&PackageList,
- ImageHandle,
- NULL,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "HII Image Package with logo not found in PE/COFF resource section\n"));
- return Status;
- }
-
- //
- // Publish HII package list to HII Database.
- //
- Status = HiiDatabase->NewPackageList (
- HiiDatabase,
- PackageList,
- NULL,
- &mHiiHandle
- );
- if (!EFI_ERROR (Status)) {
- Handle = NULL;
- Status = gBS->InstallMultipleProtocolInterfaces (
- &Handle,
- &gEdkiiPlatformLogoProtocolGuid,
- &mPlatformLogo,
- NULL
- );
- }
-
- return Status;
-}
+/** @file + Logo DXE Driver, install Edkii Platform Logo protocol. + +Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#include <Uefi.h> +#include <Protocol/HiiDatabase.h> +#include <Protocol/GraphicsOutput.h> +#include <Protocol/HiiImageEx.h> +#include <Protocol/PlatformLogo.h> +#include <Protocol/HiiPackageList.h> +#include <Library/UefiBootServicesTableLib.h> +#include <Library/DebugLib.h> + +typedef struct { + EFI_IMAGE_ID ImageId; + EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE Attribute; + INTN OffsetX; + INTN OffsetY; +} LOGO_ENTRY; + +EFI_HII_IMAGE_EX_PROTOCOL *mHiiImageEx; +EFI_HII_HANDLE mHiiHandle; +LOGO_ENTRY mLogos[] = { + { + IMAGE_TOKEN (IMG_LOGO), + EdkiiPlatformLogoDisplayAttributeCenter, + 0, + 0 + } +}; + +/** + Load a platform logo image and return its data and attributes. + + @param This The pointer to this protocol instance. + @param Instance The visible image instance is found. + @param Image Points to the image. + @param Attribute The display attributes of the image returned. + @param OffsetX The X offset of the image regarding the Attribute. + @param OffsetY The Y offset of the image regarding the Attribute. + + @retval EFI_SUCCESS The image was fetched successfully. + @retval EFI_NOT_FOUND The specified image could not be found. +**/ +EFI_STATUS +EFIAPI +GetImage ( + IN EDKII_PLATFORM_LOGO_PROTOCOL *This, + IN OUT UINT32 *Instance, + OUT EFI_IMAGE_INPUT *Image, + OUT EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE *Attribute, + OUT INTN *OffsetX, + OUT INTN *OffsetY + ) +{ + UINT32 Current; + + if ((Instance == NULL) || (Image == NULL) || + (Attribute == NULL) || (OffsetX == NULL) || (OffsetY == NULL)) + { + return EFI_INVALID_PARAMETER; + } + + Current = *Instance; + if (Current >= ARRAY_SIZE (mLogos)) { + return EFI_NOT_FOUND; + } + + (*Instance)++; + *Attribute = mLogos[Current].Attribute; + *OffsetX = mLogos[Current].OffsetX; + *OffsetY = mLogos[Current].OffsetY; + return mHiiImageEx->GetImageEx (mHiiImageEx, mHiiHandle, mLogos[Current].ImageId, Image); +} + +EDKII_PLATFORM_LOGO_PROTOCOL mPlatformLogo = { + GetImage +}; + +/** + Entrypoint of this module. + + This function is the entrypoint of this module. It installs the Edkii + Platform Logo protocol. + + @param ImageHandle The firmware allocated handle for the EFI image. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The entry point is executed successfully. + +**/ +EFI_STATUS +EFIAPI +InitializeLogo ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + EFI_HII_PACKAGE_LIST_HEADER *PackageList; + EFI_HII_DATABASE_PROTOCOL *HiiDatabase; + EFI_HANDLE Handle; + + Status = gBS->LocateProtocol ( + &gEfiHiiDatabaseProtocolGuid, + NULL, + (VOID **)&HiiDatabase + ); + ASSERT_EFI_ERROR (Status); + + Status = gBS->LocateProtocol ( + &gEfiHiiImageExProtocolGuid, + NULL, + (VOID **)&mHiiImageEx + ); + ASSERT_EFI_ERROR (Status); + + // + // Retrieve HII package list from ImageHandle + // + Status = gBS->OpenProtocol ( + ImageHandle, + &gEfiHiiPackageListProtocolGuid, + (VOID **)&PackageList, + ImageHandle, + NULL, + EFI_OPEN_PROTOCOL_GET_PROTOCOL + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "HII Image Package with logo not found in PE/COFF resource section\n")); + return Status; + } + + // + // Publish HII package list to HII Database. + // + Status = HiiDatabase->NewPackageList ( + HiiDatabase, + PackageList, + NULL, + &mHiiHandle + ); + if (!EFI_ERROR (Status)) { + Handle = NULL; + Status = gBS->InstallMultipleProtocolInterfaces ( + &Handle, + &gEdkiiPlatformLogoProtocolGuid, + &mPlatformLogo, + NULL + ); + } + + return Status; +} diff --git a/MdeModulePkg/Logo/Logo.idf b/MdeModulePkg/Logo/Logo.idf index 1f79332020..671ad6bcc9 100644 --- a/MdeModulePkg/Logo/Logo.idf +++ b/MdeModulePkg/Logo/Logo.idf @@ -1,10 +1,10 @@ -// /** @file
-// Platform Logo image definition file.
-//
-// Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-#image IMG_LOGO Logo.bmp
+// /** @file +// Platform Logo image definition file. +// +// Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#image IMG_LOGO Logo.bmp diff --git a/MdeModulePkg/Logo/Logo.inf b/MdeModulePkg/Logo/Logo.inf index 294482ccdc..1e52acdb89 100644 --- a/MdeModulePkg/Logo/Logo.inf +++ b/MdeModulePkg/Logo/Logo.inf @@ -1,32 +1,32 @@ -## @file
-# The default logo bitmap picture shown on setup screen, which is corresponding to gEfiDefaultBmpLogoGuid.
-#
-# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
-# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
-# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
-
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = Logo
- MODULE_UNI_FILE = Logo.uni
- FILE_GUID = 7BB28B99-61BB-11D5-9A5D-0090273FC14D
- MODULE_TYPE = USER_DEFINED
- VERSION_STRING = 1.0
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64 RISCV64 LOONGARCH64
-#
-
-[Binaries]
- BIN|Logo.bmp|*
-
-[UserExtensions.TianoCore."ExtraFiles"]
- LogoExtra.uni
+## @file +# The default logo bitmap picture shown on setup screen, which is corresponding to gEfiDefaultBmpLogoGuid. +# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR> + +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = Logo + MODULE_UNI_FILE = Logo.uni + FILE_GUID = 7BB28B99-61BB-11D5-9A5D-0090273FC14D + MODULE_TYPE = USER_DEFINED + VERSION_STRING = 1.0 + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64 RISCV64 LOONGARCH64 +# + +[Binaries] + BIN|Logo.bmp|* + +[UserExtensions.TianoCore."ExtraFiles"] + LogoExtra.uni diff --git a/MdeModulePkg/Logo/Logo.uni b/MdeModulePkg/Logo/Logo.uni index 9d1bbaffa9..266c0d5d92 100644 --- a/MdeModulePkg/Logo/Logo.uni +++ b/MdeModulePkg/Logo/Logo.uni @@ -1,16 +1,16 @@ -// /** @file
-// The default logo bitmap picture shown on setup screen, which is corresponding to gEfiDefaultBmpLogoGuid.
-//
-// This module provides the default logo bitmap picture shown on setup screen, which corresponds to gEfiDefaultBmpLogoGuid.
-//
-// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "Provides the default logo bitmap picture shown on setup screen, which corresponds to gEfiDefaultBmpLogoGuid"
-
-#string STR_MODULE_DESCRIPTION #language en-US "This module provides the default logo bitmap picture shown on setup screen, which corresponds to gEfiDefaultBmpLogoGuid."
-
+// /** @file +// The default logo bitmap picture shown on setup screen, which is corresponding to gEfiDefaultBmpLogoGuid. +// +// This module provides the default logo bitmap picture shown on setup screen, which corresponds to gEfiDefaultBmpLogoGuid. +// +// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Provides the default logo bitmap picture shown on setup screen, which corresponds to gEfiDefaultBmpLogoGuid" + +#string STR_MODULE_DESCRIPTION #language en-US "This module provides the default logo bitmap picture shown on setup screen, which corresponds to gEfiDefaultBmpLogoGuid." + diff --git a/MdeModulePkg/Logo/LogoDxe.inf b/MdeModulePkg/Logo/LogoDxe.inf index 41215d25d8..61c1a94735 100644 --- a/MdeModulePkg/Logo/LogoDxe.inf +++ b/MdeModulePkg/Logo/LogoDxe.inf @@ -1,56 +1,56 @@ -## @file
-# The default logo bitmap picture shown on setup screen.
-#
-# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = LogoDxe
- MODULE_UNI_FILE = LogoDxe.uni
- FILE_GUID = F74D20EE-37E7-48FC-97F7-9B1047749C69
- MODULE_TYPE = DXE_DRIVER
- VERSION_STRING = 1.0
-
- ENTRY_POINT = InitializeLogo
-#
-# This flag specifies whether HII resource section is generated into PE image.
-#
- UEFI_HII_RESOURCE_SECTION = TRUE
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64
-#
-
-[Sources]
- Logo.bmp
- Logo.c
- Logo.idf
-
-[Packages]
- MdeModulePkg/MdeModulePkg.dec
- MdePkg/MdePkg.dec
-
-[LibraryClasses]
- UefiBootServicesTableLib
- UefiDriverEntryPoint
- DebugLib
-
-[Protocols]
- gEfiHiiDatabaseProtocolGuid ## CONSUMES
- gEfiHiiImageExProtocolGuid ## CONSUMES
- gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES
- gEdkiiPlatformLogoProtocolGuid ## PRODUCES
-
-[Depex]
- gEfiHiiDatabaseProtocolGuid AND
- gEfiHiiImageExProtocolGuid
-
-[UserExtensions.TianoCore."ExtraFiles"]
- LogoDxeExtra.uni
+## @file +# The default logo bitmap picture shown on setup screen. +# +# Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = LogoDxe + MODULE_UNI_FILE = LogoDxe.uni + FILE_GUID = F74D20EE-37E7-48FC-97F7-9B1047749C69 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + + ENTRY_POINT = InitializeLogo +# +# This flag specifies whether HII resource section is generated into PE image. +# + UEFI_HII_RESOURCE_SECTION = TRUE + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +[Sources] + Logo.bmp + Logo.c + Logo.idf + +[Packages] + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + +[LibraryClasses] + UefiBootServicesTableLib + UefiDriverEntryPoint + DebugLib + +[Protocols] + gEfiHiiDatabaseProtocolGuid ## CONSUMES + gEfiHiiImageExProtocolGuid ## CONSUMES + gEfiHiiPackageListProtocolGuid ## PRODUCES CONSUMES + gEdkiiPlatformLogoProtocolGuid ## PRODUCES + +[Depex] + gEfiHiiDatabaseProtocolGuid AND + gEfiHiiImageExProtocolGuid + +[UserExtensions.TianoCore."ExtraFiles"] + LogoDxeExtra.uni diff --git a/MdeModulePkg/Logo/LogoDxe.uni b/MdeModulePkg/Logo/LogoDxe.uni index 9635701b60..7bf3a0b33e 100644 --- a/MdeModulePkg/Logo/LogoDxe.uni +++ b/MdeModulePkg/Logo/LogoDxe.uni @@ -1,16 +1,16 @@ -// /** @file
-// The default logo bitmap picture shown on setup screen.
-//
-// This module provides the default logo bitmap picture shown on setup screen, through EDKII Platform Logo protocol.
-//
-// Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-
-#string STR_MODULE_ABSTRACT #language en-US "Provides the default logo bitmap picture shown on setup screen."
-
-#string STR_MODULE_DESCRIPTION #language en-US "This module provides the default logo bitmap picture shown on setup screen, through EDKII Platform Logo protocol."
-
+// /** @file +// The default logo bitmap picture shown on setup screen. +// +// This module provides the default logo bitmap picture shown on setup screen, through EDKII Platform Logo protocol. +// +// Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Provides the default logo bitmap picture shown on setup screen." + +#string STR_MODULE_DESCRIPTION #language en-US "This module provides the default logo bitmap picture shown on setup screen, through EDKII Platform Logo protocol." + diff --git a/MdeModulePkg/Logo/LogoDxeExtra.uni b/MdeModulePkg/Logo/LogoDxeExtra.uni index c6ea34b81d..6711dd339a 100644 --- a/MdeModulePkg/Logo/LogoDxeExtra.uni +++ b/MdeModulePkg/Logo/LogoDxeExtra.uni @@ -1,14 +1,14 @@ -// /** @file
-// Logo Localized Strings and Content
-//
-// Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
-"Logo Image File"
-
-
+// /** @file +// Logo Localized Strings and Content +// +// Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#string STR_PROPERTIES_MODULE_NAME +#language en-US +"Logo Image File" + + diff --git a/MdeModulePkg/Logo/LogoExtra.uni b/MdeModulePkg/Logo/LogoExtra.uni index 041179fb75..385ae5039e 100644 --- a/MdeModulePkg/Logo/LogoExtra.uni +++ b/MdeModulePkg/Logo/LogoExtra.uni @@ -1,14 +1,14 @@ -// /** @file
-// Logo Localized Strings and Content
-//
-// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
-//
-// SPDX-License-Identifier: BSD-2-Clause-Patent
-//
-// **/
-
-#string STR_PROPERTIES_MODULE_NAME
-#language en-US
-"Logo Image File"
-
-
+// /** @file +// Logo Localized Strings and Content +// +// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR> +// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#string STR_PROPERTIES_MODULE_NAME +#language en-US +"Logo Image File" + + |
