Path: blob/main/sys/contrib/edk2/Include/Guid/MemoryOverwriteControl.h
96339 views
/** @file1GUID used for MemoryOverwriteRequestControl UEFI variable defined in2TCG Platform Reset Attack Mitigation Specification 1.00.3See http://trustedcomputinggroup.org for the latest specification45The purpose of the MemoryOverwriteRequestControl UEFI variable is to give users (e.g., OS, loader) the ability to6indicate to the platform that secrets are present in memory and that the platform firmware must clear memory upon7a restart. The OS loader should not create the variable. Rather, the firmware is required to create it.89Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>10SPDX-License-Identifier: BSD-2-Clause-Patent1112**/1314#ifndef _MEMORY_OVERWRITE_CONTROL_DATA_GUID_H_15#define _MEMORY_OVERWRITE_CONTROL_DATA_GUID_H_1617#define MEMORY_ONLY_RESET_CONTROL_GUID \18{ \190xe20939be, 0x32d4, 0x41be, {0xa1, 0x50, 0x89, 0x7f, 0x85, 0xd4, 0x98, 0x29} \20}2122///23/// Variable name is "MemoryOverwriteRequestControl" and it is a 1 byte unsigned value.24/// The attributes should be:25/// EFI_VARIABLE_NON_VOLATILE |26/// EFI_VARIABLE_BOOTSERVICE_ACCESS |27/// EFI_VARIABLE_RUNTIME_ACCESS28///29#define MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME L"MemoryOverwriteRequestControl"3031///32/// 0 = Firmware MUST clear the MOR bit33/// 1 = Firmware MUST set the MOR bit34///35#define MOR_CLEAR_MEMORY_BIT_MASK 0x013637///38/// 0 = Firmware MAY autodetect a clean shutdown of the Static RTM OS.39/// 1 = Firmware MUST NOT autodetect a clean shutdown of the Static RTM OS.40///41#define MOR_DISABLEAUTODETECT_BIT_MASK 0x104243///44/// MOR field bit offset45///46#define MOR_CLEAR_MEMORY_BIT_OFFSET 047#define MOR_DISABLEAUTODETECT_BIT_OFFSET 44849/**50Return the ClearMemory bit value 0 or 1.5152@param mor 1 byte value that contains ClearMemory and DisableAutoDetect bit.5354@return ClearMemory bit value55**/56#define MOR_CLEAR_MEMORY_VALUE(mor) (((UINT8)(mor) & MOR_CLEAR_MEMORY_BIT_MASK) >> MOR_CLEAR_MEMORY_BIT_OFFSET)5758/**59Return the DisableAutoDetect bit value 0 or 1.6061@param mor 1 byte value that contains ClearMemory and DisableAutoDetect bit.6263@return DisableAutoDetect bit value64**/65#define MOR_DISABLE_AUTO_DETECT_VALUE(mor) (((UINT8)(mor) & MOR_DISABLEAUTODETECT_BIT_MASK) >> MOR_DISABLEAUTODETECT_BIT_OFFSET)6667extern EFI_GUID gEfiMemoryOverwriteControlDataGuid;6869#endif707172