{
}
+/* XXX: do not use a global */
uint32_t cpu_mips_get_random (CPUState *env)
{
- uint32_t now = qemu_get_clock(vm_clock);
-
- return now % (MIPS_TLB_NB - env->CP0_Wired) + env->CP0_Wired;
+ static uint32_t seed = 0;
+ uint32_t idx;
+ seed = seed * 314159 + 1;
+ idx = (seed >> 16) % (MIPS_TLB_NB - env->CP0_Wired) + env->CP0_Wired;
+ return idx;
}
/* MIPS R4K timer */
run. */
bios_offset = ram_size + vga_ram_size;
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME);
- printf("%s: load BIOS '%s' size %d\n", __func__, buf, BIOS_SIZE);
ret = load_image(buf, phys_ram_base + bios_offset);
if (ret == BIOS_SIZE) {
cpu_register_physical_memory((uint32_t)(0x1fc00000),
BIOS_SIZE, bios_offset | IO_MEM_ROM);
- env->PC = 0xBFC00000;
- if (!kernel_filename)
- return;
} else {
/* not fatal */
fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n",