pc_piix/pc_sysfw: enable flash by default
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 22 Feb 2012 07:18:56 +0000 (23:18 -0800)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 22 Feb 2012 15:02:18 +0000 (09:02 -0600)
Now, the pc-sysfw:rom_only property will default
to false which enables flash by default.

All pc types below pc-1.1 set rom_only to true.
This prevents flash from being enabled on these
pc machine types.

For pc-1.1 rom_only will use the default (false),
which will allow flash to be used for pc-1.1.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pc_piix.c
hw/pc_sysfw.c

index fcf0153..fe7a729 100644 (file)
@@ -385,6 +385,14 @@ static QEMUMachine pc_machine_v1_0 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .compat_props = (GlobalProperty[]) {
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
+        { /* end of list */ }
+    },
 };
 
 static QEMUMachine pc_machine_v0_15 = {
@@ -392,6 +400,14 @@ static QEMUMachine pc_machine_v0_15 = {
     .desc = "Standard PC",
     .init = pc_init_pci,
     .max_cpus = 255,
+    .compat_props = (GlobalProperty[]) {
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
+        { /* end of list */ }
+    },
 };
 
 static QEMUMachine pc_machine_v0_14 = {
@@ -425,6 +441,11 @@ static QEMUMachine pc_machine_v0_14 = {
             .property = "event_idx",
             .value    = "off",
         },
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
         { /* end of list */ }
     },
 };
@@ -472,6 +493,11 @@ static QEMUMachine pc_machine_v0_13 = {
             .property = "use_broken_id",
             .value    = stringify(1),
         },
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
         { /* end of list */ }
     },
 };
@@ -523,6 +549,11 @@ static QEMUMachine pc_machine_v0_12 = {
             .property = "use_broken_id",
             .value    = stringify(1),
         },
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
         { /* end of list */ }
     }
 };
@@ -582,6 +613,11 @@ static QEMUMachine pc_machine_v0_11 = {
             .property = "use_broken_id",
             .value    = stringify(1),
         },
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
         { /* end of list */ }
     }
 };
@@ -653,6 +689,11 @@ static QEMUMachine pc_machine_v0_10 = {
             .property = "use_broken_id",
             .value    = stringify(1),
         },
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
         { /* end of list */ }
     },
 };
@@ -662,6 +703,14 @@ static QEMUMachine isapc_machine = {
     .desc = "ISA-only PC",
     .init = pc_init_isa,
     .max_cpus = 1,
+    .compat_props = (GlobalProperty[]) {
+        {
+            .driver   = "pc-sysfw",
+            .property = "rom_only",
+            .value    = stringify(1),
+        },
+        { /* end of list */ }
+    },
 };
 
 #ifdef CONFIG_XEN
index 972706c..abf9004 100644 (file)
@@ -226,7 +226,7 @@ void pc_system_firmware_init(MemoryRegion *rom_memory)
 }
 
 static Property pcsysfw_properties[] = {
-    DEFINE_PROP_UINT8("rom_only", PcSysFwDevice, rom_only, 1),
+    DEFINE_PROP_UINT8("rom_only", PcSysFwDevice, rom_only, 0),
     DEFINE_PROP_END_OF_LIST(),
 };