Lines Matching +full:pc +full:- +full:bios

2  * QEMU fuloong 2e mini pc support
4 * Copyright (c) 2008 yajin (yajin@vm-kernel.org)
9 * Contributions after 2012-01-13 are licensed under the terms of the
14 * Fuloong 2e mini pc is based on ICT/ST Loongson 2e CPU (MIPS III like, 800MHz)
15 * https://www.linux-mips.org/wiki/Fuloong_2E
18 * https://github.com/loongson-community/docs/tree/master/2E
36 #include "hw/qdev-properties.h"
42 #include "qemu/error-report.h"
54 * who want to build a pmon binary please first git-clone the source
56 * https://github.com/loongson-community/pmon
130 loaderparams.ram_size - initrd_offset); in load_kernel()
132 if (initrd_size == (target_ulong) -1) { in load_kernel()
155 prom_set(prom_buf, index++, "cpuclock=%u", clock_get_hz(cpu->clock)); in load_kernel()
182 true, ENVP_VADDR - 64, in write_bootloader()
192 CPUMIPSState *env = &cpu->env; in main_cpu_reset()
197 env->CP0_Status &= ~((1 << CP0St_BEV) | (1 << CP0St_ERL)); in main_cpu_reset()
211 const char *kernel_filename = machine->kernel_filename; in mips_fuloong2e_init()
212 const char *kernel_cmdline = machine->kernel_cmdline; in mips_fuloong2e_init()
213 const char *initrd_filename = machine->initrd_filename; in mips_fuloong2e_init()
216 MemoryRegion *bios = g_new(MemoryRegion, 1); in mips_fuloong2e_init() local
228 cpuclk = clock_new(OBJECT(machine), "cpu-refclk"); in mips_fuloong2e_init()
232 cpu = mips_cpu_create_with_clock(machine->cpu_type, cpuclk, false); in mips_fuloong2e_init()
233 env = &cpu->env; in mips_fuloong2e_init()
238 if (machine->ram_size != 256 * MiB) { in mips_fuloong2e_init()
242 memory_region_add_subregion(address_space_mem, 0, machine->ram); in mips_fuloong2e_init()
245 memory_region_init_rom(bios, NULL, "fuloong2e.bios", BIOS_SIZE, in mips_fuloong2e_init()
247 memory_region_add_subregion(address_space_mem, 0x1fc00000LL, bios); in mips_fuloong2e_init()
250 * We do not support flash operation, just loading pmon.bin as raw BIOS. in mips_fuloong2e_init()
251 * Please use -L to set the BIOS path and -bios to set bios name. in mips_fuloong2e_init()
255 loaderparams.ram_size = machine->ram_size; in mips_fuloong2e_init()
260 write_bootloader(env, memory_region_get_ram_ptr(bios), kernel_entry); in mips_fuloong2e_init()
263 machine->firmware ?: FULOONG_BIOSNAME); in mips_fuloong2e_init()
269 bios_size = -1; in mips_fuloong2e_init()
273 machine->firmware && !qtest_enabled()) { in mips_fuloong2e_init()
274 error_report("Could not load MIPS bios '%s'", machine->firmware); in mips_fuloong2e_init()
283 /* North bridge, Bonito --> IP2 */ in mips_fuloong2e_init()
284 pci_bus = bonito_init((qemu_irq *)&(env->irq[2])); in mips_fuloong2e_init()
286 /* South bridge -> IP5 */ in mips_fuloong2e_init()
291 if (machine->audiodev) { in mips_fuloong2e_init()
293 qdev_prop_set_string(dev, "audiodev", machine->audiodev); in mips_fuloong2e_init()
298 object_property_add_alias(OBJECT(machine), "rtc-time", in mips_fuloong2e_init()
302 qdev_connect_gpio_out_named(DEVICE(pci_dev), "intr", 0, env->irq[5]); in mips_fuloong2e_init()
313 pci_dev = pci_new(-1, "ati-vga"); in mips_fuloong2e_init()
316 qdev_prop_set_uint16(dev, "x-device-id", 0x5159); in mips_fuloong2e_init()
321 spd_data = spd_data_generate(DDR, machine->ram_size); in mips_fuloong2e_init()
330 mc->desc = "Fuloong 2e mini pc"; in mips_fuloong2e_machine_init()
331 mc->init = mips_fuloong2e_init; in mips_fuloong2e_machine_init()
332 mc->block_default_type = IF_IDE; in mips_fuloong2e_machine_init()
333 mc->default_cpu_type = MIPS_CPU_TYPE_NAME("Loongson-2E"); in mips_fuloong2e_machine_init()
334 mc->default_ram_size = 256 * MiB; in mips_fuloong2e_machine_init()
335 mc->default_ram_id = "fuloong2e.ram"; in mips_fuloong2e_machine_init()
336 mc->minimum_page_bits = 14; in mips_fuloong2e_machine_init()