print the known cbfs types in cbfstool "usage"
[coreboot.git] / src / northbridge / via / vx800 / vgabios.c
index 2a99b9c4c762103fb302e45c6ac194db9245b664..9425403afd36b2c6e83a6d58702ccbb1a7e53bf3 100644 (file)
@@ -158,6 +158,7 @@ static void real_mode_switch_call_vga(unsigned long devfn)
                                    /* put the stack at the end of page zero. 
                                     * that way we can easily share it between real and protected, 
                                     * since the 16-bit ESP at segment 0 will work for any case. 
+                                    */
                                     /* Setup a stack */
                                    "   mov     $0x0, %ax       \n"
                                    "   mov     %ax, %ss        \n"
@@ -240,6 +241,7 @@ void vga_enable_console()
                                    /* put the stack at the end of page zero. 
                                     * that way we can easily share it between real and protected, 
                                     * since the 16-bit ESP at segment 0 will work for any case. 
+                                    */
                                     /* Setup a stack */
                                    "   mov     $0x0, %ax       \n"
                                    "   mov     %ax, %ss        \n"
@@ -295,12 +297,10 @@ void do_vgabios(void)
 {
        device_t dev;
        unsigned long busdevfn;
-       unsigned int rom = 0;
+       u32 rom;
        unsigned char *buf;
        unsigned int size = 64 * 1024;
        int i;
-       u16 tmp;
-       u8 tmp8;
 
        printk(BIOS_EMERG, "file '%s', line %d\n\n", __FILE__, __LINE__);
 
@@ -320,7 +320,7 @@ void do_vgabios(void)
        /* declare rom address here - keep any config data out of the way
         * of core LXB stuff */
 
-        rom = cbfs_load_optionrom(dev->vendor, dev->device, 0);
+        rom = (u32)cbfs_load_optionrom(dev->vendor, dev->device, 0);
        pci_write_config32(dev, PCI_ROM_ADDRESS, rom | 1);
        printk(BIOS_DEBUG, "rom base: %x\n", rom);
        buf = (unsigned char *)rom;
@@ -338,7 +338,7 @@ void do_vgabios(void)
                if (buf[0] == 0x55 && buf[1] == 0xAA) {
                        busdevfn =
                            (dev->bus->secondary << 8) | dev->path.pci.devfn;
-                       printk(BIOS_DEBUG, "bus/devfn = %#x\n", busdevfn);
+                       printk(BIOS_DEBUG, "bus/devfn = %#lx\n", busdevfn);
                        real_mode_switch_call_vga(busdevfn);
                } else
                        printk(BIOS_DEBUG, "Failed to copy VGA BIOS to 0xc0000\n");
@@ -518,7 +518,7 @@ int biosint(unsigned long intnumber,
                     eax, ebx, ecx, edx);
        printk(BIOS_DEBUG, "biosint: ebp 0x%lx esp 0x%lx edi 0x%lx esi 0x%lx\n",
                     ebp, esp, edi, esi);
-       printk(BIOS_DEBUG, "biosint:  ip 0x%x   cs 0x%x  flags 0x%x\n",
+       printk(BIOS_DEBUG, "biosint:  ip 0x%lx   cs 0x%lx  flags 0x%lx\n",
                     ip, cs, flags);
 
        // cases in a good compiler are just as good as your own tables. 
@@ -527,7 +527,7 @@ int biosint(unsigned long intnumber,
        case 6: case 7: case 8: case 9: case 10:
        case 11: case 12: case 13: case 14: case 15:
                // These are not BIOS service, but the CPU-generated exceptions
-               printk(BIOS_INFO, "biosint: Oops, exception %u\n", intnumber);
+               printk(BIOS_INFO, "biosint: Oops, exception %lu\n", intnumber);
                if (esp < 0x1000) {
                        printk(BIOS_DEBUG, "Stack contents: ");
                        while (esp < 0x1000) {
@@ -556,7 +556,7 @@ int biosint(unsigned long intnumber,
                                  &ebx, &edx, &ecx, &eax, &flags);
                break;
        default:
-               printk(BIOS_INFO, "BIOSINT: Unsupport int #0x%x\n", intnumber);
+               printk(BIOS_INFO, "BIOSINT: Unsupport int #0x%lx\n", intnumber);
                break;
        }
        if (ret)
@@ -619,7 +619,7 @@ void setup_realmode_idt(void)
           TF bit is set upon call to real mode */
        idts[1].cs = 0;
        idts[1].offset = 16384;
-       memcpy(16384, &debughandle, &end_debughandle - &debughandle);
+       memcpy((void *)16384, &debughandle, &end_debughandle - &debughandle);
 
 }
 
@@ -646,15 +646,7 @@ pcibios(unsigned long *pedi, unsigned long *pesi, unsigned long *pebp,
        unsigned long *pesp, unsigned long *pebx, unsigned long *pedx,
        unsigned long *pecx, unsigned long *peax, unsigned long *pflags)
 {
-       unsigned long edi = *pedi;
-       unsigned long esi = *pesi;
-       unsigned long ebp = *pebp;
-       unsigned long esp = *pesp;
-       unsigned long ebx = *pebx;
-       unsigned long edx = *pedx;
-       unsigned long ecx = *pecx;
        unsigned long eax = *peax;
-       unsigned long flags = *pflags;
        unsigned short func = (unsigned short)eax;
        int retval = 0;
        unsigned short devid, vendorid, devfn;