|
From: | Priyamvad Acharya |
Subject: | Re: Qemu API documentation |
Date: | Thu, 19 Mar 2020 19:46:58 +0530 |
$ common-obj-$(CONFIG_SOC) += soc.o
#define DES_BASEADDR 0x101f5000soc=qdev_create(NULL, "soc");// +
qdev_init_nofail(soc);// +
sysbus_mmio_map(SYS_BUS_DEVICE(soc), 0, DES_BASEADDR);// +
$ make distclean$ make -j8 -C build
$ ./qemu-system-arm -M versatilepb -nographic -kernel /lhome/priyamvad/debian_qemu_arm32/c_application/DES/des_demo.elf
[priyamvad@predator arm-softmmu]$ ./qemu-system-arm -M versatilepb -nographic -kernel /lhome/priyamvad/debian_qemu_arm32/c_application/DES/des_demo.elf
qemu-system-arm: Unknown device 'soc' for default sysbus
Aborted (core dumped)
[priyamvad@predator arm-softmmu]$ ./qemu-system-arm -M versatilepb -nographic -kernel /lhome/priyamvad/debian_qemu_arm32/c_application/DES/des_demo.elf
qemu-system-arm: Unknown device 'soc' for default sysbus
Aborted (core dumped)
test.s,test.ld,startup.S,Makefile,des_demo.c are files required for bare metal program
On 3/18/20 7:09 AM, Peter Maydell wrote:
> On Wed, 18 Mar 2020 at 09:55, Priyamvad Acharya
> <address@hidden> wrote:
>>
>> Hello developer community,
>>
>> I am working on implementing a custom device in Qemu, so to implement it I need documentation of functions which are used to emulate a hardware model in Qemu.
>>
>> What are the references to get it ?
>
> QEMU has very little documentation of its internals;
> the usual practice is to figure things out by
> reading the source code. What we do have is in
> docs/devel. There are also often documentation comments
> for specific functions in the include files where
> those functions are declared, which form the API
> documentation for them.
>
^ Unfortunately true. One thing you can do is try to pick an existing
device that's close to yours -- some donor PCI, USB etc device and start
using that as a reference.
If you can share (broad) details of what device you are trying to
implement, we might be able to point you to relevant examples to use as
a reference.
--js
soc.c
Description: Text Data
test.s
Description: Binary data
Makefile
Description: Binary data
startup.S
Description: Binary data
test.ld
Description: Binary data
des_demo.c
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |