--- upstream/dynamips-0.2.7-RC2/ppc32.c 2007/10/06 16:24:54 8 +++ trunk/ppc32.c 2007/10/12 09:40:41 13 @@ -42,6 +42,9 @@ /* Initialize a PowerPC processor */ int ppc32_init(cpu_ppc_t *cpu) { + /* Initialize JIT operations */ + jit_op_init_cpu(cpu->gen); + /* Initialize idle timer */ cpu->gen->idle_max = 1500; cpu->gen->idle_sleep_time = 30000; @@ -67,6 +70,9 @@ cpu->gen->set_idle_pc = (void *)ppc32_set_idle_pc; cpu->gen->get_idling_pc = (void *)ppc32_get_idling_pc; + /* zzz */ + memset(cpu->vtlb,0xFF,sizeof(cpu->vtlb)); + /* Set the startup parameters */ ppc32_reset(cpu); return(0); @@ -502,7 +508,7 @@ if (!haddr) { fprintf(stderr,"load_raw_image: invalid load address 0x%8.8x\n", vaddr); - return(-1); +// return(-1); } if (len > PPC32_MIN_PAGE_SIZE) @@ -592,6 +598,8 @@ fseek(bfd,shdr->sh_offset,SEEK_SET); vaddr = shdr->sh_addr; + // XXX my kernel address in elf file + vaddr = vaddr - 0xc0000000; if (cpu->vm->debug_level > 0) { printf(" * Adding section at virtual address 0x%8.8x " @@ -629,6 +637,7 @@ printf("ELF loading skipped, using a ghost RAM file.\n"); } + ehdr->e_entry = ehdr->e_entry - 0xc0000000; // XXX printf("ELF entry point: 0x%x\n",ehdr->e_entry); if (entry_point)