xref: /aosp_15_r20/external/coreboot/src/soc/intel/xeon_sp/include/soc/util.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef _XEON_SP_SOC_UTIL_H_
4 #define _XEON_SP_SOC_UTIL_H_
5 
6 #include <cpu/x86/msr.h>
7 #include <intelblocks/p2sb.h>
8 #include <soc/soc_util.h>
9 
10 #define MEM_ADDR_64MB_SHIFT_BITS 26
11 
12 void lock_pam0123(void);
13 
14 msr_t read_msr_ppin(void);
15 int get_platform_thread_count(void);
16 const IIO_UDS *get_iio_uds(void);
17 unsigned int soc_get_num_cpus(void);
18 bool soc_cpu_is_enabled(const size_t idx);
19 void set_bios_init_completion(void);
20 uint8_t soc_get_iio_ioapicid(int socket, int stack);
21 
22 bool is_memtype_non_volatile(uint16_t mem_type);
23 bool is_memtype_reserved(uint16_t mem_type);
24 bool is_memtype_processor_attached(uint16_t mem_type);
25 
26 bool is_pcie_iio_stack_res(const xSTACK_RES *res);
27 bool is_ubox_stack_res(const xSTACK_RES *res);
28 bool is_ioat_iio_stack_res(const xSTACK_RES *res);
29 bool is_iio_cxl_stack_res(const xSTACK_RES *res);
30 void bios_done_msr(void *unused);
31 union p2sb_bdf soc_get_hpet_bdf(void);
32 union p2sb_bdf soc_get_ioapic_bdf(void);
33 
34 #endif
35