Interrupt from PMU counter #152
Replies: 1 comment 1 reply
-
Hi @Everaldo-Gomes, First of all, sorry for the delay in my response. You can achieve this without modifying the interrupts.c file. Please take a look at this fork of Bao. It shows a simple implementation of a memory throttling mechanism at the hypervisor level, which uses PMU interrupts to control the budget of memory accesses and a generic timer to reestablish the budget assigned to each CPU. Here are a few points to guide you through the repository:
Currently, this repo is a work-in-progress and presents a very basic implementation of memory throttling. It is not yet part of the official Bao hypervisor and has only been tested on the Xilinx Ultrascale+ ZCU104. To use it on the Raspberry Pi, you will need to update the platform description file. You can take a look at the ZCU104 example here. For the overflow interrupt ID, you'll need to consult the technical reference manual of the platform. You can find it here. On page 89, Figure 7 shows that the Core 0 PMU IRQ ID is 48, which is the ID you need to set in the platform description file. Please feel free to reach out if you need further assistance. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've configured the PMU to count an event.
The interrupt for that counter is enabled.
When the counter overflows, it's setting the overflow bit.
My goal is to generate an interrupt when that counter overflows.
In the interrupts.c I'm using the
interrupts_init
to set my interruptBy doing so, I believed I would be able to get my function called in the
interrupts_handle
But not even the
irq_res interrupts_handle
is being called. Am I forgetting something?And how do I know if overflow interrupt will have the ID I want?
Platform: Raspberry Pi 4b
Demo: Dual-guest Linux+FreeRTOS
Beta Was this translation helpful? Give feedback.
All reactions