blob: cf6b52c7c27dd80b9e8c3ce68d47d534cdc2f465 [file] [log] [blame]
Subrata Banik20fe24b2021-12-09 02:46:38 +05301/** @file
2 MM Unblock Memory Library Interface.
3
4 This library provides an interface to request non-MMRAM pages to be mapped/unblocked
5 from inside MM environment.
6
7 For MM modules that need to access regions outside of MMRAMs, the agents that set up
8 these regions are responsible for invoking this API in order for these memory areas
9 to be accessed from inside MM.
10
11 Copyright (c) Microsoft Corporation.
12 SPDX-License-Identifier: BSD-2-Clause-Patent
13
14**/
15
16#ifndef MM_UNBLOCK_MEMORY_LIB_H_
17#define MM_UNBLOCK_MEMORY_LIB_H_
18
19/**
20 This API provides a way to unblock certain data pages to be accessible inside MM environment.
21
22 @param UnblockAddress The address of buffer caller requests to unblock, the address
23 has to be page aligned.
24 @param NumberOfPages The number of pages requested to be unblocked from MM
25 environment.
26
27 @retval RETURN_SUCCESS The request goes through successfully.
28 @retval RETURN_NOT_AVAILABLE_YET The requested functionality is not produced yet.
29 @retval RETURN_UNSUPPORTED The requested functionality is not supported on current platform.
30 @retval RETURN_SECURITY_VIOLATION The requested address failed to pass security check for
31 unblocking.
32 @retval RETURN_INVALID_PARAMETER Input address either NULL pointer or not page aligned.
33 @retval RETURN_ACCESS_DENIED The request is rejected due to system has passed certain boot
34 phase.
35
36**/
37RETURN_STATUS
38EFIAPI
39MmUnblockMemoryRequest (
40 IN PHYSICAL_ADDRESS UnblockAddress,
41 IN UINT64 NumberOfPages
42);
43
44#endif // MM_UNBLOCK_MEMORY_LIB_H_