2003-04-22 21:02:15 +02:00
|
|
|
#ifndef CPU_CPU_H
|
|
|
|
#define CPU_CPU_H
|
|
|
|
|
2004-11-12 22:00:29 +01:00
|
|
|
#include <arch/cpu.h>
|
2003-04-22 21:02:15 +02:00
|
|
|
|
2012-06-05 23:41:27 +02:00
|
|
|
void cpu_initialize(unsigned int cpu_index);
|
2019-05-10 08:28:37 +02:00
|
|
|
/* Returns default APIC id based on logical_cpu number or < 0 on failure. */
|
|
|
|
int cpu_get_apic_id(int logical_cpu);
|
2020-05-01 06:27:47 +02:00
|
|
|
uintptr_t cpu_get_lapic_addr(void);
|
2019-05-10 08:28:37 +02:00
|
|
|
/* Function to keep track of cpu default apic_id */
|
|
|
|
void cpu_add_map_entry(unsigned int index);
|
2012-04-27 00:39:17 +02:00
|
|
|
struct bus;
|
2004-10-16 08:20:29 +02:00
|
|
|
void initialize_cpus(struct bus *cpu_bus);
|
2017-03-08 00:47:44 +01:00
|
|
|
asmlinkage void secondary_cpu_init(unsigned int cpu_index);
|
2016-12-06 13:00:05 +01:00
|
|
|
int cpu_phys_address_size(void);
|
2009-10-30 03:08:07 +01:00
|
|
|
|
2019-09-27 14:02:32 +02:00
|
|
|
#if ENV_RAMSTAGE
|
2017-07-13 02:20:27 +02:00
|
|
|
#define __cpu_driver __attribute__((used, __section__(".rodata.cpu_driver")))
|
2019-09-27 14:02:32 +02:00
|
|
|
#else
|
|
|
|
#define __cpu_driver __attribute__((unused))
|
|
|
|
#endif
|
|
|
|
|
2004-10-14 22:13:01 +02:00
|
|
|
/** start of compile time generated pci driver array */
|
2015-09-04 00:23:08 +02:00
|
|
|
extern struct cpu_driver _cpu_drivers[];
|
2004-10-14 22:13:01 +02:00
|
|
|
/** end of compile time generated pci driver array */
|
2015-09-04 00:23:08 +02:00
|
|
|
extern struct cpu_driver _ecpu_drivers[];
|
2003-04-22 21:02:15 +02:00
|
|
|
|
|
|
|
#endif /* CPU_CPU_H */
|