Add few missing prototypes, and remove few unused (thus lonelly) variables.
TODO - x86emu need (imo) some common header with prototypes at least - clog2, ulzma, hardwaremain prototypes added by this patch probably should be moved to some header too. - in src/devices/device_util.c prototype is before function because seems, it is used only within same file, if not it should be moved to debug section of prototypes in include/device/device.h Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4871 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
committed by
Myles Watson
parent
18d7c2e31e
commit
ea92185755
@ -33,6 +33,7 @@ struct gdtarg {
|
|||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
// Copy GDT to new location and reload it
|
// Copy GDT to new location and reload it
|
||||||
|
void move_gdt(void);
|
||||||
void move_gdt(void)
|
void move_gdt(void)
|
||||||
{
|
{
|
||||||
void *newgdt;
|
void *newgdt;
|
||||||
|
@ -34,8 +34,6 @@
|
|||||||
uint64_t high_tables_base = 0;
|
uint64_t high_tables_base = 0;
|
||||||
uint64_t high_tables_size;
|
uint64_t high_tables_size;
|
||||||
|
|
||||||
void cbmem_list(void);
|
|
||||||
|
|
||||||
void move_gdt(void);
|
void move_gdt(void);
|
||||||
void cbmem_arch_init(void)
|
void cbmem_arch_init(void)
|
||||||
{
|
{
|
||||||
|
@ -35,6 +35,9 @@
|
|||||||
*/
|
*/
|
||||||
#define div_long_long_rem(a,b,c) div_ll_X_l_rem(a,b,c)
|
#define div_long_long_rem(a,b,c) div_ll_X_l_rem(a,b,c)
|
||||||
|
|
||||||
|
extern inline long
|
||||||
|
div_ll_X_l_rem(long long divs, long div, long *rem);
|
||||||
|
|
||||||
extern inline long
|
extern inline long
|
||||||
div_ll_X_l_rem(long long divs, long div, long *rem)
|
div_ll_X_l_rem(long long divs, long div, long *rem)
|
||||||
{
|
{
|
||||||
|
@ -361,6 +361,8 @@ static void put_packet(char *buffer)
|
|||||||
|
|
||||||
#include <arch/registers.h>
|
#include <arch/registers.h>
|
||||||
|
|
||||||
|
void x86_exception(struct eregs *info);
|
||||||
|
|
||||||
void x86_exception(struct eregs *info)
|
void x86_exception(struct eregs *info)
|
||||||
{
|
{
|
||||||
#if CONFIG_GDB_STUB == 1
|
#if CONFIG_GDB_STUB == 1
|
||||||
|
@ -32,6 +32,9 @@ int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
|
|||||||
#define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
|
#define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void console_tx_byte(unsigned char byte);
|
||||||
|
int do_printk(int msg_level, const char *fmt, ...);
|
||||||
|
|
||||||
void console_tx_byte(unsigned char byte)
|
void console_tx_byte(unsigned char byte)
|
||||||
{
|
{
|
||||||
if (byte == '\n')
|
if (byte == '\n')
|
||||||
|
@ -52,6 +52,8 @@ it with the version available from LANL.
|
|||||||
* In the dev_enumerate() phase,
|
* In the dev_enumerate() phase,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void hardwaremain(int boot_complete);
|
||||||
|
|
||||||
void hardwaremain(int boot_complete)
|
void hardwaremain(int boot_complete)
|
||||||
{
|
{
|
||||||
struct lb_memory *lb_mem;
|
struct lb_memory *lb_mem;
|
||||||
|
@ -556,7 +556,7 @@ void disable_children(struct bus *bus)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void resource_tree(struct device *root, int debug_level, int depth)
|
static void resource_tree(struct device *root, int debug_level, int depth)
|
||||||
{
|
{
|
||||||
int i = 0, link = 0;
|
int i = 0, link = 0;
|
||||||
struct device *child;
|
struct device *child;
|
||||||
|
@ -45,5 +45,7 @@ void cbmem_init(u64 baseaddr, u64 size);
|
|||||||
int cbmem_reinit(u64 baseaddr);
|
int cbmem_reinit(u64 baseaddr);
|
||||||
void *cbmem_add(u32 id, u64 size);
|
void *cbmem_add(u32 id, u64 size);
|
||||||
void *cbmem_find(u32 id);
|
void *cbmem_find(u32 id);
|
||||||
|
void cbmem_list(void);
|
||||||
|
void cbmem_arch_init(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -34,10 +34,14 @@
|
|||||||
|
|
||||||
#if !defined(__ROMCC__) && !defined (ASSEMBLY)
|
#if !defined(__ROMCC__) && !defined (ASSEMBLY)
|
||||||
|
|
||||||
|
#include <device/device.h>
|
||||||
|
|
||||||
|
void enable_fixed_mtrr(void);
|
||||||
void x86_setup_var_mtrrs(unsigned address_bits);
|
void x86_setup_var_mtrrs(unsigned address_bits);
|
||||||
void x86_setup_mtrrs(unsigned address_bits);
|
void x86_setup_mtrrs(unsigned address_bits);
|
||||||
int x86_mtrr_check(void);
|
int x86_mtrr_check(void);
|
||||||
|
void set_var_mtrr_resource(void *gp, struct device *dev, struct resource *res);
|
||||||
|
void x86_setup_fixed_mtrrs(void);
|
||||||
|
|
||||||
#endif /* __ROMCC__ */
|
#endif /* __ROMCC__ */
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ static inline unsigned long long rdtscll(void)
|
|||||||
asm volatile ("rdtsc" : "=A" (val));
|
asm volatile ("rdtsc" : "=A" (val));
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init_timer(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,6 +132,7 @@ void print_resource_tree(struct device * root, int debug_level,
|
|||||||
void show_devs_tree(struct device *dev, int debug_level, int depth, int linknum);
|
void show_devs_tree(struct device *dev, int debug_level, int depth, int linknum);
|
||||||
void show_devs_subtree(struct device *root, int debug_level, const char *msg);
|
void show_devs_subtree(struct device *root, int debug_level, const char *msg);
|
||||||
void show_all_devs(int debug_level, const char *msg);
|
void show_all_devs(int debug_level, const char *msg);
|
||||||
|
void show_all_devs_tree(int debug_level, const char *msg);
|
||||||
void show_one_resource(int debug_level, struct device *dev,
|
void show_one_resource(int debug_level, struct device *dev,
|
||||||
struct resource *resource, const char *comment);
|
struct resource *resource, const char *comment);
|
||||||
void show_all_devs_resources(int debug_level, const char* msg);
|
void show_all_devs_resources(int debug_level, const char* msg);
|
||||||
@ -152,4 +153,5 @@ void enable_childrens_resources(device_t dev);
|
|||||||
void root_dev_enable_resources(device_t dev);
|
void root_dev_enable_resources(device_t dev);
|
||||||
unsigned int root_dev_scan_bus(device_t root, unsigned int max);
|
unsigned int root_dev_scan_bus(device_t root, unsigned int max);
|
||||||
void root_dev_init(device_t dev);
|
void root_dev_init(device_t dev);
|
||||||
|
void root_dev_reset(struct bus *bus);
|
||||||
#endif /* DEVICE_H */
|
#endif /* DEVICE_H */
|
||||||
|
@ -90,7 +90,7 @@ int cbmem_reinit(u64 baseaddr)
|
|||||||
struct cbmem_entry *cbmem_toc;
|
struct cbmem_entry *cbmem_toc;
|
||||||
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
|
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
|
||||||
|
|
||||||
debug("Re-Initializing CBMEM area to 0x%lx\n", baseaddr);
|
debug("Re-Initializing CBMEM area to 0x%lx\n", (unsigned long)baseaddr);
|
||||||
#ifndef __ROMCC__
|
#ifndef __ROMCC__
|
||||||
bss_cbmem_toc = cbmem_toc;
|
bss_cbmem_toc = cbmem_toc;
|
||||||
#endif
|
#endif
|
||||||
@ -212,7 +212,7 @@ void cbmem_list(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (cbmem_toc == NULL)
|
if (cbmem_toc == NULL)
|
||||||
return NULL;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < MAX_CBMEM_ENTRIES; i++) {
|
for (i = 0; i < MAX_CBMEM_ENTRIES; i++) {
|
||||||
|
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
/* Assume 8 bits per byte */
|
/* Assume 8 bits per byte */
|
||||||
#define CHAR_BIT 8
|
#define CHAR_BIT 8
|
||||||
|
|
||||||
|
unsigned long log2(unsigned long x);
|
||||||
|
|
||||||
unsigned long log2(unsigned long x)
|
unsigned long log2(unsigned long x)
|
||||||
{
|
{
|
||||||
// assume 8 bits per byte.
|
// assume 8 bits per byte.
|
||||||
|
@ -14,6 +14,7 @@ SDK 4.42, which is written and distributed to public domain by Igor Pavlov.
|
|||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
unsigned long ulzma(unsigned char * src, unsigned char * dst);
|
||||||
|
|
||||||
unsigned long ulzma(unsigned char * src, unsigned char * dst)
|
unsigned long ulzma(unsigned char * src, unsigned char * dst)
|
||||||
{
|
{
|
||||||
|
@ -133,8 +133,10 @@ static void rtc_set_checksum(int range_start, int range_end, int cks_loc)
|
|||||||
|
|
||||||
void rtc_init(int invalid)
|
void rtc_init(int invalid)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_HAVE_OPTION_TABLE
|
||||||
unsigned char x;
|
unsigned char x;
|
||||||
int cmos_invalid, checksum_invalid;
|
int cmos_invalid, checksum_invalid;
|
||||||
|
#endif
|
||||||
|
|
||||||
printk_debug("RTC Init\n");
|
printk_debug("RTC Init\n");
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
#include <delay.h>
|
||||||
|
|
||||||
void udelay(unsigned usecs)
|
void udelay(unsigned usecs)
|
||||||
{
|
{
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#ifndef __ROMCC__
|
#ifndef __ROMCC__
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
void i82371eb_enable(device_t dev);
|
void i82371eb_enable(device_t dev);
|
||||||
|
void i82371eb_hard_reset(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If 'cond' is true this macro sets the bit(s) specified by 'bits' in the
|
/* If 'cond' is true this macro sets the bit(s) specified by 'bits' in the
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
static void isa_init(struct device *dev)
|
static void isa_init(struct device *dev)
|
||||||
{
|
{
|
||||||
u16 reg16;
|
|
||||||
u32 reg32;
|
u32 reg32;
|
||||||
|
|
||||||
/* Initialize the real time clock (RTC). */
|
/* Initialize the real time clock (RTC). */
|
||||||
|
@ -36,6 +36,7 @@ struct realmode_idt {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void x86_exception(struct eregs *info);
|
void x86_exception(struct eregs *info);
|
||||||
|
void run_bios(struct device *dev, unsigned long addr);
|
||||||
|
|
||||||
extern unsigned char __idt_handler, __idt_handler_size;
|
extern unsigned char __idt_handler, __idt_handler_size;
|
||||||
extern unsigned char __realmode_code, __realmode_code_size;
|
extern unsigned char __realmode_code, __realmode_code_size;
|
||||||
@ -124,8 +125,6 @@ static void setup_realmode_idt(void)
|
|||||||
|
|
||||||
void run_bios(struct device *dev, unsigned long addr)
|
void run_bios(struct device *dev, unsigned long addr)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
/* clear vga bios data area */
|
/* clear vga bios data area */
|
||||||
memset(0x400, 0, 0x200);
|
memset(0x400, 0, 0x200);
|
||||||
|
|
||||||
|
@ -51,6 +51,10 @@ enum {
|
|||||||
PCIBIOS_BADREG = 0x8700
|
PCIBIOS_BADREG = 0x8700
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int int12_handler(struct eregs *regs);
|
||||||
|
int int1a_handler(struct eregs *regs);
|
||||||
|
int int15_handler(struct eregs *regs);
|
||||||
|
|
||||||
int int12_handler(struct eregs *regs)
|
int int12_handler(struct eregs *regs)
|
||||||
{
|
{
|
||||||
regs->eax = 64 * 1024;
|
regs->eax = 64 * 1024;
|
||||||
|
Reference in New Issue
Block a user