No 'virtio-bus' bus found for device 'virtio-blk-device' - Error

2023-07-30 Thread Swedha R
Hi ,
when I run this following command , I am facing this problem for all
machine types rather that virt.

qemu-system-riscv64 -M sifive_u -bios fw_jump.elf -kernel Image -append
"rootwait root=/dev/vda ro" -drive file=rootfs.ext2,format=raw,id=hd0
-device virtio-blk-pci,drive=hd0 -netdev user,id=net0 -device
virtio-net-device,netdev=net0 -nographic

Please reply for my answer.
Thanks in advance


Need help on Interrupt handling in QEMU

2023-08-02 Thread Swedha R
Hi qemu team,
Now I am running ARM linux on qemu. It has a gpiochip named pl061 in the
/dev directory and it has 8 lines. Now my requirement is , I need to make
anyone of the line as an interrupt and I need to trigger the interrupt and
then catch that and need to service using interrupt service handler
function like doing any task.
Where I got struck means, we don't have any real hardware like pressing
button and the led will go? So , how we can work on interrupt in QEMU.
And I got kernel image , rootfs image everything via building the buildroot
got from github for ARM architecture.
Please provide us some values.

Thank you in advance.

With regards
Swedha R


GPIO interrupt on QEMU

2023-08-03 Thread Swedha R
Hi team,
I have arm64 up and  running in Qemu, And I built kernel image, rootfs
everything via buildroot open source I cloned from git.
And I customized via make - menuconfig like enabling gpio support, libgpiod
module and in device drivers gpio chip named pl061 .
After that, I able to see gpiochip in the /dev directory inside arm running
in qemu.
I want to know , how to trigger the gpio line and cache and service it in
this case.
The gpiochip has 7 lines in it.

This is the qemu-command we used,
qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel Image
-append "rootwait root=/dev/vda console=ttyAMA0" -netdev user,id=eth0
-device virtio-net-device,netdev=eth0 -drive
file=rootfs.ext4,if=none,format=raw,id=hd0 -device
virtio-blk-device,drive=hd0

Will you please help on it.


Thank you in advance
with regards
Swedha R


RISC-V | GPIO driver

2023-08-03 Thread Swedha R
Hi team,
I have RISCV linux up and running in  QEMU.
But I didn't have GPIO driver. I have export and unexport files in the
/sys/class/gpio directory but there is no GPIO chip.

How I have to get it?

Thanks in advance
with regards
Swedha R


ARM LINUX - RASPI

2023-08-03 Thread Swedha R
Hi team,
 How to emulate ARM linux for machine type rather than virt?
Because If I do for other boards, I can't able to get it.

Please advise us on this.


Thanks in advance
Swedha R


Pinging test

2023-08-03 Thread Swedha R
Hi team,
  I have RISCV linux up and running in qemu . But I can't able to ping test
in that. Like ping google.com. It able to transmit but not able to receive.
Please advise
Thanks
Swedha R


GPIO interrupt on QEMU

2023-08-04 Thread Swedha R
Hi team,
I have arm64 up and  running in Qemu, And I built kernel image, rootfs
everything via buildroot open source I cloned from git.
And I customized via make - menuconfig like enabling gpio support, libgpiod
module and in device drivers gpio chip named pl061 .
After that, I able to see gpiochip in the /dev directory inside arm running
in qemu.
I want to know , how to trigger the gpio line ( that is function for
poweroff) and it have to cach and service it in this case.
The gpiochip has 7 lines in it. How to find which line is a poweroff key ,
the qemu-virt board has )

This is the qemu-command we used,
qemu-system-aarch64 -M virt -cpu cortex-a53 -nographic -smp 1 -kernel Image
-append "rootwait root=/dev/vda console=ttyAMA0" -netdev user,id=eth0
-device virtio-net-device,netdev=eth0 -drive
file=rootfs.ext4,if=none,format=raw,id=hd0 -device
virtio-blk-device,drive=hd0

Will you please help on it.


GPIO support on QEMU

2023-08-04 Thread Swedha R
Hi ,
Is qemu will support virtual GPIO drivers. How to work on GPIO in qemu?

Please give more details on this.


Re: GPIO interrupt on QEMU

2023-08-04 Thread Swedha R
Thanks, I'll check it out!

On Fri, 4 Aug 2023 at 15:37, Peter Maydell  wrote:

> On Fri, 4 Aug 2023 at 10:25, Swedha R  wrote:
> >
> > Hi team,
> > I have arm64 up and  running in Qemu, And I built kernel image, rootfs
> everything via buildroot open source I cloned from git.
> > And I customized via make - menuconfig like enabling gpio support,
> libgpiod module and in device drivers gpio chip named pl061 .
> > After that, I able to see gpiochip in the /dev directory inside arm
> running in qemu.
> > I want to know , how to trigger the gpio line ( that is function for
> poweroff) and it have to cach and service it in this case.
> > The gpiochip has 7 lines in it. How to find which line is a poweroff key
> , the qemu-virt board has )
>
> If your guest is Linux it in theory [*] should have already
> found the power-off key GPIO by looking in the device tree that
> QEMU passed it (the information is in the /gpio-keys/poweroff
> node).
>
> You can trigger the power-down button by using the
> "system_powerdown" command at the QEMU monitor (HMP)
> prompt.
>
> [*] The guest I have didn't power down in response
> to the system_powerdown command, but I might well have
> not compiled in all the necessary kernel options for
> it to work. QEMU definitely does raise the GPIO line
> when you use the system_powerdown command.
>
> thanks
> -- PMM
>


ARM system emulator

2023-08-16 Thread Swedha R
Hi,
In the qemu website , under the section ARM system emulator, they mentioned
like

   - Secure-World-only devices if the CPU has TrustZone:
  - A second PL011 UART
  - A second PL061 GPIO controller, with GPIO lines for triggering a
  system reset or system poweroff
  - A secure flash memory
  - 16MB of secure RAM
  - I need to know how to work with the PL061 GPIO controller.
   And need to know , Is it restricted to use the PL061 GPIO lines only for
   triggering a system reset or system poweroff.
   If that is the case means, how to do that ?
   Please provide any resource, bcz I didn't get anything to work in a
   virtual environment.

   Thanks in advance
   Regards
   Swedha R


ARM system emulator

2023-08-17 Thread Swedha R
Hi,
In the qemu website , under the section ARM system emulator, they mentioned
like,

   - Secure-World-only devices if the CPU has TrustZone:
  - A second PL011 UART
  - A second PL061 GPIO controller, with GPIO lines for triggering a
  system reset or system poweroff
  - A secure flash memory
  - 16MB of secure RAM
  - I need to know how to work with the PL061 GPIO controller.
   And need to know , Is it restricted to use the PL061 GPIO lines only for
   triggering a system reset or system poweroff.
   If that is the case means, how to do that ?
   Please provide any resource, bcz I didn't get anything to work in a
   virtual environment.

   Thanks in advance
   Regards
   Swedha R


Running RISCV linux on qemu

2023-09-21 Thread Swedha R
Hi,
I want to run riscv64 linux on top of qemu with the machine model sifive_u.
I had a preinstalled server ubuntu-23.04.img and prebuilt u-boot image.
And in the qemu website itself they mentioned there is no PCI -bus support
or virtio-bus support for sifive_u board.

when I ran this bash script with the following qemu commands,
U_BOOT=./U-boot
QEMU=/usr/local/bin/qemu-system-riscv64
IMAGE=./ubuntu-23.04.img


$QEMU   \
 -machine sifive_u  \
 -nographic \
 -m 8192 -smp 5 \
 -kernel $U_BOOT\
 -drive file=./ubuntu-23.04.img,format=raw,if=none


It's not booting the ubuntu image. Upto the following message is booting
OpenSBI v1.2
   _  _
  / __ \  / |  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |) | |_) || |_
  \/| .__/ \___|_| |_|_/|/_|
| |
|_|

Platform Name : SiFive HiFive Unleashed A00
Platform Features : medeleg
Platform HART Count   : 5
Platform IPI Device   : aclint-mswi
Platform Timer Device : aclint-mtimer @ 100Hz
Platform Console Device   : sifive_uart
Platform HSM Device   : ---
Platform PMU Device   : ---
Platform Reboot Device: gpio-restart
Platform Shutdown Device  : ---
Firmware Base : 0x8000
Firmware Size : 244 KB
Runtime SBI Version   : 1.0

Domain0 Name  : root
Domain0 Boot HART : 3
Domain0 HARTs : 0*,1*,2*,3*,4*
Domain0 Region00  : 0x0200-0x0200 (I)
Domain0 Region01  : 0x8000-0x8003 ()
Domain0 Region02  : 0x-0x (R,W,X)
Domain0 Next Address  : 0x8020
Domain0 Next Arg1 : 0xbfe0
Domain0 Next Mode : S-mode
Domain0 SysReset  : yes

Boot HART ID  : 3
Boot HART Domain  : root
Boot HART Priv Version: v1.10
Boot HART Base ISA: rv64imafdc
Boot HART ISA Extensions  : none
Boot HART PMP Count   : 16
Boot HART PMP Granularity : 4
Boot HART PMP Address Bits: 54
Boot HART MHPM Count  : 0
Boot HART MIDELEG : 0x0222
Boot HART MEDELEG : 0xb109


U-Boot 2023.07-rc2 (May 16 2023 - 12:25:28 +0530)

CPU:   rv64imafdc_zicsr_zifencei
Model: SiFive HiFive Unleashed A00
DRAM:  8 GiB
Core:  17 devices, 9 uclasses, devicetree: board
Loading Environment from nowhere... OK
In:serial@1001
Out:   serial@1001
Err:   serial@1001
Net:   No ethernet found.
Working FDT set to ff72f430
Hit any key to stop autoboot:  0

Device 0: unknown device
scanning bus for devices...

Device 0: unknown device
No ethernet found.
No ethernet found.

Please guide me on this on how to make it for sifive_u machine model



Thanks in advance

Regards,
Swedha