microsoft/mu_feature_ffa
Publicmirrored fromhttps://github.com/microsoft/mu_feature_ffaAvailable
FfaFeaturePkg/Include/Library/NotificationServiceLib.h
83lines · modecode
| 1 | /** @file |
| 2 | Definitions for the Notification Service |
| 3 | |
| 4 | Copyright (c), Microsoft Corporation. |
| 5 | SPDX-License-Identifier: BSD-2-Clause-Patent |
| 6 | |
| 7 | **/ |
| 8 | |
| 9 | #ifndef NOTIFICATION_SERVICE_LIB_H_ |
| 10 | #define NOTIFICATION_SERVICE_LIB_H_ |
| 11 | |
| 12 | #include <Base.h> |
| 13 | #include <IndustryStandard/ArmFfaPartInfo.h> |
| 14 | #include <Library/ArmSvcLib.h> |
| 15 | #include <Library/ArmFfaLibEx.h> |
| 16 | |
| 17 | typedef INT8 NotificationStatus; |
| 18 | |
| 19 | /** |
| 20 | Initializes the Notification service |
| 21 | |
| 22 | **/ |
| 23 | VOID |
| 24 | NotificationServiceInit ( |
| 25 | VOID |
| 26 | ); |
| 27 | |
| 28 | /** |
| 29 | Deinitializes the Notification service |
| 30 | |
| 31 | **/ |
| 32 | VOID |
| 33 | NotificationServiceDeInit ( |
| 34 | VOID |
| 35 | ); |
| 36 | |
| 37 | /** |
| 38 | Handler for Notification service commands |
| 39 | |
| 40 | @param Request The incoming message |
| 41 | @param Response The outgoing message |
| 42 | |
| 43 | **/ |
| 44 | VOID |
| 45 | NotificationServiceHandle ( |
| 46 | DIRECT_MSG_ARGS_EX *Request, |
| 47 | DIRECT_MSG_ARGS_EX *Response |
| 48 | ); |
| 49 | |
| 50 | /** |
| 51 | Calls NotificationSet on the given ID with the given flag |
| 52 | |
| 53 | @param Id The ID to trigger the event on |
| 54 | @param ServiceUuid The service containing the ID to trigger |
| 55 | @param Flag The NotificationSet flag to use |
| 56 | |
| 57 | @retval NOTIFICATION_STATUS_SUCCESS Success |
| 58 | @retval NOTIFICATION_STATUS_INVALID_PARAMETER Invalid parameter |
| 59 | |
| 60 | **/ |
| 61 | NotificationStatus |
| 62 | NotificationServiceIdSet ( |
| 63 | UINT32 Id, |
| 64 | UINT8 *ServiceUuid, |
| 65 | UINT32 Flag |
| 66 | ); |
| 67 | |
| 68 | /** |
| 69 | Extracts the UUID from the message arguments |
| 70 | |
| 71 | @param UuidLo The lower bytes of the UUID |
| 72 | @param UuidHi The higher bytes of the UUID |
| 73 | @param Uuid The UUID to populate |
| 74 | |
| 75 | **/ |
| 76 | VOID |
| 77 | NotificationServiceExtractUuid ( |
| 78 | UINT64 UuidLo, |
| 79 | UINT64 UuidHi, |
| 80 | UINT8 *Uuid |
| 81 | ); |
| 82 | |
| 83 | #endif /* NOTIFICATION_SERVICE_LIB_H_ */ |
| 84 | |