Changeset 3625 for trunk/src/host/qemu-neo1973/hw/neo1973.c
- Timestamp:
- 12/10/07 18:38:35 (5 years ago)
- File:
-
- 1 edited
-
trunk/src/host/qemu-neo1973/hw/neo1973.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/host/qemu-neo1973/hw/neo1973.c
r3582 r3625 88 88 const char *kernel; 89 89 struct sd_card_s *mmc; 90 uint32_t id; 90 91 }; 91 92 … … 432 433 static struct neo_board_s *neo1973_init_common(int ram_size, DisplayState *ds, 433 434 const char *kernel_filename, const char *cpu_model, 434 struct sd_card_s *mmc )435 struct sd_card_s *mmc, uint32_t id) 435 436 { 436 437 struct neo_board_s *s = (struct neo_board_s *) … … 440 441 s->kernel = kernel_filename; 441 442 s->mmc = mmc; 443 s->id = id; 442 444 443 445 /* Setup CPU & memory */ … … 484 486 } 485 487 488 static uint32_t neo_machid_read(void *opaque, target_phys_addr_t addr) 489 { 490 return 'Q'; 491 } 492 493 static void neo_machid_write(void *opaque, 494 target_phys_addr_t addr, uint32_t val) 495 { 496 struct neo_board_s *s = (struct neo_board_s *) opaque; 497 498 if ((val >> 4) == 'Q') 499 s->cpu->env->regs[val & 0xf] = s->id; 500 } 501 502 static void neo_machid_init(struct neo_board_s *s) 503 { 504 static CPUReadMemoryFunc *readfn[] = { 505 neo_machid_read, neo_machid_read, neo_machid_read, 506 }; 507 static CPUWriteMemoryFunc *writefn[] = { 508 neo_machid_write, neo_machid_write, neo_machid_write, 509 }; 510 int iomemtype = cpu_register_io_memory(0, readfn, writefn, s); 511 512 /* SROM chipselect 5 base */ 513 cpu_register_physical_memory(0x28000000, 1, iomemtype); 514 } 515 486 516 static void gta01_init(int ram_size, int vga_ram_size, 487 517 const char *boot_device, DisplayState *ds, … … 495 525 sd = sd_init(drives_table[sd_idx].bdrv, 0); 496 526 497 neo1973_init_common(ram_size, ds, kernel_filename, cpu_model, sd); 527 neo1973_init_common(ram_size, ds, 528 kernel_filename, cpu_model, sd, 1304); 498 529 } 499 530 … … 505 536 struct neo_board_s *neo; 506 537 507 neo = neo1973_init_common(ram_size, ds, kernel_filename, cpu_model, 0); 538 neo = neo1973_init_common(ram_size, ds, 539 kernel_filename, cpu_model, 0, 1555); 508 540 509 541 neo_gps_setup(neo); 542 neo_machid_init(neo); 510 543 } 511 544
Note: See TracChangeset
for help on using the changeset viewer.
