mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
This commit is contained in:
@@ -10,6 +10,7 @@ include $(SRC_PATH)/rules.mak
|
||||
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
|
||||
|
||||
QEMU_CFLAGS+=-I..
|
||||
QEMU_CFLAGS += $(GLIB_CFLAGS)
|
||||
|
||||
include $(SRC_PATH)/Makefile.objs
|
||||
|
||||
|
||||
@@ -191,7 +191,6 @@ obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virt
|
||||
obj-y += vhost_net.o
|
||||
obj-$(CONFIG_VHOST_NET) += vhost.o
|
||||
obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/virtio-9p-device.o
|
||||
obj-y += rwhandler.o
|
||||
obj-$(CONFIG_KVM) += kvm.o kvm-all.o
|
||||
obj-$(CONFIG_NO_KVM) += kvm-stub.o
|
||||
obj-y += memory.o
|
||||
|
||||
+8
-4
@@ -12,6 +12,7 @@
|
||||
#include "boards.h"
|
||||
#include "loader.h"
|
||||
#include "elf.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
#define KERNEL_LOAD_ADDR 0x10000
|
||||
#define AN5206_MBAR_ADDR 0x10000000
|
||||
@@ -37,6 +38,9 @@ static void an5206_init(ram_addr_t ram_size,
|
||||
int kernel_size;
|
||||
uint64_t elf_entry;
|
||||
target_phys_addr_t entry;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *sram = g_new(MemoryRegion, 1);
|
||||
|
||||
if (!cpu_model)
|
||||
cpu_model = "m5206";
|
||||
@@ -52,12 +56,12 @@ static void an5206_init(ram_addr_t ram_size,
|
||||
env->rambar0 = AN5206_RAMBAR_ADDR | 1;
|
||||
|
||||
/* DRAM at address zero */
|
||||
cpu_register_physical_memory(0, ram_size,
|
||||
qemu_ram_alloc(NULL, "an5206.ram", ram_size) | IO_MEM_RAM);
|
||||
memory_region_init_ram(ram, NULL, "an5206.ram", ram_size);
|
||||
memory_region_add_subregion(address_space_mem, 0, ram);
|
||||
|
||||
/* Internal SRAM. */
|
||||
cpu_register_physical_memory(AN5206_RAMBAR_ADDR, 512,
|
||||
qemu_ram_alloc(NULL, "an5206.sram", 512) | IO_MEM_RAM);
|
||||
memory_region_init_ram(sram, NULL, "an5206.sram", 512);
|
||||
memory_region_add_subregion(address_space_mem, AN5206_RAMBAR_ADDR, sram);
|
||||
|
||||
mcf5206_init(AN5206_MBAR_ADDR, env);
|
||||
|
||||
|
||||
+4
-1
@@ -11,13 +11,16 @@
|
||||
#ifndef ARM_MISC_H
|
||||
#define ARM_MISC_H 1
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
/* The CPU is also modeled as an interrupt controller. */
|
||||
#define ARM_PIC_CPU_IRQ 0
|
||||
#define ARM_PIC_CPU_FIQ 1
|
||||
qemu_irq *arm_pic_init_cpu(CPUState *env);
|
||||
|
||||
/* armv7m.c */
|
||||
qemu_irq *armv7m_init(int flash_size, int sram_size,
|
||||
qemu_irq *armv7m_init(MemoryRegion *address_space_mem,
|
||||
int flash_size, int sram_size,
|
||||
const char *kernel_filename, const char *cpu_model);
|
||||
|
||||
/* arm_boot.c */
|
||||
|
||||
+12
-10
@@ -156,7 +156,8 @@ static void armv7m_reset(void *opaque)
|
||||
flash_size and sram_size are in kb.
|
||||
Returns the NVIC array. */
|
||||
|
||||
qemu_irq *armv7m_init(int flash_size, int sram_size,
|
||||
qemu_irq *armv7m_init(MemoryRegion *address_space_mem,
|
||||
int flash_size, int sram_size,
|
||||
const char *kernel_filename, const char *cpu_model)
|
||||
{
|
||||
CPUState *env;
|
||||
@@ -169,6 +170,9 @@ qemu_irq *armv7m_init(int flash_size, int sram_size,
|
||||
uint64_t lowaddr;
|
||||
int i;
|
||||
int big_endian;
|
||||
MemoryRegion *sram = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *flash = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *hack = g_new(MemoryRegion, 1);
|
||||
|
||||
flash_size *= 1024;
|
||||
sram_size *= 1024;
|
||||
@@ -194,12 +198,11 @@ qemu_irq *armv7m_init(int flash_size, int sram_size,
|
||||
#endif
|
||||
|
||||
/* Flash programming is done via the SCU, so pretend it is ROM. */
|
||||
cpu_register_physical_memory(0, flash_size,
|
||||
qemu_ram_alloc(NULL, "armv7m.flash",
|
||||
flash_size) | IO_MEM_ROM);
|
||||
cpu_register_physical_memory(0x20000000, sram_size,
|
||||
qemu_ram_alloc(NULL, "armv7m.sram",
|
||||
sram_size) | IO_MEM_RAM);
|
||||
memory_region_init_ram(flash, NULL, "armv7m.flash", flash_size);
|
||||
memory_region_set_readonly(flash, true);
|
||||
memory_region_add_subregion(address_space_mem, 0, flash);
|
||||
memory_region_init_ram(sram, NULL, "armv7m.sram", sram_size);
|
||||
memory_region_add_subregion(address_space_mem, 0x20000000, sram);
|
||||
armv7m_bitband_init();
|
||||
|
||||
nvic = qdev_create(NULL, "armv7m_nvic");
|
||||
@@ -232,9 +235,8 @@ qemu_irq *armv7m_init(int flash_size, int sram_size,
|
||||
/* Hack to map an additional page of ram at the top of the address
|
||||
space. This stops qemu complaining about executing code outside RAM
|
||||
when returning from an exception. */
|
||||
cpu_register_physical_memory(0xfffff000, 0x1000,
|
||||
qemu_ram_alloc(NULL, "armv7m.hack",
|
||||
0x1000) | IO_MEM_RAM);
|
||||
memory_region_init_ram(hack, NULL, "armv7m.hack", 0x1000);
|
||||
memory_region_add_subregion(address_space_mem, 0xfffff000, hack);
|
||||
|
||||
qemu_register_reset(armv7m_reset, env);
|
||||
return pic;
|
||||
|
||||
+8
-8
@@ -31,6 +31,7 @@
|
||||
#include "elf.h"
|
||||
#include "cris-boot.h"
|
||||
#include "blockdev.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
#define D(x)
|
||||
#define DNAND(x)
|
||||
@@ -259,8 +260,9 @@ void axisdev88_init (ram_addr_t ram_size,
|
||||
int i;
|
||||
int nand_regs;
|
||||
int gpio_regs;
|
||||
ram_addr_t phys_ram;
|
||||
ram_addr_t phys_intmem;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *phys_intmem = g_new(MemoryRegion, 1);
|
||||
|
||||
/* init CPUs */
|
||||
if (cpu_model == NULL) {
|
||||
@@ -269,15 +271,13 @@ void axisdev88_init (ram_addr_t ram_size,
|
||||
env = cpu_init(cpu_model);
|
||||
|
||||
/* allocate RAM */
|
||||
phys_ram = qemu_ram_alloc(NULL, "axisdev88.ram", ram_size);
|
||||
cpu_register_physical_memory(0x40000000, ram_size, phys_ram | IO_MEM_RAM);
|
||||
memory_region_init_ram(phys_ram, NULL, "axisdev88.ram", ram_size);
|
||||
memory_region_add_subregion(address_space_mem, 0x40000000, phys_ram);
|
||||
|
||||
/* The ETRAX-FS has 128Kb on chip ram, the docs refer to it as the
|
||||
internal memory. */
|
||||
phys_intmem = qemu_ram_alloc(NULL, "axisdev88.chipram", INTMEM_SIZE);
|
||||
cpu_register_physical_memory(0x38000000, INTMEM_SIZE,
|
||||
phys_intmem | IO_MEM_RAM);
|
||||
|
||||
memory_region_init_ram(phys_intmem, NULL, "axisdev88.chipram", INTMEM_SIZE);
|
||||
memory_region_add_subregion(address_space_mem, 0x38000000, phys_intmem);
|
||||
|
||||
/* Attach a NAND flash to CS1. */
|
||||
nand = drive_get(IF_MTD, 0, 0);
|
||||
|
||||
@@ -2424,6 +2424,7 @@ static void cirrus_update_memory_access(CirrusVGAState *s)
|
||||
{
|
||||
unsigned mode;
|
||||
|
||||
memory_region_transaction_begin();
|
||||
if ((s->vga.sr[0x17] & 0x44) == 0x44) {
|
||||
goto generic_io;
|
||||
} else if (s->cirrus_srcptr != s->cirrus_srcptr_end) {
|
||||
@@ -2443,6 +2444,7 @@ static void cirrus_update_memory_access(CirrusVGAState *s)
|
||||
unmap_linear_vram(s);
|
||||
}
|
||||
}
|
||||
memory_region_transaction_commit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-5
@@ -26,7 +26,6 @@ static void collie_init(ram_addr_t ram_size,
|
||||
{
|
||||
StrongARMState *s;
|
||||
DriveInfo *dinfo;
|
||||
ram_addr_t phys_flash;
|
||||
|
||||
if (!cpu_model) {
|
||||
cpu_model = "sa1110";
|
||||
@@ -34,15 +33,13 @@ static void collie_init(ram_addr_t ram_size,
|
||||
|
||||
s = sa1110_init(collie_binfo.ram_size, cpu_model);
|
||||
|
||||
phys_flash = qemu_ram_alloc(NULL, "collie.fl1", 0x02000000);
|
||||
dinfo = drive_get(IF_PFLASH, 0, 0);
|
||||
pflash_cfi01_register(SA_CS0, phys_flash,
|
||||
pflash_cfi01_register(SA_CS0, NULL, "collie.fl1", 0x02000000,
|
||||
dinfo ? dinfo->bdrv : NULL, (64 * 1024),
|
||||
512, 4, 0x00, 0x00, 0x00, 0x00, 0);
|
||||
|
||||
phys_flash = qemu_ram_alloc(NULL, "collie.fl2", 0x02000000);
|
||||
dinfo = drive_get(IF_PFLASH, 0, 1);
|
||||
pflash_cfi01_register(SA_CS1, phys_flash,
|
||||
pflash_cfi01_register(SA_CS1, NULL, "collie.fl2", 0x02000000,
|
||||
dinfo ? dinfo->bdrv : NULL, (64 * 1024),
|
||||
512, 4, 0x00, 0x00, 0x00, 0x00, 0);
|
||||
|
||||
|
||||
+6
-7
@@ -80,16 +80,15 @@ PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn)
|
||||
static int pci_dec_21154_init_device(SysBusDevice *dev)
|
||||
{
|
||||
DECState *s;
|
||||
int pci_mem_config, pci_mem_data;
|
||||
|
||||
s = FROM_SYSBUS(DECState, dev);
|
||||
|
||||
pci_mem_config = pci_host_conf_register_mmio(&s->host_state,
|
||||
DEVICE_LITTLE_ENDIAN);
|
||||
pci_mem_data = pci_host_data_register_mmio(&s->host_state,
|
||||
DEVICE_LITTLE_ENDIAN);
|
||||
sysbus_init_mmio(dev, 0x1000, pci_mem_config);
|
||||
sysbus_init_mmio(dev, 0x1000, pci_mem_data);
|
||||
memory_region_init_io(&s->host_state.conf_mem, &pci_host_conf_le_ops,
|
||||
&s->host_state, "pci-conf-idx", 0x1000);
|
||||
memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,
|
||||
&s->host_state, "pci-data-idx", 0x1000);
|
||||
sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
|
||||
sysbus_init_mmio_region(dev, &s->host_state.data_mem);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -10,6 +10,7 @@
|
||||
#include "boards.h"
|
||||
#include "loader.h"
|
||||
#include "elf.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
#define KERNEL_LOAD_ADDR 0x10000
|
||||
|
||||
@@ -21,6 +22,8 @@ static void dummy_m68k_init(ram_addr_t ram_size,
|
||||
const char *initrd_filename, const char *cpu_model)
|
||||
{
|
||||
CPUState *env;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||
int kernel_size;
|
||||
uint64_t elf_entry;
|
||||
target_phys_addr_t entry;
|
||||
@@ -37,8 +40,8 @@ static void dummy_m68k_init(ram_addr_t ram_size,
|
||||
env->vbr = 0;
|
||||
|
||||
/* RAM at address zero */
|
||||
cpu_register_physical_memory(0, ram_size,
|
||||
qemu_ram_alloc(NULL, "dummy_m68k.ram", ram_size) | IO_MEM_RAM);
|
||||
memory_region_init_ram(ram, NULL, "dummy_m68k.ram", ram_size);
|
||||
memory_region_add_subregion(address_space_mem, 0, ram);
|
||||
|
||||
/* Load kernel. */
|
||||
if (kernel_filename) {
|
||||
|
||||
+11
-2
@@ -1,15 +1,22 @@
|
||||
/* NOR flash devices */
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
typedef struct pflash_t pflash_t;
|
||||
|
||||
/* pflash_cfi01.c */
|
||||
pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off,
|
||||
pflash_t *pflash_cfi01_register(target_phys_addr_t base,
|
||||
DeviceState *qdev, const char *name,
|
||||
target_phys_addr_t size,
|
||||
BlockDriverState *bs,
|
||||
uint32_t sector_len, int nb_blocs, int width,
|
||||
uint16_t id0, uint16_t id1,
|
||||
uint16_t id2, uint16_t id3, int be);
|
||||
|
||||
/* pflash_cfi02.c */
|
||||
pflash_t *pflash_cfi02_register(target_phys_addr_t base, ram_addr_t off,
|
||||
pflash_t *pflash_cfi02_register(target_phys_addr_t base,
|
||||
DeviceState *qdev, const char *name,
|
||||
target_phys_addr_t size,
|
||||
BlockDriverState *bs, uint32_t sector_len,
|
||||
int nb_blocs, int nb_mappings, int width,
|
||||
uint16_t id0, uint16_t id1,
|
||||
@@ -17,6 +24,8 @@ pflash_t *pflash_cfi02_register(target_phys_addr_t base, ram_addr_t off,
|
||||
uint16_t unlock_addr0, uint16_t unlock_addr1,
|
||||
int be);
|
||||
|
||||
MemoryRegion *pflash_cfi01_get_memory(pflash_t *fl);
|
||||
|
||||
/* nand.c */
|
||||
DeviceState *nand_init(BlockDriverState *bdrv, int manf_id, int chip_id);
|
||||
void nand_setpins(DeviceState *dev, uint8_t cle, uint8_t ale,
|
||||
|
||||
+6
-7
@@ -92,16 +92,15 @@ PCIBus *pci_grackle_init(uint32_t base, qemu_irq *pic,
|
||||
static int pci_grackle_init_device(SysBusDevice *dev)
|
||||
{
|
||||
GrackleState *s;
|
||||
int pci_mem_config, pci_mem_data;
|
||||
|
||||
s = FROM_SYSBUS(GrackleState, dev);
|
||||
|
||||
pci_mem_config = pci_host_conf_register_mmio(&s->host_state,
|
||||
DEVICE_LITTLE_ENDIAN);
|
||||
pci_mem_data = pci_host_data_register_mmio(&s->host_state,
|
||||
DEVICE_LITTLE_ENDIAN);
|
||||
sysbus_init_mmio(dev, 0x1000, pci_mem_config);
|
||||
sysbus_init_mmio(dev, 0x1000, pci_mem_data);
|
||||
memory_region_init_io(&s->host_state.conf_mem, &pci_host_conf_le_ops,
|
||||
&s->host_state, "pci-conf-idx", 0x1000);
|
||||
memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,
|
||||
&s->host_state, "pci-data-idx", 0x1000);
|
||||
sysbus_init_mmio_region(dev, &s->host_state.conf_mem);
|
||||
sysbus_init_mmio_region(dev, &s->host_state.data_mem);
|
||||
|
||||
qemu_register_reset(pci_grackle_reset, &s->host_state);
|
||||
return 0;
|
||||
|
||||
+2
-4
@@ -67,8 +67,7 @@ static void connex_init(ram_addr_t ram_size,
|
||||
#else
|
||||
be = 0;
|
||||
#endif
|
||||
if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(NULL, "connext.rom",
|
||||
connex_rom),
|
||||
if (!pflash_cfi01_register(0x00000000, NULL, "connext.rom", connex_rom,
|
||||
dinfo->bdrv, sector_len, connex_rom / sector_len,
|
||||
2, 0, 0, 0, 0, be)) {
|
||||
fprintf(stderr, "qemu: Error registering flash memory.\n");
|
||||
@@ -106,8 +105,7 @@ static void verdex_init(ram_addr_t ram_size,
|
||||
#else
|
||||
be = 0;
|
||||
#endif
|
||||
if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(NULL, "verdex.rom",
|
||||
verdex_rom),
|
||||
if (!pflash_cfi01_register(0x00000000, NULL, "verdex.rom", verdex_rom,
|
||||
dinfo->bdrv, sector_len, verdex_rom / sector_len,
|
||||
2, 0, 0, 0, 0, be)) {
|
||||
fprintf(stderr, "qemu: Error registering flash memory.\n");
|
||||
|
||||
+20
-8
@@ -13,11 +13,13 @@
|
||||
#include "boards.h"
|
||||
#include "arm-misc.h"
|
||||
#include "net.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
typedef struct {
|
||||
SysBusDevice busdev;
|
||||
uint32_t memsz;
|
||||
uint32_t flash_offset;
|
||||
MemoryRegion flash;
|
||||
bool flash_mapped;
|
||||
uint32_t cm_osc;
|
||||
uint32_t cm_ctrl;
|
||||
uint32_t cm_lock;
|
||||
@@ -108,9 +110,15 @@ static uint32_t integratorcm_read(void *opaque, target_phys_addr_t offset)
|
||||
static void integratorcm_do_remap(integratorcm_state *s, int flash)
|
||||
{
|
||||
if (flash) {
|
||||
cpu_register_physical_memory(0, 0x100000, IO_MEM_RAM);
|
||||
if (s->flash_mapped) {
|
||||
sysbus_del_memory(&s->busdev, &s->flash);
|
||||
s->flash_mapped = false;
|
||||
}
|
||||
} else {
|
||||
cpu_register_physical_memory(0, 0x100000, s->flash_offset | IO_MEM_RAM);
|
||||
if (!s->flash_mapped) {
|
||||
sysbus_add_memory_overlap(&s->busdev, 0, &s->flash, 1);
|
||||
s->flash_mapped = true;
|
||||
}
|
||||
}
|
||||
//??? tlb_flush (cpu_single_env, 1);
|
||||
}
|
||||
@@ -252,7 +260,8 @@ static int integratorcm_init(SysBusDevice *dev)
|
||||
}
|
||||
memcpy(integrator_spd + 73, "QEMU-MEMORY", 11);
|
||||
s->cm_init = 0x00000112;
|
||||
s->flash_offset = qemu_ram_alloc(NULL, "integrator.flash", 0x100000);
|
||||
memory_region_init_ram(&s->flash, NULL, "integrator.flash", 0x100000);
|
||||
s->flash_mapped = false;
|
||||
|
||||
iomemtype = cpu_register_io_memory(integratorcm_readfn,
|
||||
integratorcm_writefn, s,
|
||||
@@ -456,7 +465,9 @@ static void integratorcp_init(ram_addr_t ram_size,
|
||||
const char *initrd_filename, const char *cpu_model)
|
||||
{
|
||||
CPUState *env;
|
||||
ram_addr_t ram_offset;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *ram_alias = g_new(MemoryRegion, 1);
|
||||
qemu_irq pic[32];
|
||||
qemu_irq *cpu_pic;
|
||||
DeviceState *dev;
|
||||
@@ -469,13 +480,14 @@ static void integratorcp_init(ram_addr_t ram_size,
|
||||
fprintf(stderr, "Unable to find CPU definition\n");
|
||||
exit(1);
|
||||
}
|
||||
ram_offset = qemu_ram_alloc(NULL, "integrator.ram", ram_size);
|
||||
memory_region_init_ram(ram, NULL, "integrator.ram", ram_size);
|
||||
/* ??? On a real system the first 1Mb is mapped as SSRAM or boot flash. */
|
||||
/* ??? RAM should repeat to fill physical memory space. */
|
||||
/* SDRAM at address zero*/
|
||||
cpu_register_physical_memory(0, ram_size, ram_offset | IO_MEM_RAM);
|
||||
memory_region_add_subregion(address_space_mem, 0, ram);
|
||||
/* And again at address 0x80000000 */
|
||||
cpu_register_physical_memory(0x80000000, ram_size, ram_offset | IO_MEM_RAM);
|
||||
memory_region_init_alias(ram_alias, "ram.alias", ram, 0, ram_size);
|
||||
memory_region_add_subregion(address_space_mem, 0x80000000, ram_alias);
|
||||
|
||||
dev = qdev_create(NULL, "integrator_core");
|
||||
qdev_prop_set_uint32(dev, "memsz", ram_size >> 20);
|
||||
|
||||
+9
-6
@@ -29,6 +29,7 @@
|
||||
#include "loader.h"
|
||||
#include "elf.h"
|
||||
#include "trace.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
#include "grlib.h"
|
||||
|
||||
@@ -100,7 +101,9 @@ static void leon3_generic_hw_init(ram_addr_t ram_size,
|
||||
const char *cpu_model)
|
||||
{
|
||||
CPUState *env;
|
||||
ram_addr_t ram_offset, prom_offset;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *prom = g_new(MemoryRegion, 1);
|
||||
int ret;
|
||||
char *filename;
|
||||
qemu_irq *cpu_irqs = NULL;
|
||||
@@ -139,14 +142,14 @@ static void leon3_generic_hw_init(ram_addr_t ram_size,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ram_offset = qemu_ram_alloc(NULL, "leon3.ram", ram_size);
|
||||
cpu_register_physical_memory(0x40000000, ram_size, ram_offset | IO_MEM_RAM);
|
||||
memory_region_init_ram(ram, NULL, "leon3.ram", ram_size);
|
||||
memory_region_add_subregion(address_space_mem, 0x40000000, ram);
|
||||
|
||||
/* Allocate BIOS */
|
||||
prom_size = 8 * 1024 * 1024; /* 8Mb */
|
||||
prom_offset = qemu_ram_alloc(NULL, "Leon3.bios", prom_size);
|
||||
cpu_register_physical_memory(0x00000000, prom_size,
|
||||
prom_offset | IO_MEM_ROM);
|
||||
memory_region_init_ram(prom, NULL, "Leon3.bios", prom_size);
|
||||
memory_region_set_readonly(prom, true);
|
||||
memory_region_add_subregion(address_space_mem, 0x00000000, prom);
|
||||
|
||||
/* Load boot prom */
|
||||
if (bios_name == NULL) {
|
||||
|
||||
+11
-12
@@ -28,6 +28,7 @@
|
||||
#include "elf.h"
|
||||
#include "lm32_hwsetup.h"
|
||||
#include "lm32.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
typedef struct {
|
||||
CPUState *env;
|
||||
@@ -76,8 +77,8 @@ static void lm32_evr_init(ram_addr_t ram_size_not_used,
|
||||
{
|
||||
CPUState *env;
|
||||
DriveInfo *dinfo;
|
||||
ram_addr_t phys_ram;
|
||||
ram_addr_t phys_flash;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
|
||||
qemu_irq *cpu_irq, irq[32];
|
||||
ResetInfo *reset_info;
|
||||
int i;
|
||||
@@ -105,13 +106,12 @@ static void lm32_evr_init(ram_addr_t ram_size_not_used,
|
||||
|
||||
reset_info->flash_base = flash_base;
|
||||
|
||||
phys_ram = qemu_ram_alloc(NULL, "lm32_evr.sdram", ram_size);
|
||||
cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM);
|
||||
memory_region_init_ram(phys_ram, NULL, "lm32_evr.sdram", ram_size);
|
||||
memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
|
||||
|
||||
phys_flash = qemu_ram_alloc(NULL, "lm32_evr.flash", flash_size);
|
||||
dinfo = drive_get(IF_PFLASH, 0, 0);
|
||||
/* Spansion S29NS128P */
|
||||
pflash_cfi02_register(flash_base, phys_flash,
|
||||
pflash_cfi02_register(flash_base, NULL, "lm32_evr.flash", flash_size,
|
||||
dinfo ? dinfo->bdrv : NULL, flash_sector_size,
|
||||
flash_size / flash_sector_size, 1, 2,
|
||||
0x01, 0x7e, 0x43, 0x00, 0x555, 0x2aa, 1);
|
||||
@@ -164,8 +164,8 @@ static void lm32_uclinux_init(ram_addr_t ram_size_not_used,
|
||||
{
|
||||
CPUState *env;
|
||||
DriveInfo *dinfo;
|
||||
ram_addr_t phys_ram;
|
||||
ram_addr_t phys_flash;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
|
||||
qemu_irq *cpu_irq, irq[32];
|
||||
HWSetup *hw;
|
||||
ResetInfo *reset_info;
|
||||
@@ -200,13 +200,12 @@ static void lm32_uclinux_init(ram_addr_t ram_size_not_used,
|
||||
|
||||
reset_info->flash_base = flash_base;
|
||||
|
||||
phys_ram = qemu_ram_alloc(NULL, "lm32_uclinux.sdram", ram_size);
|
||||
cpu_register_physical_memory(ram_base, ram_size, phys_ram | IO_MEM_RAM);
|
||||
memory_region_init_ram(phys_ram, NULL, "lm32_uclinux.sdram", ram_size);
|
||||
memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
|
||||
|
||||
phys_flash = qemu_ram_alloc(NULL, "lm32_uclinux.flash", flash_size);
|
||||
dinfo = drive_get(IF_PFLASH, 0, 0);
|
||||
/* Spansion S29NS128P */
|
||||
pflash_cfi02_register(flash_base, phys_flash,
|
||||
pflash_cfi02_register(flash_base, NULL, "lm32_uclinux.flash", flash_size,
|
||||
dinfo ? dinfo->bdrv : NULL, flash_sector_size,
|
||||
flash_size / flash_sector_size, 1, 2,
|
||||
0x01, 0x7e, 0x43, 0x00, 0x555, 0x2aa, 1);
|
||||
|
||||
+11
-9
@@ -17,6 +17,7 @@
|
||||
#include "flash.h"
|
||||
#include "blockdev.h"
|
||||
#include "sysbus.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
/* Device addresses */
|
||||
#define MST_FPGA_PHYS 0x08000000
|
||||
@@ -90,7 +91,8 @@ static struct arm_boot_info mainstone_binfo = {
|
||||
.ram_size = 0x04000000,
|
||||
};
|
||||
|
||||
static void mainstone_common_init(ram_addr_t ram_size,
|
||||
static void mainstone_common_init(MemoryRegion *address_space_mem,
|
||||
ram_addr_t ram_size,
|
||||
const char *kernel_filename,
|
||||
const char *kernel_cmdline, const char *initrd_filename,
|
||||
const char *cpu_model, enum mainstone_model_e model, int arm_id)
|
||||
@@ -102,15 +104,16 @@ static void mainstone_common_init(ram_addr_t ram_size,
|
||||
DriveInfo *dinfo;
|
||||
int i;
|
||||
int be;
|
||||
MemoryRegion *rom = g_new(MemoryRegion, 1);
|
||||
|
||||
if (!cpu_model)
|
||||
cpu_model = "pxa270-c5";
|
||||
|
||||
/* Setup CPU & memory */
|
||||
cpu = pxa270_init(mainstone_binfo.ram_size, cpu_model);
|
||||
cpu_register_physical_memory(0, MAINSTONE_ROM,
|
||||
qemu_ram_alloc(NULL, "mainstone.rom",
|
||||
MAINSTONE_ROM) | IO_MEM_ROM);
|
||||
memory_region_init_ram(rom, NULL, "mainstone.rom", MAINSTONE_ROM);
|
||||
memory_region_set_readonly(rom, true);
|
||||
memory_region_add_subregion(address_space_mem, 0, rom);
|
||||
|
||||
#ifdef TARGET_WORDS_BIGENDIAN
|
||||
be = 1;
|
||||
@@ -126,10 +129,9 @@ static void mainstone_common_init(ram_addr_t ram_size,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!pflash_cfi01_register(mainstone_flash_base[i],
|
||||
qemu_ram_alloc(NULL, i ? "mainstone.flash1" :
|
||||
"mainstone.flash0",
|
||||
MAINSTONE_FLASH),
|
||||
if (!pflash_cfi01_register(mainstone_flash_base[i], NULL,
|
||||
i ? "mainstone.flash1" : "mainstone.flash0",
|
||||
MAINSTONE_FLASH,
|
||||
dinfo->bdrv, sector_len,
|
||||
MAINSTONE_FLASH / sector_len, 4, 0, 0, 0, 0,
|
||||
be)) {
|
||||
@@ -170,7 +172,7 @@ static void mainstone_init(ram_addr_t ram_size,
|
||||
const char *kernel_filename, const char *kernel_cmdline,
|
||||
const char *initrd_filename, const char *cpu_model)
|
||||
{
|
||||
mainstone_common_init(ram_size, kernel_filename,
|
||||
mainstone_common_init(get_system_memory(), ram_size, kernel_filename,
|
||||
kernel_cmdline, initrd_filename, cpu_model, mainstone, 0x196);
|
||||
}
|
||||
|
||||
|
||||
+32
-40
@@ -13,6 +13,7 @@
|
||||
#include "boards.h"
|
||||
#include "loader.h"
|
||||
#include "elf.h"
|
||||
#include "exec-memory.h"
|
||||
|
||||
#define SYS_FREQ 66000000
|
||||
|
||||
@@ -27,6 +28,7 @@
|
||||
#define PCSR_PRE_MASK 0x0f00
|
||||
|
||||
typedef struct {
|
||||
MemoryRegion iomem;
|
||||
qemu_irq irq;
|
||||
ptimer_state *timer;
|
||||
uint16_t pcsr;
|
||||
@@ -43,7 +45,7 @@ static void m5208_timer_update(m5208_timer_state *s)
|
||||
}
|
||||
|
||||
static void m5208_timer_write(void *opaque, target_phys_addr_t offset,
|
||||
uint32_t value)
|
||||
uint64_t value, unsigned size)
|
||||
{
|
||||
m5208_timer_state *s = (m5208_timer_state *)opaque;
|
||||
int prescale;
|
||||
@@ -104,7 +106,8 @@ static void m5208_timer_trigger(void *opaque)
|
||||
m5208_timer_update(s);
|
||||
}
|
||||
|
||||
static uint32_t m5208_timer_read(void *opaque, target_phys_addr_t addr)
|
||||
static uint64_t m5208_timer_read(void *opaque, target_phys_addr_t addr,
|
||||
unsigned size)
|
||||
{
|
||||
m5208_timer_state *s = (m5208_timer_state *)opaque;
|
||||
switch (addr) {
|
||||
@@ -120,19 +123,14 @@ static uint32_t m5208_timer_read(void *opaque, target_phys_addr_t addr)
|
||||
}
|
||||
}
|
||||
|
||||
static CPUReadMemoryFunc * const m5208_timer_readfn[] = {
|
||||
m5208_timer_read,
|
||||
m5208_timer_read,
|
||||
m5208_timer_read
|
||||
static const MemoryRegionOps m5208_timer_ops = {
|
||||
.read = m5208_timer_read,
|
||||
.write = m5208_timer_write,
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
};
|
||||
|
||||
static CPUWriteMemoryFunc * const m5208_timer_writefn[] = {
|
||||
m5208_timer_write,
|
||||
m5208_timer_write,
|
||||
m5208_timer_write
|
||||
};
|
||||
|
||||
static uint32_t m5208_sys_read(void *opaque, target_phys_addr_t addr)
|
||||
static uint64_t m5208_sys_read(void *opaque, target_phys_addr_t addr,
|
||||
unsigned size)
|
||||
{
|
||||
switch (addr) {
|
||||
case 0x110: /* SDCS0 */
|
||||
@@ -154,45 +152,36 @@ static uint32_t m5208_sys_read(void *opaque, target_phys_addr_t addr)
|
||||
}
|
||||
|
||||
static void m5208_sys_write(void *opaque, target_phys_addr_t addr,
|
||||
uint32_t value)
|
||||
uint64_t value, unsigned size)
|
||||
{
|
||||
hw_error("m5208_sys_write: Bad offset 0x%x\n", (int)addr);
|
||||
}
|
||||
|
||||
static CPUReadMemoryFunc * const m5208_sys_readfn[] = {
|
||||
m5208_sys_read,
|
||||
m5208_sys_read,
|
||||
m5208_sys_read
|
||||
static const MemoryRegionOps m5208_sys_ops = {
|
||||
.read = m5208_sys_read,
|
||||
.write = m5208_sys_write,
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
};
|
||||
|
||||
static CPUWriteMemoryFunc * const m5208_sys_writefn[] = {
|
||||
m5208_sys_write,
|
||||
m5208_sys_write,
|
||||
m5208_sys_write
|
||||
};
|
||||
|
||||
static void mcf5208_sys_init(qemu_irq *pic)
|
||||
static void mcf5208_sys_init(MemoryRegion *address_space, qemu_irq *pic)
|
||||
{
|
||||
int iomemtype;
|
||||
MemoryRegion *iomem = g_new(MemoryRegion, 1);
|
||||
m5208_timer_state *s;
|
||||
QEMUBH *bh;
|
||||
int i;
|
||||
|
||||
iomemtype = cpu_register_io_memory(m5208_sys_readfn,
|
||||
m5208_sys_writefn, NULL,
|
||||
DEVICE_NATIVE_ENDIAN);
|
||||
/* SDRAMC. */
|
||||
cpu_register_physical_memory(0xfc0a8000, 0x00004000, iomemtype);
|
||||
memory_region_init_io(iomem, &m5208_sys_ops, NULL, "m5208-sys", 0x00004000);
|
||||
memory_region_add_subregion(address_space, 0xfc0a8000, iomem);
|
||||
/* Timers. */
|
||||
for (i = 0; i < 2; i++) {
|
||||
s = (m5208_timer_state *)g_malloc0(sizeof(m5208_timer_state));
|
||||
bh = qemu_bh_new(m5208_timer_trigger, s);
|
||||
s->timer = ptimer_init(bh);
|
||||
iomemtype = cpu_register_io_memory(m5208_timer_readfn,
|
||||
m5208_timer_writefn, s,
|
||||
DEVICE_NATIVE_ENDIAN);
|
||||
cpu_register_physical_memory(0xfc080000 + 0x4000 * i, 0x00004000,
|
||||
iomemtype);
|
||||
memory_region_init_io(&s->iomem, &m5208_timer_ops, s,
|
||||
"m5208-timer", 0x00004000);
|
||||
memory_region_add_subregion(address_space, 0xfc080000 + 0x4000 * i,
|
||||
&s->iomem);
|
||||
s->irq = pic[4 + i];
|
||||
}
|
||||
}
|
||||
@@ -207,6 +196,9 @@ static void mcf5208evb_init(ram_addr_t ram_size,
|
||||
uint64_t elf_entry;
|
||||
target_phys_addr_t entry;
|
||||
qemu_irq *pic;
|
||||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||
MemoryRegion *sram = g_new(MemoryRegion, 1);
|
||||
|
||||
if (!cpu_model)
|
||||
cpu_model = "m5208";
|
||||
@@ -221,12 +213,12 @@ static void mcf5208evb_init(ram_addr_t ram_size,
|
||||
/* TODO: Configure BARs. */
|
||||
|
||||
/* DRAM at 0x40000000 */
|
||||
cpu_register_physical_memory(0x40000000, ram_size,
|
||||
qemu_ram_alloc(NULL, "mcf5208.ram", ram_size) | IO_MEM_RAM);
|
||||
memory_region_init_ram(ram, NULL, "mcf5208.ram", ram_size);
|
||||
memory_region_add_subregion(address_space_mem, 0x40000000, ram);
|
||||
|
||||
/* Internal SRAM. */
|
||||
cpu_register_physical_memory(0x80000000, 16384,
|
||||
qemu_ram_alloc(NULL, "mcf5208.sram", 16384) | IO_MEM_RAM);
|
||||
memory_region_init_ram(sram, NULL, "mcf5208.sram", 16384);
|
||||
memory_region_add_subregion(address_space_mem, 0x80000000, sram);
|
||||
|
||||
/* Internal peripherals. */
|
||||
pic = mcf_intc_init(0xfc048000, env);
|
||||
@@ -235,7 +227,7 @@ static void mcf5208evb_init(ram_addr_t ram_size,
|
||||
mcf_uart_mm_init(0xfc064000, pic[27], serial_hds[1]);
|
||||
mcf_uart_mm_init(0xfc068000, pic[28], serial_hds[2]);
|
||||
|
||||
mcf5208_sys_init(pic);
|
||||
mcf5208_sys_init(address_space_mem, pic);
|
||||
|
||||
if (nb_nics > 1) {
|
||||
fprintf(stderr, "Too many NICs\n");
|
||||
|
||||
+21
-22
@@ -97,6 +97,8 @@ struct MilkymistMinimac2State {
|
||||
NICConf conf;
|
||||
char *phy_model;
|
||||
target_phys_addr_t buffers_base;
|
||||
MemoryRegion buffers;
|
||||
MemoryRegion regs_region;
|
||||
|
||||
qemu_irq rx_irq;
|
||||
qemu_irq tx_irq;
|
||||
@@ -320,8 +322,8 @@ static ssize_t minimac2_rx(VLANClientState *nc, const uint8_t *buf, size_t size)
|
||||
return size;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
minimac2_read(void *opaque, target_phys_addr_t addr)
|
||||
static uint64_t
|
||||
minimac2_read(void *opaque, target_phys_addr_t addr, unsigned size)
|
||||
{
|
||||
MilkymistMinimac2State *s = opaque;
|
||||
uint32_t r = 0;
|
||||
@@ -350,7 +352,8 @@ minimac2_read(void *opaque, target_phys_addr_t addr)
|
||||
}
|
||||
|
||||
static void
|
||||
minimac2_write(void *opaque, target_phys_addr_t addr, uint32_t value)
|
||||
minimac2_write(void *opaque, target_phys_addr_t addr, uint64_t value,
|
||||
unsigned size)
|
||||
{
|
||||
MilkymistMinimac2State *s = opaque;
|
||||
|
||||
@@ -395,16 +398,14 @@ minimac2_write(void *opaque, target_phys_addr_t addr, uint32_t value)
|
||||
}
|
||||
}
|
||||
|
||||
static CPUReadMemoryFunc * const minimac2_read_fn[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
&minimac2_read,
|
||||
};
|
||||
|
||||
static CPUWriteMemoryFunc * const minimac2_write_fn[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
&minimac2_write,
|
||||
static const MemoryRegionOps minimac2_ops = {
|
||||
.read = minimac2_read,
|
||||
.write = minimac2_write,
|
||||
.valid = {
|
||||
.min_access_size = 4,
|
||||
.max_access_size = 4,
|
||||
},
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
};
|
||||
|
||||
static int minimac2_can_rx(VLANClientState *nc)
|
||||
@@ -457,25 +458,23 @@ static NetClientInfo net_milkymist_minimac2_info = {
|
||||
static int milkymist_minimac2_init(SysBusDevice *dev)
|
||||
{
|
||||
MilkymistMinimac2State *s = FROM_SYSBUS(typeof(*s), dev);
|
||||
int regs;
|
||||
ram_addr_t buffers;
|
||||
size_t buffers_size = TARGET_PAGE_ALIGN(3 * MINIMAC2_BUFFER_SIZE);
|
||||
|
||||
sysbus_init_irq(dev, &s->rx_irq);
|
||||
sysbus_init_irq(dev, &s->tx_irq);
|
||||
|
||||
regs = cpu_register_io_memory(minimac2_read_fn, minimac2_write_fn, s,
|
||||
DEVICE_NATIVE_ENDIAN);
|
||||
sysbus_init_mmio(dev, R_MAX * 4, regs);
|
||||
memory_region_init_io(&s->regs_region, &minimac2_ops, s,
|
||||
"minimac2-mmio", R_MAX * 4);
|
||||
sysbus_init_mmio_region(dev, &s->regs_region);
|
||||
|
||||
/* register buffers memory */
|
||||
buffers = qemu_ram_alloc(NULL, "milkymist_minimac2.buffers", buffers_size);
|
||||
s->rx0_buf = qemu_get_ram_ptr(buffers);
|
||||
memory_region_init_ram(&s->buffers, NULL, "milkymist_minimac2.buffers",
|
||||
buffers_size);
|
||||
s->rx0_buf = memory_region_get_ram_ptr(&s->buffers);
|
||||
s->rx1_buf = s->rx0_buf + MINIMAC2_BUFFER_SIZE;
|
||||
s->tx_buf = s->rx1_buf + MINIMAC2_BUFFER_SIZE;
|
||||
|
||||
cpu_register_physical_memory(s->buffers_base, buffers_size,
|
||||
buffers | IO_MEM_RAM);
|
||||
sysbus_add_memory(dev, s->buffers_base, &s->buffers);
|
||||
|
||||
qemu_macaddr_default_if_unset(&s->conf.macaddr);
|
||||
s->nic = qemu_new_nic(&net_milkymist_minimac2_info, &s->conf,
|
||||
|
||||
+24
-24
@@ -49,6 +49,9 @@ struct MilkymistSoftUsbState {
|
||||
HIDState hid_kbd;
|
||||
HIDState hid_mouse;
|
||||
|
||||
MemoryRegion regs_region;
|
||||
MemoryRegion pmem;
|
||||
MemoryRegion dmem;
|
||||
qemu_irq irq;
|
||||
|
||||
/* device properties */
|
||||
@@ -68,7 +71,8 @@ struct MilkymistSoftUsbState {
|
||||
};
|
||||
typedef struct MilkymistSoftUsbState MilkymistSoftUsbState;
|
||||
|
||||
static uint32_t softusb_read(void *opaque, target_phys_addr_t addr)
|
||||
static uint64_t softusb_read(void *opaque, target_phys_addr_t addr,
|
||||
unsigned size)
|
||||
{
|
||||
MilkymistSoftUsbState *s = opaque;
|
||||
uint32_t r = 0;
|
||||
@@ -91,7 +95,8 @@ static uint32_t softusb_read(void *opaque, target_phys_addr_t addr)
|
||||
}
|
||||
|
||||
static void
|
||||
softusb_write(void *opaque, target_phys_addr_t addr, uint32_t value)
|
||||
softusb_write(void *opaque, target_phys_addr_t addr, uint64_t value,
|
||||
unsigned size)
|
||||
{
|
||||
MilkymistSoftUsbState *s = opaque;
|
||||
|
||||
@@ -110,16 +115,14 @@ softusb_write(void *opaque, target_phys_addr_t addr, uint32_t value)
|
||||
}
|
||||
}
|
||||
|
||||
static CPUReadMemoryFunc * const softusb_read_fn[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
&softusb_read,
|
||||
};
|
||||
|
||||
static CPUWriteMemoryFunc * const softusb_write_fn[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
&softusb_write,
|
||||
static const MemoryRegionOps softusb_mmio_ops = {
|
||||
.read = softusb_read,
|
||||
.write = softusb_write,
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
.valid = {
|
||||
.min_access_size = 4,
|
||||
.max_access_size = 4,
|
||||
},
|
||||
};
|
||||
|
||||
static inline void softusb_read_dmem(MilkymistSoftUsbState *s,
|
||||
@@ -256,23 +259,20 @@ static void milkymist_softusb_reset(DeviceState *d)
|
||||
static int milkymist_softusb_init(SysBusDevice *dev)
|
||||
{
|
||||
MilkymistSoftUsbState *s = FROM_SYSBUS(typeof(*s), dev);
|
||||
int softusb_regs;
|
||||
ram_addr_t pmem_ram;
|
||||
ram_addr_t dmem_ram;
|
||||
|
||||
sysbus_init_irq(dev, &s->irq);
|
||||
|
||||
softusb_regs = cpu_register_io_memory(softusb_read_fn, softusb_write_fn, s,
|
||||
DEVICE_NATIVE_ENDIAN);
|
||||
sysbus_init_mmio(dev, R_MAX * 4, softusb_regs);
|
||||
memory_region_init_io(&s->regs_region, &softusb_mmio_ops, s,
|
||||
"milkymist-softusb", R_MAX * 4);
|
||||
sysbus_init_mmio_region(dev, &s->regs_region);
|
||||
|
||||
/* register pmem and dmem */
|
||||
pmem_ram = qemu_ram_alloc(NULL, "milkymist_softusb.pmem", s->pmem_size);
|
||||
cpu_register_physical_memory(s->pmem_base, s->pmem_size,
|
||||
pmem_ram | IO_MEM_RAM);
|
||||
dmem_ram = qemu_ram_alloc(NULL, "milkymist_softusb.dmem", s->dmem_size);
|
||||
cpu_register_physical_memory(s->dmem_base, s->dmem_size,
|
||||
dmem_ram | IO_MEM_RAM);
|
||||
memory_region_init_ram(&s->pmem, NULL, "milkymist_softusb.pmem",
|
||||
s->pmem_size);
|
||||
sysbus_add_memory(dev, s->pmem_base, &s->pmem);
|
||||
memory_region_init_ram(&s->dmem, NULL, "milkymist_softusb.dmem",
|
||||
s->dmem_size);
|
||||
sysbus_add_memory(dev, s->dmem_base, &s->dmem);
|
||||
|
||||
hid_init(&s->hid_kbd, HID_KEYBOARD, softusb_kbd_hid_datain);
|
||||
hid_init(&s->hid_mouse, HID_MOUSE, softusb_mouse_hid_datain);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user