TianoCore EDK2 master
Loading...
Searching...
No Matches
DevicePath.c File Reference
#include "AhciPei.h"

Go to the source code of this file.

Functions

EFI_STATUS GetDevicePathInstanceSize (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINTN *InstanceSize, OUT BOOLEAN *EntireDevicePathEnd)
 
EFI_STATUS AhciIsHcDevicePathValid (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINTN DevicePathLength)
 
EFI_STATUS AhciBuildDevicePath (IN PEI_AHCI_CONTROLLER_PRIVATE_DATA *Private, IN UINT16 Port, IN UINT16 PortMultiplierPort, OUT UINTN *DevicePathLength, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
 

Variables

SATA_DEVICE_PATH mAhciSataDevicePathNodeTemplate
 
EFI_DEVICE_PATH_PROTOCOL mAhciEndDevicePathNodeTemplate
 

Detailed Description

The device path help function.

Copyright (c) 2019, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DevicePath.c.

Function Documentation

◆ AhciBuildDevicePath()

EFI_STATUS AhciBuildDevicePath ( IN PEI_AHCI_CONTROLLER_PRIVATE_DATA Private,
IN UINT16  Port,
IN UINT16  PortMultiplierPort,
OUT UINTN DevicePathLength,
OUT EFI_DEVICE_PATH_PROTOCOL **  DevicePath 
)

Build the device path for an ATA device with given port and port multiplier number.

Parameters
[in]PrivateA pointer to the PEI_AHCI_CONTROLLER_PRIVATE_DATA data structure.
[in]PortThe given port number.
[in]PortMultiplierPortThe given port multiplier number.
[out]DevicePathLengthThe length of the device path in bytes specified by DevicePath.
[out]DevicePathThe device path of ATA device.
Return values
EFI_SUCCESSThe operation succeeds.
EFI_INVALID_PARAMETERThe parameters are invalid.
EFI_OUT_OF_RESOURCESThe operation fails due to lack of resources.

Definition at line 177 of file DevicePath.c.

◆ AhciIsHcDevicePathValid()

EFI_STATUS AhciIsHcDevicePathValid ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath,
IN UINTN  DevicePathLength 
)

Check the validity of the device path of a ATA AHCI host controller.

Parameters
[in]DevicePathA pointer to the EFI_DEVICE_PATH_PROTOCOL structure.
[in]DevicePathLengthThe length of the device path.
Return values
EFI_SUCCESSThe device path is valid.
EFI_INVALID_PARAMETERThe device path is invalid.

Definition at line 106 of file DevicePath.c.

◆ GetDevicePathInstanceSize()

EFI_STATUS GetDevicePathInstanceSize ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath,
OUT UINTN InstanceSize,
OUT BOOLEAN *  EntireDevicePathEnd 
)

Get the size of the current device path instance.

Parameters
[in]DevicePathA pointer to the EFI_DEVICE_PATH_PROTOCOL structure.
[out]InstanceSizeThe size of the current device path instance.
[out]EntireDevicePathEndIndicate whether the instance is the last one in the device path strucure.
Return values
EFI_SUCCESSThe size of the current device path instance is fetched.
OthersFails to get the size of the current device path instance.

Definition at line 55 of file DevicePath.c.

Variable Documentation

◆ mAhciEndDevicePathNodeTemplate

EFI_DEVICE_PATH_PROTOCOL mAhciEndDevicePathNodeTemplate
Initial value:
= {
END_DEVICE_PATH_TYPE,
END_ENTIRE_DEVICE_PATH_SUBTYPE,
{
(UINT8)(sizeof (EFI_DEVICE_PATH_PROTOCOL)),
(UINT8)((sizeof (EFI_DEVICE_PATH_PROTOCOL)) >> 8)
}
}

Definition at line 32 of file DevicePath.c.

◆ mAhciSataDevicePathNodeTemplate

SATA_DEVICE_PATH mAhciSataDevicePathNodeTemplate
Initial value:
= {
{
{
(UINT8)(sizeof (SATA_DEVICE_PATH)),
(UINT8)((sizeof (SATA_DEVICE_PATH)) >> 8)
}
},
0x0,
0xFFFF,
0x0
}
#define MSG_SATA_DP
Definition: DevicePath.h:510
#define MESSAGING_DEVICE_PATH
Definition: DevicePath.h:321

Definition at line 15 of file DevicePath.c.