Author: libv
Date: 2009-05-27 13:39:16 +0200 (Wed, 27 May 2009)
New Revision: 4312

Added:
   trunk/coreboot-v2/util/vgabios/helper_exec.h
Modified:
   trunk/coreboot-v2/util/vgabios/Makefile
   trunk/coreboot-v2/util/vgabios/helper_exec.c
   trunk/coreboot-v2/util/vgabios/helper_mem.c
   trunk/coreboot-v2/util/vgabios/pci-userspace.c
   trunk/coreboot-v2/util/vgabios/testbios.c
   trunk/coreboot-v2/util/vgabios/x86emu/include/x86emu/regs.h
   trunk/coreboot-v2/util/vgabios/x86emu/src/x86emu/sys.c
Log:
util/vgabios: build/warning fixes.

Signed-off-by: Luc Verhaegen <[email protected]>
Acked-by: Stefan Reinauer <[email protected]>

Modified: trunk/coreboot-v2/util/vgabios/Makefile
===================================================================
--- trunk/coreboot-v2/util/vgabios/Makefile     2009-05-26 19:39:14 UTC (rev 
4311)
+++ trunk/coreboot-v2/util/vgabios/Makefile     2009-05-27 11:39:16 UTC (rev 
4312)
@@ -7,12 +7,8 @@
 #
 
 CC       =  gcc
-CFLAGS   =  -Wall -Ix86emu/include -O2 -g \
-               -DLIBPCI_MAJOR_VERSION=2  \
-               -DLIBPCI_MINOR_VERSION=1  \
-               -DLIBPCI_MICRO_VERSION=11
+CFLAGS   =  -Wall -Ix86emu/include -O2 -g
 
-
 INTOBJS  =  int10.o int15.o int16.o int1a.o inte6.o
 OBJECTS  =  testbios.o helper_exec.o helper_mem.o $(INTOBJS)
 
@@ -20,12 +16,11 @@
 
 # user space pci is the only option right now.
 OBJECTS += pci-userspace.o
-LIBS    +=  /usr/lib/libpci.a
 
 all: testbios
 
 testbios: $(OBJECTS) $(LIBS)
-       $(CC) -o testbios $(OBJECTS) $(LIBS)
+       $(CC) -o testbios $(OBJECTS) $(LIBS) -lpci
  
 helper_exec.o: helper_exec.c test.h
 

Modified: trunk/coreboot-v2/util/vgabios/helper_exec.c
===================================================================
--- trunk/coreboot-v2/util/vgabios/helper_exec.c        2009-05-26 19:39:14 UTC 
(rev 4311)
+++ trunk/coreboot-v2/util/vgabios/helper_exec.c        2009-05-27 11:39:16 UTC 
(rev 4312)
@@ -15,10 +15,13 @@
  * on PIO.
  */
 #include <x86emu.h>
+#include "helper_exec.h"
 #include "test.h"
-#include <asm/io.h>
+#include <sys/io.h>
 #include <sys/time.h>
+#include <stdio.h>
 
+
 int port_rep_inb(u16 port, u32 base, int d_f, u32 count);
 u8 x_inb(u16 port);
 u16 x_inw(u16 port);

Added: trunk/coreboot-v2/util/vgabios/helper_exec.h
===================================================================
--- trunk/coreboot-v2/util/vgabios/helper_exec.h                                
(rev 0)
+++ trunk/coreboot-v2/util/vgabios/helper_exec.h        2009-05-27 11:39:16 UTC 
(rev 4312)
@@ -0,0 +1,2 @@
+u32 getIntVect(int num);
+int run_bios_int(int num);

Modified: trunk/coreboot-v2/util/vgabios/helper_mem.c
===================================================================
--- trunk/coreboot-v2/util/vgabios/helper_mem.c 2009-05-26 19:39:14 UTC (rev 
4311)
+++ trunk/coreboot-v2/util/vgabios/helper_mem.c 2009-05-27 11:39:16 UTC (rev 
4312)
@@ -4,6 +4,8 @@
  *   execute BIOS int 10h calls in x86 real mode environment
  *                 Copyright 1999 Egbert Eich
  */
+#include <stdio.h>
+
 #define _INT10_PRIVATE
 
 #define REG pInt
@@ -35,7 +37,7 @@
                        printf("%2.2x ", (unsigned char) (*(c++)));
                c = d;
                for (i = 0; i < 16; i++) {
-                       printf("%c", ((((u8) (*c)) > 32) && (((u8) (*c)) < 
128)) ?
+                       printf("%c", ((((unsigned char) (*c)) > 32) && 
(((unsigned char) (*c)) < 128)) ?
                               (unsigned char) (*(c)) : '.');
                        c++;
                }
@@ -122,7 +124,7 @@
         * 64kB.  Note that because this data doesn't survive POST, int 0x42 
should
         * only be used during EGA/VGA BIOS initialisation.
         */
-       static const u8 VideoParms[] = {
+       static const unsigned char VideoParms[] = {
                /* Timing for modes 0x00 & 0x01 */
                0x38, 0x28, 0x2d, 0x0a, 0x1f, 0x06, 0x19, 0x1c,
                0x02, 0x07, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00,

Modified: trunk/coreboot-v2/util/vgabios/pci-userspace.c
===================================================================
--- trunk/coreboot-v2/util/vgabios/pci-userspace.c      2009-05-26 19:39:14 UTC 
(rev 4311)
+++ trunk/coreboot-v2/util/vgabios/pci-userspace.c      2009-05-27 11:39:16 UTC 
(rev 4312)
@@ -2,11 +2,16 @@
 #include <pci/pci.h>
 #include "pci.h"
 
+#ifdef PCI_LIB_VERSION
 #define LIBPCI_CHECK_VERSION(major,minor,micro) \
+    ((((major) << 16) | ((minor) << 8) | (micro)) <= PCI_LIB_VERSION)
+#else
+#define LIBPCI_CHECK_VERSION(major,minor,micro) \
  ( (LIBPCI_MAJOR_VERSION > (major)) || \
    (LIBPCI_MAJOR_VERSION == (major) && LIBPCI_MINOR_VERSION > (minor)) || \
  (LIBPCI_MAJOR_VERSION == (major) && LIBPCI_MINOR_VERSION == (minor)) && \
  LIBPCI_MICRO_VERSION >= (micro) )
+#endif
 
 #define PCITAG struct pci_filter *
 

Modified: trunk/coreboot-v2/util/vgabios/testbios.c
===================================================================
--- trunk/coreboot-v2/util/vgabios/testbios.c   2009-05-26 19:39:14 UTC (rev 
4311)
+++ trunk/coreboot-v2/util/vgabios/testbios.c   2009-05-27 11:39:16 UTC (rev 
4312)
@@ -11,6 +11,7 @@
 #define warn(x) { perror(x);  }
 
 #include <x86emu.h>
+#include "helper_exec.h"
 #include "test.h"
 #include "pci-userspace.h"
 

Modified: trunk/coreboot-v2/util/vgabios/x86emu/include/x86emu/regs.h
===================================================================
--- trunk/coreboot-v2/util/vgabios/x86emu/include/x86emu/regs.h 2009-05-26 
19:39:14 UTC (rev 4311)
+++ trunk/coreboot-v2/util/vgabios/x86emu/include/x86emu/regs.h 2009-05-27 
11:39:16 UTC (rev 4312)
@@ -300,9 +300,9 @@
 x86                    - X86 registers
 ****************************************************************************/
 typedef struct {
-       unsigned long   mem_base;
-       unsigned long   mem_size;
-       unsigned long   abseg;
+       void *  mem_base;
+       unsigned int    mem_size;
+       void *  abseg;
        void*           private;
        X86EMU_regs             x86;
        } X86EMU_sysEnv;

Modified: trunk/coreboot-v2/util/vgabios/x86emu/src/x86emu/sys.c
===================================================================
--- trunk/coreboot-v2/util/vgabios/x86emu/src/x86emu/sys.c      2009-05-26 
19:39:14 UTC (rev 4311)
+++ trunk/coreboot-v2/util/vgabios/x86emu/src/x86emu/sys.c      2009-05-27 
11:39:16 UTC (rev 4312)
@@ -50,6 +50,7 @@
 #include "xf86_ansic.h"
 #else
 #include <string.h>
+#include <stdio.h>
 #endif
 /*------------------------- Global Variables ------------------------------*/
 
@@ -186,7 +187,7 @@
        u8 *retaddr = 0;
 
        if (addr > M.mem_size - size) {
-               DB(printk("mem_ptr: address %#lx out of range!\n", addr);
+               DB(printk("mem_ptr: address %#x out of range!\n", addr);
                    )
                    HALT_SYS();
        }
@@ -596,11 +597,11 @@
 
 void X86EMU_setMemBase(void *base, size_t size)
 {
-       M.mem_base = (int) base;
+       M.mem_base = base;
        M.mem_size = size;
 }
 
 void X86EMU_setabseg(void *abseg)
 {
-       M.abseg = (unsigned long) abseg;
+       M.abseg = abseg;
 }


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

Reply via email to