OpenCore
1.0.4
OpenCore Bootloader
|
#include <AppleMacEfi.h>
#include <Guid/AppleVariable.h>
#include <Protocol/DevicePath.h>
#include <Protocol/DevicePathPropertyDatabase.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/OcMiscLib.h>
Go to the source code of this file.
Data Structures | |
struct | DEVICE_PATH_PROPERTY_DATA |
struct | EFI_DEVICE_PATH_PROPERTY_NODE_HDR |
struct | EFI_DEVICE_PATH_PROPERTY_NODE |
struct | EFI_DEVICE_PATH_PROPERTY |
Macros | |
#define | DEVICE_PATH_PROPERTY_DATA_SIGNATURE SIGNATURE_32 ('D', 'p', 'p', 'P') |
#define | PROPERTY_DATABASE_FROM_PROTOCOL(This) |
#define | APPLE_PATH_PROPERTIES_VARIABLE_NAME L"AAPL,PathProperties" |
#define | APPLE_PATH_PROPERTY_VARIABLE_MAX_SIZE 768 |
#define | APPLE_PATH_PROPERTY_VARIABLE_MAX_NUM 0x10000 |
#define | EFI_DEVICE_PATH_PROPERTY_NODE_SIGNATURE SIGNATURE_32 ('D', 'p', 'n', '\0') |
#define | PROPERTY_NODE_FROM_LIST_ENTRY(Entry) |
#define | EFI_DEVICE_PATH_PROPERTY_NODE_SIZE(Node) |
#define | EFI_DEVICE_PATH_PROPERTY_SIGNATURE SIGNATURE_32 ('D', 'p', 'p', '\0') |
#define | EFI_DEVICE_PATH_PROPERTY_DATABASE_VERSION 1 |
#define | EFI_DEVICE_PATH_PROPERTY_FROM_LIST_ENTRY(Entry) |
#define | EFI_DEVICE_PATH_PROPERTY_SIZE(Property) |
#define | EFI_DEVICE_PATH_PROPERTY_VALUE_SIZE(Property) |
#define | NEXT_EFI_DEVICE_PATH_PROPERTY(Property) |
#define | APPLE_THUNDERBOLT_NATIVE_HOST_INTERFACE_PROTOCOL_GUID |
Functions | |
STATIC EFI_DEVICE_PATH_PROPERTY_NODE * | InternalGetPropertyNode (IN DEVICE_PATH_PROPERTY_DATA *DevicePathPropertyData, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath) |
STATIC EFI_DEVICE_PATH_PROPERTY * | InternalGetProperty (IN EFI_DEVICE_PATH_PROPERTY_NODE *Node, IN CONST CHAR16 *Name) |
STATIC VOID | InternalSyncWithThunderboltDevices (VOID) |
EFI_STATUS EFIAPI | DppDbGetProperty (IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST CHAR16 *Name, OUT VOID *Value OPTIONAL, IN OUT UINTN *Size) |
EFI_STATUS EFIAPI | DppDbSetProperty (IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST CHAR16 *Name, IN VOID *Value, IN UINTN Size) |
EFI_STATUS EFIAPI | DppDbRemoveProperty (IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST CHAR16 *Name) |
EFI_STATUS EFIAPI | DppDbGetPropertyBuffer (IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL *This, OUT EFI_DEVICE_PATH_PROPERTY_BUFFER *Buffer OPTIONAL, IN OUT UINTN *Size) |
STATIC EFI_STATUS | InternalReadEfiVariableProperties (IN EFI_GUID *VendorGuid, IN BOOLEAN DeleteVariables, IN DEVICE_PATH_PROPERTY_DATA *DevicePathPropertyData) |
EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL * | OcDevicePathPropertyInstallProtocol (IN BOOLEAN Reinstall) |
Variables | |
EFI_GUID | mAppleThunderboltNativeHostInterfaceProtocolGuid = APPLE_THUNDERBOLT_NATIVE_HOST_INTERFACE_PROTOCOL_GUID |
STATIC EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL | DppDbProtocolTemplate |
Copyright (C) 2017, vit9696. All rights reserved.
All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file OcDevicePropertyLib.c.
#define APPLE_PATH_PROPERTIES_VARIABLE_NAME L"AAPL,PathProperties" |
Definition at line 54 of file OcDevicePropertyLib.c.
#define APPLE_PATH_PROPERTY_VARIABLE_MAX_NUM 0x10000 |
Definition at line 56 of file OcDevicePropertyLib.c.
#define APPLE_PATH_PROPERTY_VARIABLE_MAX_SIZE 768 |
Definition at line 55 of file OcDevicePropertyLib.c.
#define APPLE_THUNDERBOLT_NATIVE_HOST_INTERFACE_PROTOCOL_GUID |
Definition at line 126 of file OcDevicePropertyLib.c.
#define DEVICE_PATH_PROPERTY_DATA_SIGNATURE SIGNATURE_32 ('D', 'p', 'p', 'P') |
Definition at line 34 of file OcDevicePropertyLib.c.
#define EFI_DEVICE_PATH_PROPERTY_DATABASE_VERSION 1 |
Definition at line 91 of file OcDevicePropertyLib.c.
#define EFI_DEVICE_PATH_PROPERTY_FROM_LIST_ENTRY | ( | Entry | ) |
Definition at line 93 of file OcDevicePropertyLib.c.
#define EFI_DEVICE_PATH_PROPERTY_NODE_SIGNATURE SIGNATURE_32 ('D', 'p', 'n', '\0') |
Definition at line 58 of file OcDevicePropertyLib.c.
#define EFI_DEVICE_PATH_PROPERTY_NODE_SIZE | ( | Node | ) |
Definition at line 71 of file OcDevicePropertyLib.c.
#define EFI_DEVICE_PATH_PROPERTY_SIGNATURE SIGNATURE_32 ('D', 'p', 'p', '\0') |
Definition at line 88 of file OcDevicePropertyLib.c.
#define EFI_DEVICE_PATH_PROPERTY_SIZE | ( | Property | ) |
Definition at line 101 of file OcDevicePropertyLib.c.
#define EFI_DEVICE_PATH_PROPERTY_VALUE_SIZE | ( | Property | ) |
Definition at line 104 of file OcDevicePropertyLib.c.
#define NEXT_EFI_DEVICE_PATH_PROPERTY | ( | Property | ) |
Definition at line 107 of file OcDevicePropertyLib.c.
#define PROPERTY_DATABASE_FROM_PROTOCOL | ( | This | ) |
Definition at line 38 of file OcDevicePropertyLib.c.
#define PROPERTY_NODE_FROM_LIST_ENTRY | ( | Entry | ) |
Definition at line 61 of file OcDevicePropertyLib.c.
EFI_STATUS EFIAPI DppDbGetProperty | ( | IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL * | This, |
IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, | ||
IN CONST CHAR16 * | Name, | ||
OUT VOID *Value | OPTIONAL, | ||
IN OUT UINTN * | Size ) |
Locates a device property in the database and returns its value into Value.
[in] | This | A pointer to the protocol instance. |
[in] | DevicePath | The device path of the device to get the property of. |
[in] | Name | The Name of the requested property. |
[out] | Value | The Buffer allocated by the caller to return the value of the property into. |
[in,out] | Size | On input the size of the allocated Value Buffer. On output the size required to fill the Buffer. |
EFI_BUFFER_TOO_SMALL | The memory required to return the value exceeds the size of the allocated Buffer. The required size to complete the operation has been returned into Size. |
EFI_NOT_FOUND | The given device path does not have a property with the specified Name. |
EFI_SUCCESS | The operation completed successfully and the Value Buffer has been filled. |
Definition at line 251 of file OcDevicePropertyLib.c.
EFI_STATUS EFIAPI DppDbGetPropertyBuffer | ( | IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL * | This, |
OUT EFI_DEVICE_PATH_PROPERTY_BUFFER *Buffer | OPTIONAL, | ||
IN OUT UINTN * | Size ) |
Returns a Buffer of all device properties into Buffer.
[in] | This | A pointer to the protocol instance. |
[out] | Buffer | The Buffer allocated by the caller to return the property Buffer into. |
[in,out] | Size | On input the size of the allocated Buffer. On output the size required to fill the Buffer. |
EFI_BUFFER_TOO_SMALL | The memory required to return the value exceeds the size of the allocated Buffer. The required size to complete the operation has been returned into Size. |
EFI_SUCCESS | The operation completed successfully. |
Definition at line 481 of file OcDevicePropertyLib.c.
EFI_STATUS EFIAPI DppDbRemoveProperty | ( | IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL * | This, |
IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, | ||
IN CONST CHAR16 * | Name ) |
Removes the sepcified property from the given device path.
[in] | This | A pointer to the protocol instance. |
[in] | DevicePath | The device path of the device to set the property of. |
[in] | Name | The Name of the desired property. |
EFI_NOT_FOUND | The given device path does not have a property with the specified Name. |
EFI_SUCCESS | The operation completed successfully. |
Definition at line 422 of file OcDevicePropertyLib.c.
EFI_STATUS EFIAPI DppDbSetProperty | ( | IN EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL * | This, |
IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, | ||
IN CONST CHAR16 * | Name, | ||
IN VOID * | Value, | ||
IN UINTN | Size ) |
Sets the sepcified property of the given device path to the provided Value.
[in] | This | A pointer to the protocol instance. |
[in] | DevicePath | The device path of the device to set the property of. |
[in] | Name | The Name of the desired property. |
[in] | Value | The Buffer holding the value to set the property to. |
[in] | Size | The size of the Value Buffer. |
EFI_OUT_OF_RESOURCES | The memory necessary to complete the operation could not be allocated. |
EFI_SUCCESS | The operation completed successfully and the Value Buffer has been filled. |
Definition at line 306 of file OcDevicePropertyLib.c.
STATIC EFI_DEVICE_PATH_PROPERTY * InternalGetProperty | ( | IN EFI_DEVICE_PATH_PROPERTY_NODE * | Node, |
IN CONST CHAR16 * | Name ) |
Definition at line 165 of file OcDevicePropertyLib.c.
STATIC EFI_DEVICE_PATH_PROPERTY_NODE * InternalGetPropertyNode | ( | IN DEVICE_PATH_PROPERTY_DATA * | DevicePathPropertyData, |
IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath ) |
Definition at line 135 of file OcDevicePropertyLib.c.
STATIC EFI_STATUS InternalReadEfiVariableProperties | ( | IN EFI_GUID * | VendorGuid, |
IN BOOLEAN | DeleteVariables, | ||
IN DEVICE_PATH_PROPERTY_DATA * | DevicePathPropertyData ) |
Definition at line 593 of file OcDevicePropertyLib.c.
STATIC VOID InternalSyncWithThunderboltDevices | ( | VOID | ) |
Definition at line 188 of file OcDevicePropertyLib.c.
EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL * OcDevicePathPropertyInstallProtocol | ( | IN BOOLEAN | Reinstall | ) |
Install and initialise EFI DevicePath property protocol.
[in] | Reinstall | Overwrite installed protocol. |
installed | or located protocol or NULL. |
Definition at line 787 of file OcDevicePropertyLib.c.
STATIC EFI_DEVICE_PATH_PROPERTY_DATABASE_PROTOCOL DppDbProtocolTemplate |
Definition at line 778 of file OcDevicePropertyLib.c.
EFI_GUID mAppleThunderboltNativeHostInterfaceProtocolGuid = APPLE_THUNDERBOLT_NATIVE_HOST_INTERFACE_PROTOCOL_GUID |
Definition at line 130 of file OcDevicePropertyLib.c.