diff options
Diffstat (limited to 'sim/bfin')
-rw-r--r-- | sim/bfin/dv-bfin_dma.c | 6 | ||||
-rw-r--r-- | sim/bfin/dv-bfin_mmu.c | 4 | ||||
-rw-r--r-- | sim/bfin/interp.c | 28 |
3 files changed, 19 insertions, 19 deletions
diff --git a/sim/bfin/dv-bfin_dma.c b/sim/bfin/dv-bfin_dma.c index b93a960..52fcd61 100644 --- a/sim/bfin/dv-bfin_dma.c +++ b/sim/bfin/dv-bfin_dma.c @@ -138,17 +138,17 @@ bfin_dma_process_desc (struct hw *me, struct bfin_dma *dma) case DMAFLOW_ARRAY: if (ndsize == 0 || ndsize > 7) hw_abort (me, "DMA config error: DMAFLOW_ARRAY requires NDSIZE 1...7"); - sim_read (hw_system (me), dma->curr_desc_ptr, (void *)flows, ndsize * 2); + sim_read (hw_system (me), dma->curr_desc_ptr, flows, ndsize * 2); break; case DMAFLOW_SMALL: if (ndsize == 0 || ndsize > 8) hw_abort (me, "DMA config error: DMAFLOW_SMALL requires NDSIZE 1...8"); - sim_read (hw_system (me), dma->next_desc_ptr, (void *)flows, ndsize * 2); + sim_read (hw_system (me), dma->next_desc_ptr, flows, ndsize * 2); break; case DMAFLOW_LARGE: if (ndsize == 0 || ndsize > 9) hw_abort (me, "DMA config error: DMAFLOW_LARGE requires NDSIZE 1...9"); - sim_read (hw_system (me), dma->next_desc_ptr, (void *)flows, ndsize * 2); + sim_read (hw_system (me), dma->next_desc_ptr, flows, ndsize * 2); break; default: hw_abort (me, "DMA config error: invalid DMAFLOW %#x", dma->config); diff --git a/sim/bfin/dv-bfin_mmu.c b/sim/bfin/dv-bfin_mmu.c index b2ca30d..82320f4 100644 --- a/sim/bfin/dv-bfin_mmu.c +++ b/sim/bfin/dv-bfin_mmu.c @@ -157,9 +157,9 @@ bfin_mmu_io_write_buffer (struct hw *me, const void *source, hw_abort (me, "DTEST_COMMAND bits undefined"); if (value & TEST_WRITE) - sim_write (hw_system (me), addr, (void *)mmu->dtest_data, 8); + sim_write (hw_system (me), addr, mmu->dtest_data, 8); else - sim_read (hw_system (me), addr, (void *)mmu->dtest_data, 8); + sim_read (hw_system (me), addr, mmu->dtest_data, 8); } break; default: diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 58bec8b..f63690c 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -703,7 +703,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, { bu16 emuexcpt = 0x25; sim_do_commandf (sd, "memory-size 0x%x", BFIN_DEFAULT_MEM_SIZE); - sim_write (sd, 0, (void *)&emuexcpt, 2); + sim_write (sd, 0, &emuexcpt, 2); } /* Check for/establish the a reference program image. */ @@ -791,7 +791,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, /* Push the Ehdr onto the stack. */ *sp -= sizeof (ehdr); elf_addrs[3] = *sp; - sim_write (sd, *sp, (void *)&ehdr, sizeof (ehdr)); + sim_write (sd, *sp, &ehdr, sizeof (ehdr)); if (STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG) sim_io_printf (sd, " Elf_Ehdr: %#x\n", *sp); @@ -850,9 +850,9 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, max_load_addr = max (paddr + memsz, max_load_addr); *sp -= 12; - sim_write (sd, *sp+0, (void *)&paddr, 4); /* loadseg.addr */ - sim_write (sd, *sp+4, (void *)&vaddr, 4); /* loadseg.p_vaddr */ - sim_write (sd, *sp+8, (void *)&memsz, 4); /* loadseg.p_memsz */ + sim_write (sd, *sp+0, &paddr, 4); /* loadseg.addr */ + sim_write (sd, *sp+4, &vaddr, 4); /* loadseg.p_vaddr */ + sim_write (sd, *sp+8, &memsz, 4); /* loadseg.p_memsz */ ++nsegs; } else if (phdrs[i].p_type == PT_DYNAMIC) @@ -885,7 +885,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, /* Push the summary loadmap info onto the stack last. */ *sp -= 4; sim_write (sd, *sp+0, null, 2); /* loadmap.version */ - sim_write (sd, *sp+2, (void *)&nsegs, 2); /* loadmap.nsegs */ + sim_write (sd, *sp+2, &nsegs, 2); /* loadmap.nsegs */ ret = true; skip_fdpic_init: @@ -1012,10 +1012,10 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, auxvt_size += 8; \ sp -= 4; \ auxvt = (val); \ - sim_write (sd, sp, (void *)&auxvt, 4); \ + sim_write (sd, sp, &auxvt, 4); \ sp -= 4; \ auxvt = (at); \ - sim_write (sd, sp, (void *)&auxvt, 4) + sim_write (sd, sp, &auxvt, 4) unsigned int egid = getegid (), gid = getgid (); unsigned int euid = geteuid (), uid = getuid (); bu32 auxvt_size = 0; @@ -1043,15 +1043,15 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, SET_SPREG (sp); /* First push the argc value. */ - sim_write (sd, sp, (void *)&argc, 4); + sim_write (sd, sp, &argc, 4); sp += 4; /* Then the actual argv strings so we know where to point argv[]. */ for (i = 0; i < argc; ++i) { unsigned len = strlen (argv[i]) + 1; - sim_write (sd, sp_flat, (void *)argv[i], len); - sim_write (sd, sp, (void *)&sp_flat, 4); + sim_write (sd, sp_flat, argv[i], len); + sim_write (sd, sp, &sp_flat, 4); sp_flat += len; sp += 4; } @@ -1062,8 +1062,8 @@ bfin_user_init (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, for (i = 0; i < envc; ++i) { unsigned len = strlen (env[i]) + 1; - sim_write (sd, sp_flat, (void *)env[i], len); - sim_write (sd, sp, (void *)&sp_flat, 4); + sim_write (sd, sp_flat, env[i], len); + sim_write (sd, sp, &sp_flat, 4); sp_flat += len; sp += 4; } @@ -1093,7 +1093,7 @@ bfin_os_init (SIM_DESC sd, SIM_CPU *cpu, char * const *argv) while (argv[i]) { bu32 len = strlen (argv[i]); - sim_write (sd, cmdline, (void *)argv[i], len); + sim_write (sd, cmdline, argv[i], len); cmdline += len; sim_write (sd, cmdline, &byte, 1); ++cmdline; |