summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/xeon_sp/include/soc/util.h
blob: b532b9a7a83227d5b19631ee417f134ed79fc277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* SPDX-License-Identifier: GPL-2.0-or-later */

#ifndef _XEON_SP_SOC_UTIL_H_
#define _XEON_SP_SOC_UTIL_H_

#include <cpu/x86/msr.h>
#include <hob_iiouds.h>

void lock_pam0123(void);
void unlock_pam_regions(void);

msr_t read_msr_ppin(void);
int get_platform_thread_count(void);
const IIO_UDS *get_iio_uds(void);
unsigned int soc_get_num_cpus(void);
bool soc_cpu_is_enabled(const size_t idx);
void set_bios_init_completion(void);
uint8_t soc_get_iio_ioapicid(int socket, int stack);

struct iiostack_resource {
	uint8_t     no_of_stacks;
	STACK_RES   res[CONFIG_MAX_SOCKET * MAX_IIO_STACK];
};

void get_iiostack_info(struct iiostack_resource *info);
bool is_pcie_iio_stack_res(const STACK_RES *res);
bool is_ubox_stack_res(const STACK_RES *res);
#if CONFIG(HAVE_IOAT_DOMAINS)
bool is_ioat_iio_stack_res(const STACK_RES *res);
#else
static inline bool is_ioat_iio_stack_res(const STACK_RES *res)
{
	return false;
}
#endif
void bios_done_msr(void *unused);

#endif