2002-11-18 00:14:45 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2002
|
2011-08-04 18:45:45 +02:00
|
|
|
* Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
|
2002-11-18 00:14:45 +00:00
|
|
|
*
|
2013-07-08 09:37:19 +02:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2002-11-18 00:14:45 +00:00
|
|
|
*/
|
|
|
|
|
2003-03-12 10:41:04 +00:00
|
|
|
#ifndef _U_BOOT_I386_H_
|
|
|
|
#define _U_BOOT_I386_H_ 1
|
2002-11-18 00:14:45 +00:00
|
|
|
|
|
|
|
/* cpu/.../cpu.c */
|
2014-11-06 13:20:06 -07:00
|
|
|
int arch_cpu_init(void);
|
2011-02-12 15:11:35 +11:00
|
|
|
int x86_cpu_init_f(void);
|
2009-11-24 20:04:21 +11:00
|
|
|
int cpu_init_f(void);
|
2011-12-31 22:58:15 +11:00
|
|
|
void init_gd(gd_t *id, u64 *gdt_addr);
|
|
|
|
void setup_gdt(gd_t *id, u64 *gdt_addr);
|
2011-12-27 22:46:43 +11:00
|
|
|
int init_cache(void);
|
2012-10-20 12:33:10 +00:00
|
|
|
int cleanup_before_linux(void);
|
2013-04-17 16:13:34 +00:00
|
|
|
void panic_puts(const char *str);
|
2009-02-24 21:14:45 +11:00
|
|
|
|
|
|
|
/* cpu/.../timer.c */
|
|
|
|
void timer_isr(void *);
|
|
|
|
typedef void (timer_fnc_t) (void);
|
|
|
|
int register_timer_isr (timer_fnc_t *isr_func);
|
2013-04-17 16:13:36 +00:00
|
|
|
unsigned long get_tbclk_mhz(void);
|
|
|
|
void timer_set_base(uint64_t base);
|
2013-04-17 16:13:39 +00:00
|
|
|
int pcat_timer_init(void);
|
2009-02-24 21:14:45 +11:00
|
|
|
|
2009-02-24 21:13:40 +11:00
|
|
|
/* cpu/.../interrupts.c */
|
|
|
|
int cpu_init_interrupts(void);
|
|
|
|
|
2014-11-06 13:20:08 -07:00
|
|
|
int cleanup_before_linux(void);
|
|
|
|
int x86_cleanup_before_linux(void);
|
|
|
|
void x86_enable_caches(void);
|
|
|
|
void x86_disable_caches(void);
|
|
|
|
int x86_init_cache(void);
|
|
|
|
void reset_cpu(ulong addr);
|
|
|
|
ulong board_get_usable_ram_top(ulong total_size);
|
|
|
|
void dram_init_banksize(void);
|
2014-11-10 18:00:26 -07:00
|
|
|
int default_print_cpuinfo(void);
|
2014-11-06 13:20:08 -07:00
|
|
|
|
2015-01-27 22:13:42 -07:00
|
|
|
/* Set up a UART which can be used with printch(), printhex8(), etc. */
|
|
|
|
int setup_early_uart(void);
|
|
|
|
|
2010-04-24 00:05:48 +10:00
|
|
|
void setup_pcat_compatibility(void);
|
|
|
|
|
2003-05-31 18:35:21 +00:00
|
|
|
void isa_unmap_rom(u32 addr);
|
|
|
|
u32 isa_map_rom(u32 bus_addr, int size);
|
|
|
|
|
2011-04-13 19:43:28 +10:00
|
|
|
/* arch/x86/lib/... */
|
2003-05-31 18:35:21 +00:00
|
|
|
int video_bios_init(void);
|
2002-11-18 00:14:45 +00:00
|
|
|
|
2012-01-01 15:06:39 +11:00
|
|
|
void board_init_f_r_trampoline(ulong) __attribute__ ((noreturn));
|
|
|
|
void board_init_f_r(void) __attribute__ ((noreturn));
|
2002-11-18 00:14:45 +00:00
|
|
|
|
2015-04-24 18:10:06 +08:00
|
|
|
int arch_misc_init(void);
|
|
|
|
|
2012-10-23 18:04:32 +00:00
|
|
|
/* Read the time stamp counter */
|
2013-06-11 11:14:52 -07:00
|
|
|
static inline __attribute__((no_instrument_function)) uint64_t rdtsc(void)
|
2012-10-23 18:04:32 +00:00
|
|
|
{
|
|
|
|
uint32_t high, low;
|
|
|
|
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high));
|
|
|
|
return (((uint64_t)high) << 32) | low;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* board/... */
|
|
|
|
void timer_set_tsc_base(uint64_t new_base);
|
|
|
|
uint64_t timer_get_tsc(void);
|
|
|
|
|
2014-11-12 22:42:28 -07:00
|
|
|
void quick_ram_check(void);
|
|
|
|
|
2015-04-29 22:26:01 -06:00
|
|
|
int x86_init_cpus(void);
|
|
|
|
|
2014-12-29 19:32:24 -07:00
|
|
|
#define PCI_VGA_RAM_IMAGE_START 0xc0000
|
|
|
|
|
2003-03-12 10:41:04 +00:00
|
|
|
#endif /* _U_BOOT_I386_H_ */
|