]>
git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c
2 Callbacks required by the HII of the Opal UEFI Driver to help display
3 Opal device information.
5 Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
13 Get the driver image handle.
15 @retval the driver image handle.
19 HiiGetDriverImageHandleCB(
27 Returns the opaque pointer to a physical disk context.
29 @param DiskIndex Input the disk index.
31 @retval The device pointer.
39 OPAL_DRIVER_DEVICE
* Dev
;
42 Dev
= OpalDriverGetDeviceList();
45 if (DiskIndex
>= GetDeviceCount()) {
50 if (CurrentDisk
== DiskIndex
) {
62 Returns the opaque pointer to a physical disk context.
64 @param DiskIndex Input the disk index.
66 @retval The device pointer.
75 OPAL_DRIVER_DEVICE
*Tmp
;
77 Ctx
= HiiGetDiskContextCB (DiskIndex
);
83 Tmp
= (OPAL_DRIVER_DEVICE
*) Ctx
;
85 return &Tmp
->OpalDisk
;
89 Returns the disk name.
91 @param DiskIndex Input the disk index.
93 @retval Returns the disk name.
101 OPAL_DRIVER_DEVICE
* Ctx
;
103 Ctx
= (OPAL_DRIVER_DEVICE
*) HiiGetDiskContextCB (DiskIndex
);
106 if (Ctx
->NameZ
== NULL
) {
107 OpalDriverGetDriverDeviceName (Ctx
);