VirtualBox

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

Last change on this file since 77662 was 77662, checked in by vboxsync, 6 years ago

EFI: First step in UDK2018 merge. Does not build yet.

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/** @file
2
3 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php.
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12**/
13
14#ifndef _CACHE_LIB_H_
15#define _CACHE_LIB_H_
16
17//
18// EFI_MEMORY_CACHE_TYPE
19//
20typedef INT32 EFI_MEMORY_CACHE_TYPE;
21
22#define EFI_CACHE_UNCACHEABLE 0
23#define EFI_CACHE_WRITECOMBINING 1
24#define EFI_CACHE_WRITETHROUGH 4
25#define EFI_CACHE_WRITEPROTECTED 5
26#define EFI_CACHE_WRITEBACK 6
27
28/**
29 Reset all the MTRRs to a known state.
30
31 @retval EFI_SUCCESS All MTRRs have been reset successfully.
32
33**/
34EFI_STATUS
35EFIAPI
36ResetCacheAttributes (
37 VOID
38 );
39
40/**
41 Given the memory range and cache type, programs the MTRRs.
42
43 @param[in] MemoryAddress Base Address of Memory to program MTRR.
44 @param[in] MemoryLength Length of Memory to program MTRR.
45 @param[in] MemoryCacheType Cache Type.
46
47 @retval EFI_SUCCESS Mtrr are set successfully.
48 @retval EFI_LOAD_ERROR No empty MTRRs to use.
49 @retval EFI_INVALID_PARAMETER The input parameter is not valid.
50 @retval others An error occurs when setting MTTR.
51
52**/
53EFI_STATUS
54EFIAPI
55SetCacheAttributes (
56 IN EFI_PHYSICAL_ADDRESS MemoryAddress,
57 IN UINT64 MemoryLength,
58 IN EFI_MEMORY_CACHE_TYPE MemoryCacheType
59 );
60
61#endif
62
Note: See TracBrowser for help on using the repository browser.

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