coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
4 #include <stdbool.h>
5 
6 #include "memory.h"
7 
8 /**
9  * To be called after DRAM init.
10  * Tells the caller if DRAM must be cleared as requested by the user,
11  * firmware or security framework.
12  */
14 {
15  if (CONFIG(SECURITY_CLEAR_DRAM_ON_REGULAR_BOOT))
16  return true;
17 
18  if (CONFIG(INTEL_TXT) && intel_txt_memory_has_secrets())
19  return true;
20 
21  /* TODO: Add TEE environments here */
22 
23  return false;
24 }
@ CONFIG
Definition: dsi_common.h:201
bool intel_txt_memory_has_secrets(void)
Definition: common.c:135
bool security_clear_dram_request(void)
To be called after DRAM init.
Definition: memory.c:13