TianoCore EDK2 master
Loading...
Searching...
No Matches
ConsistMapping.c File Reference

Go to the source code of this file.

Data Structures

struct  POOL_PRINT
 
struct  DEVICE_CONSIST_MAPPING_INFO
 
struct  MTD_NAME
 
struct  DEV_PATH_CONSIST_MAPPING_TABLE
 

Typedefs

typedef EFI_STATUS(* SERIAL_DECODE_FUNCTION) (EFI_DEVICE_PATH_PROTOCOL *DevPath, DEVICE_CONSIST_MAPPING_INFO *MapInfo, EFI_DEVICE_PATH_PROTOCOL *OrigDevPath)
 

Enumerations

enum  MTD_TYPE {
  MTDTypeUnknown , MTDTypeFloppy , MTDTypeHardDisk , MTDTypeCDRom ,
  MTDTypeEnd
}
 

Functions

EFI_STATUS EFIAPI CatPrint (IN OUT POOL_PRINT *Str, IN CHAR16 *Fmt,...)
 
EFI_STATUS AppendCSDNum2 (IN OUT POOL_PRINT *Str, IN UINT64 Num)
 
EFI_STATUS AppendCSDNum (IN OUT DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN UINT64 Num)
 
EFI_STATUS AppendCSDStr (IN OUT DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN CHAR16 *Str)
 
EFI_STATUS AppendCSDGuid (DEVICE_CONSIST_MAPPING_INFO *MappingItem, EFI_GUID *Guid)
 
INTN EFIAPI DevPathCompareAcpi (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2)
 
INTN EFIAPI DevPathComparePci (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2)
 
INTN EFIAPI DevPathCompareDefault (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2)
 
EFI_STATUS DevPathSerialHardDrive (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialAtapi (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialCdRom (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialFibre (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialUart (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialUsb (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialVendor (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialLun (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialSata (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialIScsi (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialI2O (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialMacAddr (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialInfiniBand (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialIPv4 (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialIPv6 (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialScsi (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerial1394 (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialAcpi (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS DevPathSerialDefault (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode, IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
BOOLEAN IsHIDevicePathNode (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathNode)
 
EFI_DEVICE_PATH_PROTOCOLGetHIDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS GetDeviceConsistMappingInfo (IN DEVICE_CONSIST_MAPPING_INFO *MappingItem, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 
EFI_STATUS EFIAPI ShellCommandConsistMappingInitialize (OUT EFI_DEVICE_PATH_PROTOCOL ***Table)
 
EFI_STATUS EFIAPI ShellCommandConsistMappingUnInitialize (EFI_DEVICE_PATH_PROTOCOL **Table)
 
CHAR16 *EFIAPI ShellCommandConsistMappingGenMappingName (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_DEVICE_PATH_PROTOCOL **Table)
 
SHELL_MAP_LIST *EFIAPI ShellCommandFindMapItem (IN CONST CHAR16 *MapKey)
 

Variables

MTD_NAME mMTDName []
 
DEV_PATH_CONSIST_MAPPING_TABLE DevPathConsistMappingTable []
 

Detailed Description

Main file for support of shell consist mapping.

Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file ConsistMapping.c.

Typedef Documentation

◆ SERIAL_DECODE_FUNCTION

typedef EFI_STATUS(* SERIAL_DECODE_FUNCTION) (EFI_DEVICE_PATH_PROTOCOL *DevPath, DEVICE_CONSIST_MAPPING_INFO *MapInfo, EFI_DEVICE_PATH_PROTOCOL *OrigDevPath)

Serial Decode function.

Parameters
DevPathThe Device path info.
MapInfoThe map info.
OrigDevPathThe original device path protocol.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 52 of file ConsistMapping.c.

Enumeration Type Documentation

◆ MTD_TYPE

enum MTD_TYPE

Definition at line 16 of file ConsistMapping.c.

Function Documentation

◆ AppendCSDGuid()

EFI_STATUS AppendCSDGuid ( DEVICE_CONSIST_MAPPING_INFO MappingItem,
EFI_GUID Guid 
)

Function to append a Guid to the mapping item.

Parameters
[in,out]MappingItemThe item to append onto.
[in]GuidThe guid to append.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 319 of file ConsistMapping.c.

◆ AppendCSDNum()

EFI_STATUS AppendCSDNum ( IN OUT DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN UINT64  Num 
)

Function to append a 64 bit number onto the mapping info.

Parameters
[in,out]MappingItemThe mapping info object to append onto.
[in]NumThe info to append.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 192 of file ConsistMapping.c.

◆ AppendCSDNum2()

EFI_STATUS AppendCSDNum2 ( IN OUT POOL_PRINT Str,
IN UINT64  Num 
)

Function to append a 64 bit number / 25 onto the string.

Parameters
[in,out]StrThe string so append onto.
[in]NumThe number to divide and append.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 159 of file ConsistMapping.c.

◆ AppendCSDStr()

EFI_STATUS AppendCSDStr ( IN OUT DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN CHAR16 *  Str 
)

Function to append string into the mapping info.

Parameters
[in,out]MappingItemThe mapping info object to append onto.
[in]StrThe info to append.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 224 of file ConsistMapping.c.

◆ CatPrint()

EFI_STATUS EFIAPI CatPrint ( IN OUT POOL_PRINT Str,
IN CHAR16 *  Fmt,
  ... 
)

Concatenates a formatted unicode string to allocated pool. The caller must free the resulting buffer.

Parameters
StrTracks the allocated pool, size in use, and amount of pool allocated.
FmtThe format string
...The data will be printed.
Return values
EFI_SUCCESSThe string is concatenated successfully.
EFI_OUT_OF_RESOURCESOut of resources.

Definition at line 80 of file ConsistMapping.c.

◆ DevPathCompareAcpi()

INTN EFIAPI DevPathCompareAcpi ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath1,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath2 
)

Function to compare 2 APCI device paths.

Parameters
[in]DevicePath1The first device path to compare.
[in]DevicePath2The second device path to compare.
Return values
0The device paths represent the same device.
Returns
Non zero if the devices are different, zero otherwise.

Definition at line 349 of file ConsistMapping.c.

◆ DevPathCompareDefault()

INTN EFIAPI DevPathCompareDefault ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath1,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath2 
)

Do a comparison on 2 device paths.

Parameters
[in]DevicePath1The first device path.
[in]DevicePath2The second device path.
Return values
0The 2 device paths are the same.
<0DevicePath2 is greater than DevicePath1.
>0DevicePath1 is greater than DevicePath2.

Definition at line 421 of file ConsistMapping.c.

◆ DevPathComparePci()

INTN EFIAPI DevPathComparePci ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath1,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath2 
)

Function to compare 2 PCI device paths.

Parameters
[in]DevicePath1The first device path to compare.
[in]DevicePath2The second device path to compare.
Return values
0The device paths represent the same device.
Returns
Non zero if the devices are different, zero otherwise.

Definition at line 385 of file ConsistMapping.c.

◆ DevPathSerial1394()

EFI_STATUS DevPathSerial1394 ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be 1394 type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 1148 of file ConsistMapping.c.

◆ DevPathSerialAcpi()

EFI_STATUS DevPathSerialAcpi ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

If the node is floppy type then populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 1176 of file ConsistMapping.c.

◆ DevPathSerialAtapi()

EFI_STATUS DevPathSerialAtapi ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialAtapi Channel type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 484 of file ConsistMapping.c.

◆ DevPathSerialCdRom()

EFI_STATUS DevPathSerialCdRom ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialCDROM Channel type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 510 of file ConsistMapping.c.

◆ DevPathSerialDefault()

EFI_STATUS DevPathSerialDefault ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

Empty function used for unknown devices.

Parameters
[in]DevicePathNodeIgnored.
[in]MappingItemIgnored.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 1209 of file ConsistMapping.c.

◆ DevPathSerialFibre()

EFI_STATUS DevPathSerialFibre ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialFibre Channel type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 537 of file ConsistMapping.c.

◆ DevPathSerialHardDrive()

EFI_STATUS DevPathSerialHardDrive ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialHDD Channel type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 454 of file ConsistMapping.c.

◆ DevPathSerialI2O()

EFI_STATUS DevPathSerialI2O ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialI20 type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 893 of file ConsistMapping.c.

◆ DevPathSerialInfiniBand()

EFI_STATUS DevPathSerialInfiniBand ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be InfiniBand type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 959 of file ConsistMapping.c.

◆ DevPathSerialIPv4()

EFI_STATUS DevPathSerialIPv4 ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be IPv4 type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 1006 of file ConsistMapping.c.

◆ DevPathSerialIPv6()

EFI_STATUS DevPathSerialIPv6 ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be IPv6 type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 1065 of file ConsistMapping.c.

◆ DevPathSerialIScsi()

EFI_STATUS DevPathSerialIScsi ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialSCSI type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 825 of file ConsistMapping.c.

◆ DevPathSerialLun()

EFI_STATUS DevPathSerialLun ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialLun type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 763 of file ConsistMapping.c.

◆ DevPathSerialMacAddr()

EFI_STATUS DevPathSerialMacAddr ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be Mac Address type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 919 of file ConsistMapping.c.

◆ DevPathSerialSata()

EFI_STATUS DevPathSerialSata ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialSata type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 789 of file ConsistMapping.c.

◆ DevPathSerialScsi()

EFI_STATUS DevPathSerialScsi ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SCSI type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 1116 of file ConsistMapping.c.

◆ DevPathSerialUart()

EFI_STATUS DevPathSerialUart ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialUart type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 569 of file ConsistMapping.c.

◆ DevPathSerialUsb()

EFI_STATUS DevPathSerialUsb ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialUSB type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 609 of file ConsistMapping.c.

◆ DevPathSerialVendor()

EFI_STATUS DevPathSerialVendor ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode,
IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

DevicePathNode must be SerialVendor type and this will populate the MappingItem.

Parameters
[in]DevicePathNodeThe node to get info on.
[in]MappingItemThe info item to populate.
[in]DevicePathIgnored.
Return values
EFI_OUT_OF_RESOURCESOut of resources.
EFI_SUCCESSThe appending was successful.

Definition at line 677 of file ConsistMapping.c.

◆ GetDeviceConsistMappingInfo()

EFI_STATUS GetDeviceConsistMappingInfo ( IN DEVICE_CONSIST_MAPPING_INFO MappingItem,
IN EFI_DEVICE_PATH_PROTOCOL DevicePath 
)

Function to walk the device path looking for a dumpable node.

Parameters
[in]MappingItemThe Item to fill with data.
[in]DevicePathThe path of the item to get data on.
Returns
EFI_SUCCESS Always returns success.

Definition at line 1451 of file ConsistMapping.c.

◆ GetHIDevicePath()

EFI_DEVICE_PATH_PROTOCOL * GetHIDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath)

Function to convert a standard device path structure into a Hi version.

Parameters
[in]DevicePathThe device path to convert.
Returns
the device path portion that is Hi.

Definition at line 1392 of file ConsistMapping.c.

◆ IsHIDevicePathNode()

BOOLEAN IsHIDevicePathNode ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathNode)

Function to determine if a device path node is Hi or not.

Parameters
[in]DevicePathNodeThe node to check.
Return values
TRUEThe node is Hi.
FALSEThe node is not Hi.

Definition at line 1356 of file ConsistMapping.c.

◆ ShellCommandConsistMappingGenMappingName()

CHAR16 *EFIAPI ShellCommandConsistMappingGenMappingName ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath,
IN EFI_DEVICE_PATH_PROTOCOL **  Table 
)

Create a consistent mapped name for the device specified by DevicePath based on the Table.

This must be called after ShellCommandConsistMappingInitialize() and before ShellCommandConsistMappingUnInitialize() is called.

Parameters
[in]DevicePathThe pointer to the dev path for the device.
[in]TableThe Table of mapping information.
Return values
NULLA consistent mapped name could not be created.
Returns
A pointer to a string allocated from pool with the device name.

Definition at line 1632 of file ConsistMapping.c.

◆ ShellCommandConsistMappingInitialize()

EFI_STATUS EFIAPI ShellCommandConsistMappingInitialize ( OUT EFI_DEVICE_PATH_PROTOCOL ***  Table)

Function to initialize the table for creating consistent map names.

Parameters
[out]TableThe pointer to pointer to pointer to DevicePathProtocol object.
Return values
EFI_SUCCESSThe table was created successfully.

Definition at line 1506 of file ConsistMapping.c.

◆ ShellCommandConsistMappingUnInitialize()

EFI_STATUS EFIAPI ShellCommandConsistMappingUnInitialize ( EFI_DEVICE_PATH_PROTOCOL **  Table)

Function to uninitialize the table for creating consistent map names.

The parameter must have been received from ShellCommandConsistMappingInitialize.

Parameters
[out]TableThe pointer to pointer to DevicePathProtocol object.
Return values
EFI_SUCCESSThe table was deleted successfully.

Definition at line 1601 of file ConsistMapping.c.

◆ ShellCommandFindMapItem()

SHELL_MAP_LIST *EFIAPI ShellCommandFindMapItem ( IN CONST CHAR16 *  MapKey)

Function to search the list of mappings for the node on the list based on the key.

Parameters
[in]MapKeyString Key to search for on the map
Returns
the node on the list.

Definition at line 1712 of file ConsistMapping.c.

Variable Documentation

◆ DevPathConsistMappingTable

DEV_PATH_CONSIST_MAPPING_TABLE DevPathConsistMappingTable[]

Definition at line 1218 of file ConsistMapping.c.

◆ mMTDName

MTD_NAME mMTDName[]
Initial value:
= {
{
MTDTypeUnknown,
L"F"
},
{
MTDTypeFloppy,
L"FP"
},
{
MTDTypeHardDisk,
L"HD"
},
{
MTDTypeCDRom,
L"CD"
},
{
MTDTypeEnd,
}
}
#define NULL
Definition: Base.h:319

Definition at line 126 of file ConsistMapping.c.