i have been studying some QEMU source code, in particular bcm2835_gpio.c, where it uses a qdev_init_gpio_out function to initialize some output GPIOs, and then store the qemu_irq in an array. Then, in gpclr and gpset func it uses qemu_set_irq(s->out[start + i], 1); whats the point of it? I couldnt find any device connected to this output GPIO. Maybe im not understandig the concept but here is what i think: to use this out gpio to generate an interrupt you would need to Connect another qemu_irq to it, in particular one input GPIO, using a qdev_connect_gpio_out function, then if outgpio rises a irq with qemu_set_irq it should activare handler function of the input gpio. I have tried doing this but it didnt work, did i missunderstood something? Im trying to connect one new output gpio from bcm2835_gpio to the input gpio number 49 of bcm2835_ic. Is there any other way to connect something to the output gpio? Thanks for your help
1
There are 1 answers
Related Questions in C
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in INTERRUPT
- the end of the I/O operation is notified to the system by an interrupt.how much system time do the mentioned operations occupy?
- Unable to set an interrupt affinity in linux?
- fastLED degrades PWM outputs Arduino
- Difficulty understanding virtual LPIs in GICv3
- IRQ interrupt obtaining abnormal possibilities
- MKL02Z32xxx4 (FRDM-KL02Z Board) Timer overflow interrupt not firing
- Interrupt handling with push buttons in ARMv7
- Ultrasonic range finder HC-SR04 using one timer
- Does the Direct Memory Access (DMA) interfere with the execution of user program execution?
- How to write the external interrupt callback function of Linux kernel v3.10?
- Interaction with a thread from ISR using C++ Standard Library on ESP32
- Global variable value doesn't change in ISR in C
- The module first installed the alarm when it started
- ATTiny1606 Timer TCA0 interrupt not triggering
- RT linux isr routine
Related Questions in QEMU
- How to call a C language function from x86 assembly code?
- How can i get the vector register information in RVV0.7.1 when debugging with QEMU6.2?
- What's the difference between the '-' and '.' in the decode of RISCV instructions in QEMU?
- QEMU i386 pmio addresses
- How to reduce the size of the Android Studio virtual device folder
- Why is there a difference in memory writes when my qemu runs directly and when debugging the img with GDB?
- General Protection Fault encountered when executing SYSRET
- Property '.readonly' not found
- How to set breakpoints in Visual Studio Code for debugging kernel code running in QEMU?
- virt-manager printing to from windows 7 guest to Ubuntu host network printer
- How to connect internet within a qemu(linux based) running on a linux based host machine with company proxy server
- How does one debug the KVM subsystem?
- Android emulator memory exceeds the limit when using the swiftshader_indirect gpu
- Passing Intel-PT to guest using QEMU/KVM doesn't work
- QEMU emulator for Radxa Rock 5B
Related Questions in GPIO
- Accessing GPIO via MMIO in Android App on Raspberry Pi 4
- Unable to read value from gpio set as input
- Turning on an LED using Assembly on raspbianOS (Raspberry Pi 3 Model B)
- Driving Fintek F75113 GPIO
- IRQ interrupt obtaining abnormal possibilities
- Error compiling dts (Device Tree source) file for dtb
- asyncio only running first gpiozero coroutine
- Rf module getting signals when i use ssh, but not when i send it from the transmitter
- VLC - python and GPIO - random fonction
- Use raspberry pi 4 GPIO with node js
- How to add a button handler to GPIO pin through a push button
- Can't access GPIO on Python from Docker container on Raspberry Pi 5
- Are FPGA GPIOs capable enough to read bits at a high rate (26Mbps)? If not, what is a possible way?
- Terminal errors when running my project code, which uses GPIO
- How to set up GPIO event listeners on a Raspberry Pi using Rust
Related Questions in QEMU-DEVICE
- How to connect internet within a qemu(linux based) running on a linux based host machine with company proxy server
- Understand Qemu Riscv NMI and Interrupts implementation
- Is there a method to add custom device without re-compiling QEMU?
- pthread_mutex_init return EOPNOTSUPP(95) with qemu aarch64
- QEMU GPIO connect
- How can I properly add a new custom device to QEMU?
- Sources about device emulation in QEMU
- Who will configure virtio,mmio device register in qemu?
- How do I write a bare-metal RISC-V program to go from boot to writing to the UART0 on QEMU's `sifive_e` machine?
- qemu simulate x86_64 can't use "virtio-gpu-gl"
- qemu simulate xlnx-zcu102 report No 'PCI' bus found
- Emulate ARM Cortex-M7 with qemu-system-arm.exe
- Android Emulator connect external storage Device while running
- How to run qemu inside docker with networkmode bridged
- Run Sparc v9 64-bit executable on bare metal QEMU
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Yes, this is fairly normal for GPIO controller models in QEMU. We model the GPIO controller as a device, with its various input and output pins, but if the board model itself does not use those GPIO lines, they don't go anywhere.
Where a GPIO controller output is used by a board or SoC model by connecting it to a different device, qdev_connect_gpio_out() is the right thing to use. If it's not working then you've got something wrong in your modifications, but it's hard to say what when you don't tell us the changes you've made. The best way to debug this is probably to run QEMU under (host) gdb, and put a breakpoint in the function that calls qemu_set_irq() in the GPIO controller. Check you hit that breakpoint when you think you ought to, and then step through and make sure you end up in the interrupt controller code. That will help you narrow down whether the problem is that your guest code isn't actually raising the GPIO line, or that you've not wired it up at all, or that you've wired it to a different interrupt controller line than you thought you did, or that your guest code doesn't notice the interrupt because it's mis-programmed the interrupt controller. Watch out in particular for correct interrupt controller line numbering -- sometimes different sources count these starting from a different number depending on whether they include internal interrupts in the count. Cross-check against one of the existing connected interrupt lines. Also make sure you're connecting to the right one of the BCM2835_IC_ARM_IRQ or BCM2835_GPU_IRQ interrupt arrays.
There is no framework or UI for modelling the equivalent of "the hardware wires these lines up to expansion boards, LEDs or push-buttons". By and large the use case for QEMU is "run Linux on it", not "emulate doing embedded-button-and-LED stuff".