VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2Pkg/Include/Library/CacheLib.h

Last change on this file was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1/** @file
2
3 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6**/
7
8#ifndef _CACHE_LIB_H_
9#define _CACHE_LIB_H_
10
11//
12// EFI_MEMORY_CACHE_TYPE
13//
14typedef INT32 EFI_MEMORY_CACHE_TYPE;
15
16#define EFI_CACHE_UNCACHEABLE 0
17#define EFI_CACHE_WRITECOMBINING 1
18#define EFI_CACHE_WRITETHROUGH 4
19#define EFI_CACHE_WRITEPROTECTED 5
20#define EFI_CACHE_WRITEBACK 6
21
22/**
23 Reset all the MTRRs to a known state.
24
25 @retval EFI_SUCCESS All MTRRs have been reset successfully.
26
27**/
28EFI_STATUS
29EFIAPI
30ResetCacheAttributes (
31 VOID
32 );
33
34/**
35 Given the memory range and cache type, programs the MTRRs.
36
37 @param[in] MemoryAddress Base Address of Memory to program MTRR.
38 @param[in] MemoryLength Length of Memory to program MTRR.
39 @param[in] MemoryCacheType Cache Type.
40
41 @retval EFI_SUCCESS Mtrr are set successfully.
42 @retval EFI_LOAD_ERROR No empty MTRRs to use.
43 @retval EFI_INVALID_PARAMETER The input parameter is not valid.
44 @retval others An error occurs when setting MTTR.
45
46**/
47EFI_STATUS
48EFIAPI
49SetCacheAttributes (
50 IN EFI_PHYSICAL_ADDRESS MemoryAddress,
51 IN UINT64 MemoryLength,
52 IN EFI_MEMORY_CACHE_TYPE MemoryCacheType
53 );
54
55#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette