Patrick Rudolph | 1b35295 | 2019-02-21 12:04:21 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2019 9elements Agency GmbH |
| 5 | * Copyright (C) 2019 Facebook Inc. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | */ |
| 16 | |
| 17 | #include <stdint.h> |
| 18 | #include "memory.h" |
| 19 | |
| 20 | /** |
| 21 | * To be called after DRAM init. |
| 22 | * Tells the caller if DRAM must be cleared as requested by the user, |
| 23 | * firmware or security framework. |
| 24 | */ |
| 25 | bool security_clear_dram_request(void) |
| 26 | { |
| 27 | if (CONFIG(SECURITY_CLEAR_DRAM_ON_REGULAR_BOOT)) |
| 28 | return true; |
| 29 | |
| 30 | /* TODO: Add TEE environments here */ |
| 31 | |
| 32 | return false; |
| 33 | } |