aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-12-27 18:25:49 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-12-27 18:25:49 +0000
commit6bb4ca57a15ab9458ce8821572def6758131d8b9 (patch)
treec963fe0eb3e6e16ed78b0c8eb2ed97161421224d
parentff44c2f3c80dcdec7fe1ba8853ab9c03e6e37f7e (diff)
downloadqemu-6bb4ca57a15ab9458ce8821572def6758131d8b9.zip
qemu-6bb4ca57a15ab9458ce8821572def6758131d8b9.tar.gz
qemu-6bb4ca57a15ab9458ce8821572def6758131d8b9.tar.bz2
sparc: make command line available also via firmware configuration device
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--hw/sun4m.c9
-rw-r--r--hw/sun4u.c3
2 files changed, 12 insertions, 0 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 7db00b8..ad1efb1 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -917,6 +917,9 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
if (kernel_cmdline) {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, CMDLINE_ADDR);
pstrcpy_targphys("cmdline", CMDLINE_ADDR, TARGET_PAGE_SIZE, kernel_cmdline);
+ fw_cfg_add_bytes(fw_cfg, FW_CFG_CMDLINE_DATA,
+ (uint8_t*)strdup(kernel_cmdline),
+ strlen(kernel_cmdline) + 1);
} else {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, 0);
}
@@ -1500,6 +1503,9 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size,
if (kernel_cmdline) {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, CMDLINE_ADDR);
pstrcpy_targphys("cmdline", CMDLINE_ADDR, TARGET_PAGE_SIZE, kernel_cmdline);
+ fw_cfg_add_bytes(fw_cfg, FW_CFG_CMDLINE_DATA,
+ (uint8_t*)strdup(kernel_cmdline),
+ strlen(kernel_cmdline) + 1);
} else {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, 0);
}
@@ -1688,6 +1694,9 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
if (kernel_cmdline) {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, CMDLINE_ADDR);
pstrcpy_targphys("cmdline", CMDLINE_ADDR, TARGET_PAGE_SIZE, kernel_cmdline);
+ fw_cfg_add_bytes(fw_cfg, FW_CFG_CMDLINE_DATA,
+ (uint8_t*)strdup(kernel_cmdline),
+ strlen(kernel_cmdline) + 1);
} else {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, 0);
}
diff --git a/hw/sun4u.c b/hw/sun4u.c
index a7a227b..5cd67ee 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -652,6 +652,9 @@ static void sun4uv_init(ram_addr_t RAM_size,
if (kernel_cmdline) {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, CMDLINE_ADDR);
pstrcpy_targphys("cmdline", CMDLINE_ADDR, TARGET_PAGE_SIZE, kernel_cmdline);
+ fw_cfg_add_bytes(fw_cfg, FW_CFG_CMDLINE_DATA,
+ (uint8_t*)strdup(kernel_cmdline),
+ strlen(kernel_cmdline) + 1);
} else {
fw_cfg_add_i32(fw_cfg, FW_CFG_KERNEL_CMDLINE, 0);
}