TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/PrintLib.h>
#include <Library/BmpSupportLib.h>
#include <Library/FileHandleLib.h>
#include <Library/SortLib.h>
#include <Library/UefiBootManagerLib.h>
#include <Library/DevicePathLib.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/ShellParameters.h>
#include <Protocol/Shell.h>
#include <Protocol/FirmwareManagement.h>
#include <Guid/GlobalVariable.h>
#include <Guid/CapsuleReport.h>
#include <Guid/SystemResourceTable.h>
#include <Guid/FmpCapsule.h>
#include <Guid/FileInfo.h>
#include <Guid/ImageAuthentication.h>
#include <Guid/CapsuleVendor.h>
#include <Guid/Gpt.h>
#include <IndustryStandard/WindowsUxCapsule.h>
Go to the source code of this file.
Macros | |
#define | CAPSULE_HEADER_SIZE 0x20 |
#define | NESTED_CAPSULE_HEADER_SIZE SIZE_4KB |
#define | SYSTEM_FIRMWARE_FLAG 0x50000 |
#define | DEVICE_FIRMWARE_FLAG 0x78010 |
#define | MAJOR_VERSION 1 |
#define | MINOR_VERSION 0 |
#define | MAX_CAPSULE_NUM 10 |
#define | MAX_FILE_NAME_SIZE 522 |
#define | MAX_FILE_NAME_LEN (MAX_FILE_NAME_SIZE / sizeof(CHAR16)) |
Functions | |
EFI_STATUS | GetArg (VOID) |
EFI_SHELL_PROTOCOL * | GetShellProtocol (VOID) |
EFI_STATUS | ReadFileToBuffer (IN CHAR16 *FileName, OUT UINTN *BufferSize, OUT VOID **Buffer) |
EFI_STATUS | WriteFileFromBuffer (IN CHAR16 *FileName, IN UINTN BufferSize, IN VOID *Buffer) |
EFI_STATUS | DumpCapsule (IN CHAR16 *CapsuleName) |
EFI_STATUS | DumpCapsuleStatusVariable (VOID) |
VOID | DumpFmpData (VOID) |
VOID | DumpFmpImage (IN EFI_GUID *ImageTypeId, IN UINTN ImageIndex, IN CHAR16 *ImageName) |
VOID | DumpEsrtData (VOID) |
VOID | DumpProvisionedCapsule (IN BOOLEAN DumpCapsuleInfo) |
VOID | DumpAllEfiSysPartition (VOID) |
EFI_STATUS | GetEfiSysPartitionFromBootOptionFilePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT EFI_DEVICE_PATH_PROTOCOL **FullPath, OUT EFI_SIMPLE_FILE_SYSTEM_PROTOCOL **Fs) |
EFI_STATUS | ProcessCapsuleOnDisk (IN VOID **CapsuleBuffer, IN UINTN *CapsuleBufferSize, IN CHAR16 **FilePath, IN CHAR16 *Map, IN UINTN CapsuleNum) |
Variables | |
UINTN | Argc |
CHAR16 ** | Argv |
A shell application that triggers capsule update process.
Copyright (c) 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CapsuleApp.h.
#define CAPSULE_HEADER_SIZE 0x20 |
Definition at line 41 of file CapsuleApp.h.
#define DEVICE_FIRMWARE_FLAG 0x78010 |
Definition at line 45 of file CapsuleApp.h.
#define MAJOR_VERSION 1 |
Definition at line 47 of file CapsuleApp.h.
#define MAX_CAPSULE_NUM 10 |
Definition at line 50 of file CapsuleApp.h.
#define MAX_FILE_NAME_LEN (MAX_FILE_NAME_SIZE / sizeof(CHAR16)) |
Definition at line 56 of file CapsuleApp.h.
#define MAX_FILE_NAME_SIZE 522 |
Definition at line 55 of file CapsuleApp.h.
#define MINOR_VERSION 0 |
Definition at line 48 of file CapsuleApp.h.
#define NESTED_CAPSULE_HEADER_SIZE SIZE_4KB |
Definition at line 43 of file CapsuleApp.h.
#define SYSTEM_FIRMWARE_FLAG 0x50000 |
Definition at line 44 of file CapsuleApp.h.
VOID DumpAllEfiSysPartition | ( | VOID | ) |
Dump all EFI System Partition.
Definition at line 115 of file CapsuleOnDisk.c.
EFI_STATUS DumpCapsule | ( | IN CHAR16 * | CapsuleName | ) |
Dump capsule information
[in] | CapsuleName | The name of the capsule image. |
EFI_SUCCESS | The capsule information is dumped. |
EFI_UNSUPPORTED | Input parameter is not valid. |
Definition at line 175 of file CapsuleDump.c.
EFI_STATUS DumpCapsuleStatusVariable | ( | VOID | ) |
Dump capsule status variable.
EFI_SUCCESS | The capsule status variable is dumped. |
EFI_UNSUPPORTED | Input parameter is not valid. |
Definition at line 233 of file CapsuleDump.c.
VOID DumpEsrtData | ( | VOID | ) |
Dump ESRT info.
Definition at line 444 of file CapsuleDump.c.
VOID DumpFmpData | ( | VOID | ) |
Dump FMP protocol info.
Definition at line 1125 of file CapsuleDump.c.
Dump FMP image data.
[in] | ImageTypeId | The ImageTypeId of the FMP image. It is used to identify the FMP protocol. |
[in] | ImageIndex | The ImageIndex of the FMP image. It is the input parameter for FMP->GetImage(). |
[in] | ImageName | The file name to hold the output FMP image. |
Definition at line 1420 of file CapsuleDump.c.
VOID DumpProvisionedCapsule | ( | IN BOOLEAN | DumpCapsuleInfo | ) |
Dump Provisioned Capsule.
[in] | DumpCapsuleInfo | The flag to indicate whether to dump the capsule inforomation. |
Definition at line 911 of file CapsuleDump.c.
EFI_STATUS GetArg | ( | VOID | ) |
This function parse application ARG.
Definition at line 30 of file RedfishPlatformConfig.c.
EFI_STATUS GetEfiSysPartitionFromBootOptionFilePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, |
OUT EFI_DEVICE_PATH_PROTOCOL ** | FullPath, | ||
OUT EFI_SIMPLE_FILE_SYSTEM_PROTOCOL ** | Fs | ||
) |
Get SimpleFileSystem from boot option file path.
[in] | DevicePath | The file path of boot option |
[out] | FullPath | The full device path of boot device |
[out] | Fs | The file system within EfiSysPartition |
EFI_SUCCESS | Get file system successfully |
EFI_NOT_FOUND | No valid file system found |
others | Get file system failed |
Definition at line 314 of file CapsuleOnDisk.c.
EFI_SHELL_PROTOCOL * GetShellProtocol | ( | VOID | ) |
EFI_STATUS ProcessCapsuleOnDisk | ( | IN VOID ** | CapsuleBuffer, |
IN UINTN * | CapsuleBufferSize, | ||
IN CHAR16 ** | FilePath, | ||
IN CHAR16 * | Map, | ||
IN UINTN | CapsuleNum | ||
) |
Process Capsule On Disk.
[in] | CapsuleBuffer | An array of pointer to capsule images |
[in] | CapsuleBufferSize | An array of UINTN to capsule images size |
[in] | FilePath | An array of capsule images file path |
[in] | Map | File system mapping string |
[in] | CapsuleNum | The count of capsule images |
EFI_SUCCESS | Capsule on disk success. |
others | Capsule on disk fail. |
Definition at line 783 of file CapsuleOnDisk.c.
EFI_STATUS ReadFileToBuffer | ( | IN CHAR16 * | FileName, |
OUT UINTN * | BufferSize, | ||
OUT VOID ** | Buffer | ||
) |
Read a file.
[in] | FileName | The file to be read. |
[out] | BufferSize | The file buffer size |
[out] | Buffer | The file buffer |
EFI_SUCCESS | Read file successfully |
EFI_NOT_FOUND | Shell protocol or file not found |
others | Read file failed |
Definition at line 81 of file AppSupport.c.
EFI_STATUS WriteFileFromBuffer | ( | IN CHAR16 * | FileName, |
IN UINTN | BufferSize, | ||
IN VOID * | Buffer | ||
) |
Write a file.
[in] | FileName | The file to be written. |
[in] | BufferSize | The file buffer size |
[in] | Buffer | The file buffer |
EFI_SUCCESS | Write file successfully |
EFI_NOT_FOUND | Shell protocol not found |
others | Write file failed |
Definition at line 159 of file AppSupport.c.
|
extern |
Definition at line 20 of file RedfishPlatformConfig.c.
|
extern |
Definition at line 21 of file RedfishPlatformConfig.c.