summaryrefslogtreecommitdiffstats
path: root/hw/cris/axis_dev88.c
Commit message (Expand)AuthorAgeFilesLines
* sysbus: Convert to sysbus_realize() etc. with CoccinelleMarkus Armbruster2020-06-151-1/+1
* qdev: Convert uses of qdev_create() with CoccinelleMarkus Armbruster2020-06-151-2/+2
* hw: Make MachineClass::is_default a boolean typePhilippe Mathieu-Daudé2020-02-281-1/+1
* cris/axis_dev88: use memdev for RAMIgor Mammedov2020-02-191-6/+2Star
* cris: improve passing PIC interrupt vector to the CPUMarc-André Lureau2020-01-071-4/+0Star
* Include qemu-common.h exactly where neededMarkus Armbruster2019-06-121-1/+0Star
* hw/cris: Use the IEC binary prefix definitionsPhilippe Mathieu-Daudé2018-07-021-1/+2
* hw: Do not include "sysemu/block-backend.h" if it is not necessaryPhilippe Mathieu-Daudé2018-06-011-1/+0Star
* Change references to serial_hds[] to serial_hd()Peter Maydell2018-04-261-1/+1
* cris: use generic cpu_model parsingIgor Mammedov2017-10-271-5/+2Star
* cris: replace cpu_cris_init() with cpu_generic_init()Igor Mammedov2017-09-011-1/+1
* hw: Use new memory_region_init_{ram, rom, rom_device}() functionsPeter Maydell2017-07-141-3/+2Star
* memory: Rename memory_region_init_ram() to memory_region_init_ram_nomigrate()Peter Maydell2017-07-141-1/+1
* hw/char: QOM'ify etraxfs_ser.cxiaoqiang zhao2016-05-291-2/+2
* hw: explicitly include qemu-common.h and cpu.hPaolo Bonzini2016-03-221-0/+2
* include/qemu/osdep.h: Don't include qapi/error.hMarkus Armbruster2016-03-221-0/+1
* cris: Clean up includesPeter Maydell2016-01-291-0/+1
* Use DEFINE_MACHINE() to register all machinesEduardo Habkost2015-09-191-10/+5Star
* Fix bad error handling after memory_region_init_ram()Markus Armbruster2015-09-181-1/+1
* typofixes - v4Veres Lajos2015-09-111-1/+1
* cris: memory: Replace memory_region_init_ram with memory_region_allocate_syst...Dirk Müller2015-04-111-3/+2Star
* hw: Convert from BlockDriverState to BlockBackend, mostlyMarkus Armbruster2014-10-201-2/+1Star
* block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()Markus Armbruster2014-10-201-1/+2
* memory: add parameter errp to memory_region_init_ramHu Tao2014-09-091-2/+4
* machine: Conversion of QEMUMachineInitArgs to MachineStateMarcel Apfelbaum2014-05-281-5/+5
* axis-dev88: Connect the PIC upstream IRQs directly to the CPUEdgar E. Iglesias2014-02-031-4/+3Star
* axis_dev88: Don't enforce use of kernel for qtestAndreas Färber2013-11-051-5/+6
* hw: Clean up bogus default boot orderMarkus Armbruster2013-08-281-1/+0Star
* memory: add owner argument to initialization functionsPaolo Bonzini2013-07-041-4/+4
* hw: move private headers to hw/ subdirectories.Paolo Bonzini2013-04-081-1/+1
* hw: move headers to include/Paolo Bonzini2013-04-081-2/+2
* hw: move boards and other isolated files to hw/ARCHPaolo Bonzini2013-03-011-0/+366
/span>(0); emap->map[1].mem_type = cpu_to_le32(2); emap->map[1].mem_start = cpu_to_le64(0x90000000); emap->map[1].mem_size = cpu_to_le32((ram_size / MiB) - 256); } static void init_system_loongson(void *g_system) { struct system_loongson *s = g_system; s->ccnuma_smp = cpu_to_le32(0); s->sing_double_channel = cpu_to_le32(1); s->nr_uarts = cpu_to_le32(1); s->uarts[0].iotype = cpu_to_le32(2); s->uarts[0].int_offset = cpu_to_le32(2); s->uarts[0].uartclk = cpu_to_le32(25000000); /* Random value */ s->uarts[0].uart_base = cpu_to_le64(virt_memmap[VIRT_UART].base); } static void init_irq_source(void *g_irq_source) { struct irq_source_routing_table *irq_info = g_irq_source; irq_info->node_id = cpu_to_le32(0); irq_info->PIC_type = cpu_to_le32(0); irq_info->dma_mask_bits = cpu_to_le16(64); irq_info->pci_mem_start_addr = cpu_to_le64(virt_memmap[VIRT_PCIE_MMIO].base); irq_info->pci_mem_end_addr = cpu_to_le64(virt_memmap[VIRT_PCIE_MMIO].base + virt_memmap[VIRT_PCIE_MMIO].size - 1); irq_info->pci_io_start_addr = cpu_to_le64(virt_memmap[VIRT_PCIE_PIO].base); } static void init_interface_info(void *g_interface) { struct interface_info *interface = g_interface; interface->vers = cpu_to_le16(0x01); strpadcpy(interface->description, 64, "UEFI_Version_v1.0", '\0'); } static void board_devices_info(void *g_board) { struct board_devices *bd = g_board; strpadcpy(bd->name, 64, "Loongson-3A-VIRT-1w-V1.00-demo", '\0'); } static void init_special_info(void *g_special) { struct loongson_special_attribute *special = g_special; strpadcpy(special->special_name, 64, "2018-05-01", '\0'); } void init_loongson_params(struct loongson_params *lp, void *p, uint64_t cpu_freq, uint64_t ram_size) { init_cpu_info(p, cpu_freq); lp->cpu_offset = cpu_to_le64((uintptr_t)p - (uintptr_t)lp); p += ROUND_UP(sizeof(struct efi_cpuinfo_loongson), 64); init_memory_map(p, ram_size); lp->memory_offset = cpu_to_le64((uintptr_t)p - (uintptr_t)lp); p += ROUND_UP(sizeof(struct efi_memory_map_loongson), 64); init_system_loongson(p); lp->system_offset = cpu_to_le64((uintptr_t)p - (uintptr_t)lp); p += ROUND_UP(sizeof(struct system_loongson), 64); init_irq_source(p); lp->irq_offset = cpu_to_le64((uintptr_t)p - (uintptr_t)lp); p += ROUND_UP(sizeof(struct irq_source_routing_table), 64); init_interface_info(p); lp->interface_offset = cpu_to_le64((uintptr_t)p - (uintptr_t)lp); p += ROUND_UP(sizeof(struct interface_info), 64); board_devices_info(p); lp->boarddev_table_offset = cpu_to_le64((uintptr_t)p - (uintptr_t)lp); p += ROUND_UP(sizeof(struct board_devices), 64); init_special_info(p); lp->special_offset = cpu_to_le64((uintptr_t)p - (uintptr_t)lp); p += ROUND_UP(sizeof(struct loongson_special_attribute), 64); } void init_reset_system(struct efi_reset_system_t *reset) { reset->Shutdown = cpu_to_le64(0xffffffffbfc000a8); reset->ResetCold = cpu_to_le64(0xffffffffbfc00080); reset->ResetWarm = cpu_to_le64(0xffffffffbfc00080); }