aboutsummaryrefslogtreecommitdiff
path: root/hw/xtensa/xtfpga.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-06-23 17:24:48 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-06-29 02:32:42 +0400
commitb6edea8b687182bc4572c4e2e8af48f32b213dad (patch)
tree48c686478ebaa08350d97aecaefdb7410e92c6c8 /hw/xtensa/xtfpga.c
parenta9a28591fbd4dc20d19b6408361b45c9b7300434 (diff)
downloadqemu-b6edea8b687182bc4572c4e2e8af48f32b213dad.zip
qemu-b6edea8b687182bc4572c4e2e8af48f32b213dad.tar.gz
qemu-b6edea8b687182bc4572c4e2e8af48f32b213dad.tar.bz2
hw/xtensa/xtfpga: add memory info to bootparam
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'hw/xtensa/xtfpga.c')
-rw-r--r--hw/xtensa/xtfpga.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 689d078..97e5842 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -237,9 +237,14 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
/* Use presence of kernel file name as 'boot from SRAM' switch. */
if (kernel_filename) {
- size_t bp_size = 2 * get_tag_size(0);
+ size_t bp_size = 3 * get_tag_size(0); /* first/last and memory tags */
uint32_t tagptr = 0xfe000000 + board->sram_size;
uint32_t cur_tagptr;
+ BpMemInfo memory_location = {
+ .type = tswap32(MEMORY_TYPE_CONVENTIONAL),
+ .start = tswap32(0),
+ .end = tswap32(machine->ram_size),
+ };
rom = g_malloc(sizeof(*rom));
memory_region_init_ram(rom, NULL, "lx60.sram", board->sram_size);
@@ -253,6 +258,8 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
/* Put kernel bootparameters to the end of that SRAM */
tagptr = (tagptr - bp_size) & ~0xff;
cur_tagptr = put_tag(tagptr, BP_TAG_FIRST, 0, NULL);
+ cur_tagptr = put_tag(cur_tagptr, BP_TAG_MEMORY,
+ sizeof(memory_location), &memory_location);
if (kernel_cmdline) {
cur_tagptr = put_tag(cur_tagptr, BP_TAG_COMMAND_LINE,