Commit fb3444b86cd84c8c0750d1df189aa76beec8e1d8

Authored by bellard
1 parent 2be0071f

endian register support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1493 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 5 additions and 4 deletions
hw/ppc_prep.c
... ... @@ -258,6 +258,7 @@ typedef struct sysctrl_t {
258 258 uint8_t syscontrol;
259 259 uint8_t fake_io[2];
260 260 int contiguous_map;
  261 + int endian;
261 262 } sysctrl_t;
262 263  
263 264 enum {
... ... @@ -297,8 +298,9 @@ static void PREP_io_800_writeb (void *opaque, uint32_t addr, uint32_t val)
297 298 }
298 299 /* Check LE mode */
299 300 if (val & 0x02) {
300   - printf("Little Endian mode isn't supported (yet ?)\n");
301   - abort();
  301 + sysctrl->endian = 1;
  302 + } else {
  303 + sysctrl->endian = 0;
302 304 }
303 305 break;
304 306 case 0x0800:
... ... @@ -549,7 +551,6 @@ static void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,
549 551 }
550 552 cpu_register_physical_memory((uint32_t)(-BIOS_SIZE),
551 553 BIOS_SIZE, bios_offset | IO_MEM_ROM);
552   - cpu_single_env->nip = 0xfffffffc;
553 554  
554 555 if (linux_boot) {
555 556 kernel_base = KERNEL_LOAD_ADDR;
... ... @@ -604,7 +605,7 @@ static void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,
604 605  
605 606 /* init basic PC hardware */
606 607 vga_initialize(pci_bus, ds, phys_ram_base + ram_size, ram_size,
607   - vga_ram_size);
  608 + vga_ram_size, 0, 0);
608 609 rtc_init(0x70, 8);
609 610 // openpic = openpic_init(0x00000000, 0xF0000000, 1);
610 611 isa_pic = pic_init(pic_irq_request, cpu_single_env);
... ...