• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <security/intel/txt/txt.h>
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  */
security_clear_dram_request(void)13 bool security_clear_dram_request(void)
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 }
25