MAINTAINERS: Add Matt as a maintainer for Star Labs
[coreboot2.git] / src / soc / amd / common / block / include / amdblocks / smm.h
blobbcd30f8ed23db00ff03cdb28f92e0acdf9325aa8
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _AMDBLOCKS_SMM_H_
4 #define _AMDBLOCKS_SMM_H_
6 #include <cpu/x86/msr.h>
7 #include <types.h>
9 void *get_smi_source_handler(int source);
10 void handle_smi_gsmi(void);
11 void handle_smi_store(void);
12 void fch_apmc_smi_handler(void);
13 void clear_tvalid(void);
14 void tseg_valid(void);
15 bool is_smm_locked(void);
16 void lock_smm(void);
17 /* See SMITYPE_* for list possible of events. GEVENTS are handled with mainboard_smi_gpi. */
18 void mainboard_handle_smi(int event);
20 #if CONFIG_SMM_TSEG_SIZE != 0
21 #if (CONFIG_SMM_TSEG_SIZE <= CONFIG_SMM_RESERVED_SIZE)
22 # error "CONFIG_SMM_TSEG_SIZE <= CONFIG_SMM_RESERVED_SIZE"
23 #endif
24 #if (CONFIG_SMM_TSEG_SIZE < 0x20000)
25 # error "CONFIG_SMM_TSEG_SIZE must at least be 128KiB"
26 #endif
27 #if ((CONFIG_SMM_TSEG_SIZE & (CONFIG_SMM_TSEG_SIZE - 1)) != 0)
28 # error "CONFIG_SMM_TSEG_SIZE is not a power of 2"
29 #endif
30 #endif
32 #endif