[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] How do i tell QEMU that memory i've have mapped is code?
From: |
Peter Fillmore |
Subject: |
[Qemu-discuss] How do i tell QEMU that memory i've have mapped is code? |
Date: |
Mon, 12 Jan 2015 11:44:57 +1100 |
Hello,
I need help in understanding on how to map memory in qemu..
I’m currently trying to create a board package for a NXP LPC213x SoC and am
running into difficulties in creating a “boot loader” section of code in a
defined section of memory(i.e embedded in production code).
My idea is to create a section of memory in the area needed and load shim code
to return the wanted values.
I’m able to create and load the section with the instructions - but when it
jumps to the section of memory i get the following memory error:
> "qemu: fatal: Trying to execute code outside RAM or ROM at 0x7ffffff0”
The memory is correctly initialised, but i can’t work out how to tell qemu that
this is another section of flash/ram.
heres the code which creates the memory (contained in a custom driver):
> memory_region_init_ram(&s->iomem, OBJECT(dev), "arm-lpc213x-iap", 0x1000,
> NULL);
> sysbus_init_mmio(sd, &s->iomem);
> char *memptr = memory_region_get_ram_ptr(&s->iomem) ;
> memcpy(memptr,iapcode, sizeof(iapcode));
Thanks for any assistance.
-------------------------------------------------------
Peter Fillmore
Principle Consultant, CISSP
Payment Security Consulting
Email: address@hidden
signature.asc
Description: Message signed with OpenPGP using GPGMail
- [Qemu-discuss] How do i tell QEMU that memory i've have mapped is code?,
Peter Fillmore <=