Commit 2802bfe387a0ab5689b0781743682a5b71a9fdc2
1 parent
4a057712
More Gallileo register initialization, by Aurelien Jarno and Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2707 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
44 additions
and
0 deletions
hw/mips_malta.c
... | ... | @@ -548,6 +548,50 @@ static void write_bootloader (CPUState *env, unsigned long bios_offset, int64_t |
548 | 548 | stl_raw(p++, 0x34c60000 | ((ENVP_ADDR + 8) & 0xffff)); /* ori a2, a2, low(ENVP_ADDR + 8) */ |
549 | 549 | stl_raw(p++, 0x3c070000 | (env->ram_size >> 16)); /* lui a3, high(env->ram_size) */ |
550 | 550 | stl_raw(p++, 0x34e70000 | (env->ram_size & 0xffff)); /* ori a3, a3, low(env->ram_size) */ |
551 | + | |
552 | + /* Load BAR registers as done by YAMON */ | |
553 | + stl_raw(p++, 0x3c09bbe0); /* lui t1, 0xbbe0 */ | |
554 | + | |
555 | +#ifdef TARGET_WORDS_BIGENDIAN | |
556 | + stl_raw(p++, 0x3c08c000); /* lui t0, 0xc000 */ | |
557 | +#else | |
558 | + stl_raw(p++, 0x340800c0); /* ori t0, r0, 0x00c0 */ | |
559 | +#endif | |
560 | + stl_raw(p++, 0xad280048); /* sw t0, 0x0048(t1) */ | |
561 | +#ifdef TARGET_WORDS_BIGENDIAN | |
562 | + stl_raw(p++, 0x3c084000); /* lui t0, 0x4000 */ | |
563 | +#else | |
564 | + stl_raw(p++, 0x34080040); /* ori t0, r0, 0x0040 */ | |
565 | +#endif | |
566 | + stl_raw(p++, 0xad280050); /* sw t0, 0x0050(t1) */ | |
567 | + | |
568 | +#ifdef TARGET_WORDS_BIGENDIAN | |
569 | + stl_raw(p++, 0x3c088000); /* lui t0, 0x8000 */ | |
570 | +#else | |
571 | + stl_raw(p++, 0x34080080); /* ori t0, r0, 0x0080 */ | |
572 | +#endif | |
573 | + stl_raw(p++, 0xad280058); /* sw t0, 0x0058(t1) */ | |
574 | +#ifdef TARGET_WORDS_BIGENDIAN | |
575 | + stl_raw(p++, 0x3c083f00); /* lui t0, 0x3f00 */ | |
576 | +#else | |
577 | + stl_raw(p++, 0x3408003f); /* ori t0, r0, 0x003f */ | |
578 | +#endif | |
579 | + stl_raw(p++, 0xad280060); /* sw t0, 0x0060(t1) */ | |
580 | + | |
581 | +#ifdef TARGET_WORDS_BIGENDIAN | |
582 | + stl_raw(p++, 0x3c08c100); /* lui t0, 0xc100 */ | |
583 | +#else | |
584 | + stl_raw(p++, 0x340800c1); /* ori t0, r0, 0x00c1 */ | |
585 | +#endif | |
586 | + stl_raw(p++, 0xad280080); /* sw t0, 0x0080(t1) */ | |
587 | +#ifdef TARGET_WORDS_BIGENDIAN | |
588 | + stl_raw(p++, 0x3c085e00); /* lui t0, 0x5e00 */ | |
589 | +#else | |
590 | + stl_raw(p++, 0x3408005e); /* ori t0, r0, 0x005e */ | |
591 | +#endif | |
592 | + stl_raw(p++, 0xad280088); /* sw t0, 0x0088(t1) */ | |
593 | + | |
594 | + /* Jump to kernel code */ | |
551 | 595 | stl_raw(p++, 0x3c1f0000 | ((kernel_entry >> 16) & 0xffff)); /* lui ra, high(kernel_entry) */ |
552 | 596 | stl_raw(p++, 0x37ff0000 | (kernel_entry & 0xffff)); /* ori ra, ra, low(kernel_entry) */ |
553 | 597 | stl_raw(p++, 0x03e00008); /* jr ra */ | ... | ... |