/[dynamips]/trunk/ppc32.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/ppc32.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 12 by dpavlin, Sat Oct 6 16:45:40 2007 UTC revision 13 by dpavlin, Fri Oct 12 09:40:41 2007 UTC
# Line 508  int ppc32_load_raw_image(cpu_ppc_t *cpu, Line 508  int ppc32_load_raw_image(cpu_ppc_t *cpu,
508        if (!haddr) {        if (!haddr) {
509           fprintf(stderr,"load_raw_image: invalid load address 0x%8.8x\n",           fprintf(stderr,"load_raw_image: invalid load address 0x%8.8x\n",
510                   vaddr);                   vaddr);
511           return(-1);  //         return(-1);
512        }        }
513    
514        if (len > PPC32_MIN_PAGE_SIZE)        if (len > PPC32_MIN_PAGE_SIZE)
# Line 598  int ppc32_load_elf_image(cpu_ppc_t *cpu, Line 598  int ppc32_load_elf_image(cpu_ppc_t *cpu,
598    
599           fseek(bfd,shdr->sh_offset,SEEK_SET);           fseek(bfd,shdr->sh_offset,SEEK_SET);
600           vaddr = shdr->sh_addr;           vaddr = shdr->sh_addr;
601            // XXX my kernel address in elf file
602            vaddr = vaddr - 0xc0000000;
603    
604           if (cpu->vm->debug_level > 0) {           if (cpu->vm->debug_level > 0) {
605              printf("   * Adding section at virtual address 0x%8.8x "              printf("   * Adding section at virtual address 0x%8.8x "
# Line 635  int ppc32_load_elf_image(cpu_ppc_t *cpu, Line 637  int ppc32_load_elf_image(cpu_ppc_t *cpu,
637        printf("ELF loading skipped, using a ghost RAM file.\n");        printf("ELF loading skipped, using a ghost RAM file.\n");
638     }     }
639    
640       ehdr->e_entry = ehdr->e_entry - 0xc0000000; // XXX
641     printf("ELF entry point: 0x%x\n",ehdr->e_entry);     printf("ELF entry point: 0x%x\n",ehdr->e_entry);
642    
643     if (entry_point)     if (entry_point)

Legend:
Removed from v.12  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC 1.1.26