TianoCore EDK2 master
Loading...
Searching...
No Matches
BmConnect.c File Reference
#include "InternalBm.h"

Go to the source code of this file.

Functions

VOID BmConnectAllDriversToAllControllers (VOID)
 
VOID EFIAPI EfiBootManagerConnectAll (VOID)
 
EFI_STATUS EFIAPI EfiBootManagerConnectDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePathToConnect, OUT EFI_HANDLE *MatchingHandle OPTIONAL)
 
VOID EFIAPI EfiBootManagerDisconnectAll (VOID)
 
EFI_STATUS BmConnectUsbShortFormDevicePath (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
 

Detailed Description

Library functions which relate with connecting the device.

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

Definition in file BmConnect.c.

Function Documentation

◆ BmConnectAllDriversToAllControllers()

VOID BmConnectAllDriversToAllControllers ( VOID  )

Connect all the drivers to all the controllers.

This function makes sure all the current system drivers manage the correspoinding controllers if have. And at the same time, makes sure all the system controllers have driver to manage it if have.

Definition at line 19 of file BmConnect.c.

◆ BmConnectUsbShortFormDevicePath()

EFI_STATUS BmConnectUsbShortFormDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL DevicePath)

Connect the specific Usb device which match the short form device path, and whose bus is determined by Host Controller (Uhci or Ehci).

Parameters
DevicePathA short-form device path that starts with the first element being a USB WWID or a USB Class device path
Returns
EFI_INVALID_PARAMETER DevicePath is NULL pointer. DevicePath is not a USB device path.
EFI_SUCCESS Success to connect USB device
EFI_NOT_FOUND Fail to find handle for USB controller to connect.

Definition at line 245 of file BmConnect.c.

◆ EfiBootManagerConnectAll()

VOID EFIAPI EfiBootManagerConnectAll ( VOID  )

This function will connect all the system driver to controller first, and then special connect the default console, this make sure all the system controller available and the platform default console connected.

Definition at line 67 of file BmConnect.c.

◆ EfiBootManagerConnectDevicePath()

EFI_STATUS EFIAPI EfiBootManagerConnectDevicePath ( IN EFI_DEVICE_PATH_PROTOCOL DevicePathToConnect,
OUT EFI_HANDLE *MatchingHandle  OPTIONAL 
)

This function will create all handles associate with every device path node. If the handle associate with one device path node can not be created successfully, then still give chance to do the dispatch, which load the missing drivers if possible.

Parameters
DevicePathToConnectThe device path which will be connected, it can be a multi-instance device path
MatchingHandleReturn the controller handle closest to the DevicePathToConnect
Return values
EFI_SUCCESSAll handles associate with every device path node have been created.
EFI_OUT_OF_RESOURCESThere is no resource to create new handles.
EFI_NOT_FOUNDCreate the handle associate with one device path node failed.
EFI_SECURITY_VIOLATIONThe user has no permission to start UEFI device drivers on the DevicePath.

Definition at line 108 of file BmConnect.c.

◆ EfiBootManagerDisconnectAll()

VOID EFIAPI EfiBootManagerDisconnectAll ( VOID  )

This function will disconnect all current system handles.

gBS->DisconnectController() is invoked for each handle exists in system handle buffer. If handle is a bus type handle, all childrens also are disconnected recursively by gBS->DisconnectController().

Definition at line 202 of file BmConnect.c.