~ubuntu-branches/ubuntu/intrepid/xen-3.3/intrepid-updates

« back to all changes in this revision

Viewing changes to tools/ioemu/patches/qemu-nobios

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-08-14 10:28:57 UTC
  • Revision ID: james.westby@ubuntu.com-20080814102857-a832fn5gowurz5do
Tags: upstream-3.3.0
ImportĀ upstreamĀ versionĀ 3.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: ioemu/hw/pc.c
 
2
===================================================================
 
3
--- ioemu.orig/hw/pc.c  2007-05-03 19:09:34.000000000 +0100
 
4
+++ ioemu/hw/pc.c       2007-05-03 19:11:08.000000000 +0100
 
5
@@ -446,6 +446,8 @@
 
6
     nb_ne2k++;
 
7
 }
 
8
 
 
9
+#define NOBIOS 1
 
10
+
 
11
 /* PC hardware initialisation */
 
12
 static void pc_init1(uint64_t ram_size, int vga_ram_size, int boot_device,
 
13
                      DisplayState *ds, const char **fd_filename, int snapshot,
 
14
@@ -453,10 +455,15 @@
 
15
                      const char *initrd_filename,
 
16
                      int pci_enabled)
 
17
 {
 
18
+#ifndef NOBIOS
 
19
     char buf[1024];
 
20
-    int ret, linux_boot, initrd_size, i;
 
21
+    int ret, initrd_size;
 
22
+#endif /* !NOBIOS */
 
23
+    int linux_boot, i;
 
24
+#ifndef NOBIOS
 
25
     unsigned long bios_offset, vga_bios_offset, option_rom_offset;
 
26
     int bios_size, isa_bios_size;
 
27
+#endif /* !NOBIOS */
 
28
     PCIBus *pci_bus;
 
29
     int piix3_devfn = -1;
 
30
     CPUState *env;
 
31
@@ -489,6 +496,7 @@
 
32
     cpu_register_physical_memory(0, ram_size, 0);
 
33
 #endif
 
34
 
 
35
+#ifndef NOBIOS
 
36
     /* BIOS load */
 
37
     bios_offset = ram_size + vga_ram_size;
 
38
     vga_bios_offset = bios_offset + 256 * 1024;
 
39
@@ -514,6 +522,7 @@
 
40
         snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME);
 
41
     }
 
42
     ret = load_image(buf, phys_ram_base + vga_bios_offset);
 
43
+#endif /* !NOBIOS */
 
44
     
 
45
     /* setup basic memory access */
 
46
 #ifndef CONFIG_DM              /* HVM domain owns memory */
 
47
@@ -521,6 +530,7 @@
 
48
                                  vga_bios_offset | IO_MEM_ROM);
 
49
 #endif
 
50
 
 
51
+#ifndef NOBIOS
 
52
     /* map the last 128KB of the BIOS in ISA space */
 
53
     isa_bios_size = bios_size;
 
54
     if (isa_bios_size > (128 * 1024))
 
55
@@ -550,6 +560,7 @@
 
56
     /* map all the bios at the top of memory */
 
57
     cpu_register_physical_memory((uint32_t)(-bios_size), 
 
58
                                  bios_size, bios_offset | IO_MEM_ROM);
 
59
+#endif
 
60
     
 
61
     bochs_bios_init();
 
62