TianoCore EDK2 master
Loading...
Searching...
No Matches
TlsDriver.h File Reference
#include <Uefi.h>
#include <Protocol/ServiceBinding.h>

Go to the source code of this file.

Data Structures

struct  _TLS_SERVICE
 
struct  _TLS_INSTANCE
 

Macros

#define TLS_VERSION   0x00000000
 
#define TLS_SERVICE_SIGNATURE   SIGNATURE_32 ('T', 'L', 'S', 'S')
 
#define TLS_INSTANCE_SIGNATURE   SIGNATURE_32 ('T', 'L', 'S', 'I')
 
#define TLS_SERVICE_FROM_THIS(a)    CR (a, TLS_SERVICE, ServiceBinding, TLS_SERVICE_SIGNATURE)
 
#define TLS_INSTANCE_FROM_PROTOCOL(a)    CR (a, TLS_INSTANCE, Tls, TLS_INSTANCE_SIGNATURE)
 
#define TLS_INSTANCE_FROM_CONFIGURATION(a)    CR (a, TLS_INSTANCE, TlsConfig, TLS_INSTANCE_SIGNATURE)
 

Typedefs

typedef struct _TLS_SERVICE TLS_SERVICE
 
typedef struct _TLS_INSTANCE TLS_INSTANCE
 

Functions

VOID TlsCleanInstance (IN TLS_INSTANCE *Instance)
 
EFI_STATUS TlsCreateInstance (IN TLS_SERVICE *Service, OUT TLS_INSTANCE **Instance)
 
VOID TlsCleanService (IN TLS_SERVICE *Service)
 
EFI_STATUS TlsCreateService (IN EFI_HANDLE Image, OUT TLS_SERVICE **Service)
 
EFI_STATUS EFIAPI TlsUnload (IN EFI_HANDLE ImageHandle)
 
EFI_STATUS EFIAPI TlsDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI TlsServiceBindingCreateChild (IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE *ChildHandle)
 
EFI_STATUS EFIAPI TlsServiceBindingDestroyChild (IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)
 

Detailed Description

Header file of the Driver Binding and Service Binding Protocol for TlsDxe driver.

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

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

Definition in file TlsDriver.h.

Macro Definition Documentation

◆ TLS_INSTANCE_FROM_CONFIGURATION

#define TLS_INSTANCE_FROM_CONFIGURATION (   a)     CR (a, TLS_INSTANCE, TlsConfig, TLS_INSTANCE_SIGNATURE)

Definition at line 87 of file TlsDriver.h.

◆ TLS_INSTANCE_FROM_PROTOCOL

#define TLS_INSTANCE_FROM_PROTOCOL (   a)     CR (a, TLS_INSTANCE, Tls, TLS_INSTANCE_SIGNATURE)

Definition at line 84 of file TlsDriver.h.

◆ TLS_INSTANCE_SIGNATURE

#define TLS_INSTANCE_SIGNATURE   SIGNATURE_32 ('T', 'L', 'S', 'I')

Definition at line 27 of file TlsDriver.h.

◆ TLS_SERVICE_FROM_THIS

#define TLS_SERVICE_FROM_THIS (   a)     CR (a, TLS_SERVICE, ServiceBinding, TLS_SERVICE_SIGNATURE)

Definition at line 81 of file TlsDriver.h.

◆ TLS_SERVICE_SIGNATURE

#define TLS_SERVICE_SIGNATURE   SIGNATURE_32 ('T', 'L', 'S', 'S')

Definition at line 25 of file TlsDriver.h.

◆ TLS_VERSION

#define TLS_VERSION   0x00000000

Definition at line 23 of file TlsDriver.h.

Typedef Documentation

◆ TLS_INSTANCE

typedef struct _TLS_INSTANCE TLS_INSTANCE

TLS Instance Data

Definition at line 37 of file TlsDriver.h.

◆ TLS_SERVICE

typedef struct _TLS_SERVICE TLS_SERVICE

TLS Service Data

Definition at line 32 of file TlsDriver.h.

Function Documentation

◆ TlsCleanInstance()

VOID TlsCleanInstance ( IN TLS_INSTANCE Instance)

Release all the resources used by the TLS instance.

Parameters
[in]InstanceThe TLS instance data.

Definition at line 24 of file TlsDriver.c.

◆ TlsCleanService()

VOID TlsCleanService ( IN TLS_SERVICE Service)

Release all the resources used by the TLS service binding instance.

Parameters
[in]ServiceThe TLS service data.

Definition at line 84 of file TlsDriver.c.

◆ TlsCreateInstance()

EFI_STATUS TlsCreateInstance ( IN TLS_SERVICE Service,
OUT TLS_INSTANCE **  Instance 
)

Create the TLS instance and initialize it.

Parameters
[in]ServiceThe pointer to the TLS service.
[out]InstanceThe pointer to the TLS instance.
Return values
EFI_OUT_OF_RESOURCESFailed to allocate resources.
EFI_SUCCESSThe TLS instance is created.

Definition at line 48 of file TlsDriver.c.

◆ TlsCreateService()

EFI_STATUS TlsCreateService ( IN EFI_HANDLE  Image,
OUT TLS_SERVICE **  Service 
)

Create then initialize a TLS service.

Parameters
[in]ImageImageHandle of the TLS driver
[out]ServiceThe service for TLS driver
Return values
EFI_OUT_OF_RESOURCESFailed to allocate resource to create the service.
EFI_SUCCESSThe service is created for the driver.

Definition at line 108 of file TlsDriver.c.

◆ TlsDriverEntryPoint()

EFI_STATUS EFIAPI TlsDriverEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both device drivers and bus drivers.

Parameters
ImageHandleThe firmware allocated handle for the UEFI image.
SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe operation completed successfully.
OthersAn unexpected error occurred.

Definition at line 235 of file TlsDriver.c.

◆ TlsServiceBindingCreateChild()

EFI_STATUS EFIAPI TlsServiceBindingCreateChild ( IN EFI_SERVICE_BINDING_PROTOCOL This,
IN EFI_HANDLE ChildHandle 
)

Creates a child handle and installs a protocol.

The CreateChild() function installs a protocol on ChildHandle. If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.

Parameters
[in]ThisPointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
[in]ChildHandlePointer to the handle of the child to create. If it is NULL, then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle.
Return values
EFI_SUCCESSThe protocol was added to ChildHandle.
EFI_INVALID_PARAMETERChildHandle is NULL.
EFI_OUT_OF_RESOURCESThere are not enough resources available to create the child.
otherThe child handle was not created.

Definition at line 311 of file TlsDriver.c.

◆ TlsServiceBindingDestroyChild()

EFI_STATUS EFIAPI TlsServiceBindingDestroyChild ( IN EFI_SERVICE_BINDING_PROTOCOL This,
IN EFI_HANDLE  ChildHandle 
)

Destroys a child handle with a protocol installed on it.

The DestroyChild() function does the opposite of CreateChild(). It removes a protocol that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed.

Parameters
ThisPointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
ChildHandleHandle of the child to destroy.
Return values
EFI_SUCCESSThe protocol was removed from ChildHandle.
EFI_UNSUPPORTEDChildHandle does not support the protocol that is being removed.
EFI_INVALID_PARAMETERChild handle is NULL.
EFI_ACCESS_DENIEDThe protocol could not be removed from the ChildHandle because its services are being used.
otherThe child handle was not destroyed.

Definition at line 405 of file TlsDriver.c.

◆ TlsUnload()

EFI_STATUS EFIAPI TlsUnload ( IN EFI_HANDLE  ImageHandle)

Unloads an image.

Parameters
[in]ImageHandleHandle that identifies the image to be unloaded.
Return values
EFI_SUCCESSThe image has been unloaded.
EFI_INVALID_PARAMETERImageHandle is not a valid image handle.

Definition at line 152 of file TlsDriver.c.