--- upstream/dynamips-0.2.7/ppc32.c 2007/10/06 16:29:14 10 +++ trunk/ppc32.c 2007/10/12 09:40:41 13 @@ -70,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); @@ -505,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) @@ -595,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 " @@ -632,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)