]> git.proxmox.com Git - mirror_edk2.git/blob - UefiPayloadPkg/Include/Guid/SpiFlashInfoGuid.h
UefiPayloadPkg: Add SpiFlashLib
[mirror_edk2.git] / UefiPayloadPkg / Include / Guid / SpiFlashInfoGuid.h
1 /** @file
2 This file defines the hob structure for the SPI flash variable info.
3
4 Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef SPI_FLASH_INFO_GUID_H_
10 #define SPI_FLASH_INFO_GUID_H_
11
12 #include <IndustryStandard/Acpi.h>
13 //
14 // SPI Flash infor hob GUID
15 //
16 extern EFI_GUID gSpiFlashInfoGuid;
17
18 //
19 // Set this bit if platform need disable SMM write protection when writing flash
20 // in SMM mode using this method: -- AsmWriteMsr32 (0x1FE, MmioRead32 (0xFED30880) | BIT0);
21 //
22 #define FLAGS_SPI_DISABLE_SMM_WRITE_PROTECT BIT0
23
24 //
25 // Reuse ACPI definition
26 //
27 typedef EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE PLD_GENERIC_ADDRESS;
28 #define SPACE_ID_PCI_CONFIGURATION EFI_ACPI_3_0_PCI_CONFIGURATION_SPACE
29 #define REGISTER_BIT_WIDTH_DWORD EFI_ACPI_3_0_DWORD
30
31 typedef struct {
32 UINT8 Revision;
33 UINT8 Reserved;
34 UINT16 Flags;
35 PLD_GENERIC_ADDRESS SpiAddress;
36 } SPI_FLASH_INFO;
37
38 #endif