Author: myles
Date: 2009-10-27 15:29:29 +0100 (Tue, 27 Oct 2009)
New Revision: 4871

Modified:
   trunk/coreboot-v2/src/arch/i386/boot/gdt.c
   trunk/coreboot-v2/src/arch/i386/boot/tables.c
   trunk/coreboot-v2/src/arch/i386/include/div64.h
   trunk/coreboot-v2/src/arch/i386/lib/exception.c
   trunk/coreboot-v2/src/arch/i386/lib/printk_init.c
   trunk/coreboot-v2/src/boot/hardwaremain.c
   trunk/coreboot-v2/src/devices/device_util.c
   trunk/coreboot-v2/src/include/cbmem.h
   trunk/coreboot-v2/src/include/cpu/x86/mtrr.h
   trunk/coreboot-v2/src/include/cpu/x86/tsc.h
   trunk/coreboot-v2/src/include/device/device.h
   trunk/coreboot-v2/src/lib/cbmem.c
   trunk/coreboot-v2/src/lib/clog2.c
   trunk/coreboot-v2/src/lib/lzma.c
   trunk/coreboot-v2/src/pc80/mc146818rtc.c
   trunk/coreboot-v2/src/pc80/udelay_io.c
   trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb.h
   trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb_isa.c
   trunk/coreboot-v2/util/x86emu/x86.c
   trunk/coreboot-v2/util/x86emu/x86_interrupts.c
Log:
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 <[email protected]>
Acked-by: Myles Watson <[email protected]>


Modified: trunk/coreboot-v2/src/arch/i386/boot/gdt.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/gdt.c  2009-10-27 14:05:21 UTC (rev 
4870)
+++ trunk/coreboot-v2/src/arch/i386/boot/gdt.c  2009-10-27 14:29:29 UTC (rev 
4871)
@@ -33,6 +33,7 @@
 } __attribute__((packed));
 
 // Copy GDT to new location and reload it
+void move_gdt(void);
 void move_gdt(void)
 {
        void *newgdt;

Modified: trunk/coreboot-v2/src/arch/i386/boot/tables.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/boot/tables.c       2009-10-27 14:05:21 UTC 
(rev 4870)
+++ trunk/coreboot-v2/src/arch/i386/boot/tables.c       2009-10-27 14:29:29 UTC 
(rev 4871)
@@ -34,8 +34,6 @@
 uint64_t high_tables_base = 0;
 uint64_t high_tables_size;
 
-void cbmem_list(void);
-
 void move_gdt(void);
 void cbmem_arch_init(void)
 {

Modified: trunk/coreboot-v2/src/arch/i386/include/div64.h
===================================================================
--- trunk/coreboot-v2/src/arch/i386/include/div64.h     2009-10-27 14:05:21 UTC 
(rev 4870)
+++ trunk/coreboot-v2/src/arch/i386/include/div64.h     2009-10-27 14:29:29 UTC 
(rev 4871)
@@ -36,6 +36,9 @@
 #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
 div_ll_X_l_rem(long long divs, long div, long *rem)
 {
        long dum2;

Modified: trunk/coreboot-v2/src/arch/i386/lib/exception.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/lib/exception.c     2009-10-27 14:05:21 UTC 
(rev 4870)
+++ trunk/coreboot-v2/src/arch/i386/lib/exception.c     2009-10-27 14:29:29 UTC 
(rev 4871)
@@ -361,6 +361,8 @@
 
 #include <arch/registers.h>
 
+void x86_exception(struct eregs *info);
+
 void x86_exception(struct eregs *info)
 {
 #if CONFIG_GDB_STUB == 1

Modified: trunk/coreboot-v2/src/arch/i386/lib/printk_init.c
===================================================================
--- trunk/coreboot-v2/src/arch/i386/lib/printk_init.c   2009-10-27 14:05:21 UTC 
(rev 4870)
+++ trunk/coreboot-v2/src/arch/i386/lib/printk_init.c   2009-10-27 14:29:29 UTC 
(rev 4871)
@@ -32,6 +32,9 @@
 #define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
 #endif
 
+void console_tx_byte(unsigned char byte);
+int do_printk(int msg_level, const char *fmt, ...);
+
 void console_tx_byte(unsigned char byte)
 {
        if (byte == '\n')

Modified: trunk/coreboot-v2/src/boot/hardwaremain.c
===================================================================
--- trunk/coreboot-v2/src/boot/hardwaremain.c   2009-10-27 14:05:21 UTC (rev 
4870)
+++ trunk/coreboot-v2/src/boot/hardwaremain.c   2009-10-27 14:29:29 UTC (rev 
4871)
@@ -52,6 +52,8 @@
  *     In the dev_enumerate() phase, 
  */
 
+void hardwaremain(int boot_complete);
+
 void hardwaremain(int boot_complete)
 {
        struct lb_memory *lb_mem;

Modified: trunk/coreboot-v2/src/devices/device_util.c
===================================================================
--- trunk/coreboot-v2/src/devices/device_util.c 2009-10-27 14:05:21 UTC (rev 
4870)
+++ trunk/coreboot-v2/src/devices/device_util.c 2009-10-27 14:29:29 UTC (rev 
4871)
@@ -556,7 +556,7 @@
        }
 }
 
-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;
        struct device *child;

Modified: trunk/coreboot-v2/src/include/cbmem.h
===================================================================
--- trunk/coreboot-v2/src/include/cbmem.h       2009-10-27 14:05:21 UTC (rev 
4870)
+++ trunk/coreboot-v2/src/include/cbmem.h       2009-10-27 14:29:29 UTC (rev 
4871)
@@ -45,5 +45,7 @@
 int cbmem_reinit(u64 baseaddr);
 void *cbmem_add(u32 id, u64 size);
 void *cbmem_find(u32 id);
+void cbmem_list(void);
+void cbmem_arch_init(void);
 
 #endif

Modified: trunk/coreboot-v2/src/include/cpu/x86/mtrr.h
===================================================================
--- trunk/coreboot-v2/src/include/cpu/x86/mtrr.h        2009-10-27 14:05:21 UTC 
(rev 4870)
+++ trunk/coreboot-v2/src/include/cpu/x86/mtrr.h        2009-10-27 14:29:29 UTC 
(rev 4871)
@@ -34,10 +34,14 @@
 
 #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_mtrrs(unsigned address_bits);
 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__ */
 

Modified: trunk/coreboot-v2/src/include/cpu/x86/tsc.h
===================================================================
--- trunk/coreboot-v2/src/include/cpu/x86/tsc.h 2009-10-27 14:05:21 UTC (rev 
4870)
+++ trunk/coreboot-v2/src/include/cpu/x86/tsc.h 2009-10-27 14:29:29 UTC (rev 
4871)
@@ -24,6 +24,8 @@
        asm volatile ("rdtsc" : "=A" (val));
        return val;
 }
+
+void init_timer(void);
 #endif
 
 

Modified: trunk/coreboot-v2/src/include/device/device.h
===================================================================
--- trunk/coreboot-v2/src/include/device/device.h       2009-10-27 14:05:21 UTC 
(rev 4870)
+++ trunk/coreboot-v2/src/include/device/device.h       2009-10-27 14:29:29 UTC 
(rev 4871)
@@ -132,6 +132,7 @@
 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_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,
                       struct resource *resource, const char *comment);
 void show_all_devs_resources(int debug_level, const char* msg);
@@ -152,4 +153,5 @@
 void root_dev_enable_resources(device_t dev);
 unsigned int root_dev_scan_bus(device_t root, unsigned int max);
 void root_dev_init(device_t dev);
+void root_dev_reset(struct bus *bus);
 #endif /* DEVICE_H */

Modified: trunk/coreboot-v2/src/lib/cbmem.c
===================================================================
--- trunk/coreboot-v2/src/lib/cbmem.c   2009-10-27 14:05:21 UTC (rev 4870)
+++ trunk/coreboot-v2/src/lib/cbmem.c   2009-10-27 14:29:29 UTC (rev 4871)
@@ -90,7 +90,7 @@
        struct cbmem_entry *cbmem_toc;
        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__
        bss_cbmem_toc = cbmem_toc;
 #endif
@@ -212,7 +212,7 @@
 #endif
        
        if (cbmem_toc == NULL)
-               return NULL;
+               return;
 
        for (i = 0; i < MAX_CBMEM_ENTRIES; i++) {
 

Modified: trunk/coreboot-v2/src/lib/clog2.c
===================================================================
--- trunk/coreboot-v2/src/lib/clog2.c   2009-10-27 14:05:21 UTC (rev 4870)
+++ trunk/coreboot-v2/src/lib/clog2.c   2009-10-27 14:29:29 UTC (rev 4871)
@@ -7,6 +7,8 @@
 /* Assume 8 bits per byte */
 #define CHAR_BIT 8
 
+unsigned long log2(unsigned long x);
+
 unsigned long log2(unsigned long x)
 {
         // assume 8 bits per byte.

Modified: trunk/coreboot-v2/src/lib/lzma.c
===================================================================
--- trunk/coreboot-v2/src/lib/lzma.c    2009-10-27 14:05:21 UTC (rev 4870)
+++ trunk/coreboot-v2/src/lib/lzma.c    2009-10-27 14:29:29 UTC (rev 4871)
@@ -14,6 +14,7 @@
 #include <console/console.h>
 #include <string.h>
 
+unsigned long ulzma(unsigned char * src, unsigned char * dst);
 
 unsigned long ulzma(unsigned char * src, unsigned char * dst)
 {

Modified: trunk/coreboot-v2/src/pc80/mc146818rtc.c
===================================================================
--- trunk/coreboot-v2/src/pc80/mc146818rtc.c    2009-10-27 14:05:21 UTC (rev 
4870)
+++ trunk/coreboot-v2/src/pc80/mc146818rtc.c    2009-10-27 14:29:29 UTC (rev 
4871)
@@ -133,8 +133,10 @@
 
 void rtc_init(int invalid)
 {
+#if CONFIG_HAVE_OPTION_TABLE
        unsigned char x;
        int cmos_invalid, checksum_invalid;
+#endif
 
        printk_debug("RTC Init\n");
 

Modified: trunk/coreboot-v2/src/pc80/udelay_io.c
===================================================================
--- trunk/coreboot-v2/src/pc80/udelay_io.c      2009-10-27 14:05:21 UTC (rev 
4870)
+++ trunk/coreboot-v2/src/pc80/udelay_io.c      2009-10-27 14:29:29 UTC (rev 
4871)
@@ -1,4 +1,5 @@
 #include <arch/io.h>
+#include <delay.h>
 
 void udelay(unsigned usecs)
 {

Modified: trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb.h
===================================================================
--- trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb.h 2009-10-27 
14:05:21 UTC (rev 4870)
+++ trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb.h 2009-10-27 
14:29:29 UTC (rev 4871)
@@ -24,6 +24,7 @@
 #ifndef __ROMCC__
 #include "chip.h"
 void i82371eb_enable(device_t dev);
+void i82371eb_hard_reset(void);
 #endif
 
 /* If 'cond' is true this macro sets the bit(s) specified by 'bits' in the

Modified: trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb_isa.c
===================================================================
--- trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb_isa.c     
2009-10-27 14:05:21 UTC (rev 4870)
+++ trunk/coreboot-v2/src/southbridge/intel/i82371eb/i82371eb_isa.c     
2009-10-27 14:29:29 UTC (rev 4871)
@@ -29,7 +29,6 @@
 
 static void isa_init(struct device *dev)
 {
-       u16 reg16;
        u32 reg32;
 
        /* Initialize the real time clock (RTC). */

Modified: trunk/coreboot-v2/util/x86emu/x86.c
===================================================================
--- trunk/coreboot-v2/util/x86emu/x86.c 2009-10-27 14:05:21 UTC (rev 4870)
+++ trunk/coreboot-v2/util/x86emu/x86.c 2009-10-27 14:29:29 UTC (rev 4871)
@@ -36,6 +36,7 @@
 };
 
 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 __realmode_code, __realmode_code_size;
@@ -124,8 +125,6 @@
 
 void run_bios(struct device *dev, unsigned long addr)
 {
-       int i;
-
        /* clear vga bios data area */
        memset(0x400, 0, 0x200);
        

Modified: trunk/coreboot-v2/util/x86emu/x86_interrupts.c
===================================================================
--- trunk/coreboot-v2/util/x86emu/x86_interrupts.c      2009-10-27 14:05:21 UTC 
(rev 4870)
+++ trunk/coreboot-v2/util/x86emu/x86_interrupts.c      2009-10-27 14:29:29 UTC 
(rev 4871)
@@ -51,6 +51,10 @@
        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)
 {
        regs->eax = 64 * 1024;


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to