Xtensa updates:
- implement do_unassigned_access callback; - fix ML605 xtfpga FLASH size. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJU+vB5AAoJEFH5zJH4P6BEN+4P/3cYH8AtdgqO2SI+65y9DaRP 54xRiS3jtNr2VOLaM6NelbKl0x6J+IuRz88SxlRAeOUdWAVWxVEpnZ+eINWHLtuz +ooTdQGEbnzDveEoJjhiORv/ZAVJpyJUpXL4OB+8DGPRlH60gRWIePkurD+rPBDW y/kkMWUqFwDcriYbdkGZ+QqhjwcXaMxAPap5MTmeQY3BKodcQkOj7u7oAf1ksS6X HQrh7BGlqpi28Zw7dNCOOKMeBxMQFh40JWO2fom7cSXvnc/fL4/7gnvgztVrybcV 8BCDKcBFrOyFC1zwvVB2ml2j3XEIg8SGgQ4bdJ0SbxFvOicieOmfijcvqeFDjVZ8 Kwlx7Tl/LbIAqHrrpLZligpUwmsNXH2nSfeQF8Z6EfcRVpbhSHISPOLNRnK8wSyj uw1AgWfiNpW4Qw/wYhuf+p2+r+Rua+y7kt0iIjVzRfXp/vSl5zgXhU0lKLmToZao W+JOdEdF+paLjcnQHJ6VKLJs9wYo27T1UxdqqN6cSl2jYHL8c1GUWZAPPo6srQWV VobQyQz5WmFgMW8S4HATMyCWJVO4BdCad8JBp2tX+OZdPBg5aPmuEdTF1E0/Wc5s uhcG1U9j2r1189LvdS1VATYgt9ECFKPb8IypA6D9CzUY+VMRqDDljUEy2lefpgJx 1eUmrG0/Tn0XfzAT683V =Yocw -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/xtensa/tags/20150307-xtensa' into staging Xtensa updates: - implement do_unassigned_access callback; - fix ML605 xtfpga FLASH size. # gpg: Signature made Sat Mar 7 12:35:05 2015 GMT using RSA key ID F83FA044 # gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>" # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" * remotes/xtensa/tags/20150307-xtensa: target-xtensa: xtfpga: fix ml605 flash size target-xtensa: implement do_unassigned_access callback hw/xtensa: allow reads/writes in the system I/O region Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
6608c7e9eb
@ -162,6 +162,23 @@ static void lx60_reset(void *opaque)
|
|||||||
cpu_reset(CPU(cpu));
|
cpu_reset(CPU(cpu));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint64_t lx60_io_read(void *opaque, hwaddr addr,
|
||||||
|
unsigned size)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void lx60_io_write(void *opaque, hwaddr addr,
|
||||||
|
uint64_t val, unsigned size)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static const MemoryRegionOps lx60_io_ops = {
|
||||||
|
.read = lx60_io_read,
|
||||||
|
.write = lx60_io_write,
|
||||||
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||||
|
};
|
||||||
|
|
||||||
static void lx_init(const LxBoardDesc *board, MachineState *machine)
|
static void lx_init(const LxBoardDesc *board, MachineState *machine)
|
||||||
{
|
{
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
#ifdef TARGET_WORDS_BIGENDIAN
|
||||||
@ -211,7 +228,8 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
|
|||||||
memory_region_add_subregion(system_memory, 0, ram);
|
memory_region_add_subregion(system_memory, 0, ram);
|
||||||
|
|
||||||
system_io = g_malloc(sizeof(*system_io));
|
system_io = g_malloc(sizeof(*system_io));
|
||||||
memory_region_init(system_io, NULL, "lx60.io", 224 * 1024 * 1024);
|
memory_region_init_io(system_io, NULL, &lx60_io_ops, NULL, "lx60.io",
|
||||||
|
224 * 1024 * 1024);
|
||||||
memory_region_add_subregion(system_memory, 0xf0000000, system_io);
|
memory_region_add_subregion(system_memory, 0xf0000000, system_io);
|
||||||
lx60_fpga_init(system_io, 0x0d020000);
|
lx60_fpga_init(system_io, 0x0d020000);
|
||||||
if (nd_table[0].used) {
|
if (nd_table[0].used) {
|
||||||
@ -390,7 +408,7 @@ static void xtensa_ml605_init(MachineState *machine)
|
|||||||
{
|
{
|
||||||
static const LxBoardDesc ml605_board = {
|
static const LxBoardDesc ml605_board = {
|
||||||
.flash_base = 0xf8000000,
|
.flash_base = 0xf8000000,
|
||||||
.flash_size = 0x02000000,
|
.flash_size = 0x01000000,
|
||||||
.flash_sector_size = 0x20000,
|
.flash_sector_size = 0x20000,
|
||||||
.sram_size = 0x2000000,
|
.sram_size = 0x2000000,
|
||||||
};
|
};
|
||||||
|
@ -85,6 +85,9 @@ static inline XtensaCPU *xtensa_env_get_cpu(const CPUXtensaState *env)
|
|||||||
|
|
||||||
void xtensa_cpu_do_interrupt(CPUState *cpu);
|
void xtensa_cpu_do_interrupt(CPUState *cpu);
|
||||||
bool xtensa_cpu_exec_interrupt(CPUState *cpu, int interrupt_request);
|
bool xtensa_cpu_exec_interrupt(CPUState *cpu, int interrupt_request);
|
||||||
|
void xtensa_cpu_do_unassigned_access(CPUState *cpu, hwaddr addr,
|
||||||
|
bool is_write, bool is_exec, int opaque,
|
||||||
|
unsigned size);
|
||||||
void xtensa_cpu_dump_state(CPUState *cpu, FILE *f,
|
void xtensa_cpu_dump_state(CPUState *cpu, FILE *f,
|
||||||
fprintf_function cpu_fprintf, int flags);
|
fprintf_function cpu_fprintf, int flags);
|
||||||
hwaddr xtensa_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
|
hwaddr xtensa_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
|
||||||
|
@ -151,6 +151,7 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data)
|
|||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
cc->do_unaligned_access = xtensa_cpu_do_unaligned_access;
|
cc->do_unaligned_access = xtensa_cpu_do_unaligned_access;
|
||||||
cc->get_phys_page_debug = xtensa_cpu_get_phys_page_debug;
|
cc->get_phys_page_debug = xtensa_cpu_get_phys_page_debug;
|
||||||
|
cc->do_unassigned_access = xtensa_cpu_do_unassigned_access;
|
||||||
#endif
|
#endif
|
||||||
cc->debug_excp_handler = xtensa_breakpoint_handler;
|
cc->debug_excp_handler = xtensa_breakpoint_handler;
|
||||||
dc->vmsd = &vmstate_xtensa_cpu;
|
dc->vmsd = &vmstate_xtensa_cpu;
|
||||||
|
@ -71,6 +71,20 @@ void tlb_fill(CPUState *cs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void xtensa_cpu_do_unassigned_access(CPUState *cs, hwaddr addr,
|
||||||
|
bool is_write, bool is_exec, int opaque,
|
||||||
|
unsigned size)
|
||||||
|
{
|
||||||
|
XtensaCPU *cpu = XTENSA_CPU(cs);
|
||||||
|
CPUXtensaState *env = &cpu->env;
|
||||||
|
|
||||||
|
HELPER(exception_cause_vaddr)(env, env->pc,
|
||||||
|
is_exec ?
|
||||||
|
INSTR_PIF_ADDR_ERROR_CAUSE :
|
||||||
|
LOAD_STORE_PIF_ADDR_ERROR_CAUSE,
|
||||||
|
is_exec ? addr : cs->mem_io_vaddr);
|
||||||
|
}
|
||||||
|
|
||||||
static void tb_invalidate_virtual_addr(CPUXtensaState *env, uint32_t vaddr)
|
static void tb_invalidate_virtual_addr(CPUXtensaState *env, uint32_t vaddr)
|
||||||
{
|
{
|
||||||
uint32_t paddr;
|
uint32_t paddr;
|
||||||
|
Loading…
Reference in New Issue
Block a user