summaryrefslogtreecommitdiff
path: root/hw/sun4u.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-18 18:33:18 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-18 18:33:18 +0000
commit905fdcb5264c7b0ed2896dc042e6fe3dd0e25952 (patch)
tree9f954284652adf218ba215af7e9362dfd90359a9 /hw/sun4u.c
parent084a197a2026d3cc523c61c42d9425cadcddf81b (diff)
downloadqemu-905fdcb5264c7b0ed2896dc042e6fe3dd0e25952.tar.gz
qemu-905fdcb5264c7b0ed2896dc042e6fe3dd0e25952.tar.bz2
qemu-905fdcb5264c7b0ed2896dc042e6fe3dd0e25952.zip
Add common keys to firmware configuration
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5260 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r--hw/sun4u.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 82ead816e6..00dac2d03e 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -49,6 +49,7 @@
struct hwdef {
const char * const default_cpu_model;
+ uint16_t machine_id;
};
int DMA_get_channel_mode (int nchan)
@@ -420,16 +421,25 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size,
fw_cfg = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0);
fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1);
+ fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
+ fw_cfg_add_i16(fw_cfg, FW_CFG_MACHINE_ID, hwdef->machine_id);
}
+enum {
+ sun4u_id = 0,
+ sun4v_id = 64,
+};
+
static const struct hwdef hwdefs[] = {
/* Sun4u generic PC-like machine */
{
.default_cpu_model = "TI UltraSparc II",
+ .machine_id = sun4u_id,
},
/* Sun4v generic PC-like machine */
{
.default_cpu_model = "Sun UltraSparc T1",
+ .machine_id = sun4v_id,
},
};