arm,dev,config: always preent the PMU but add option to enable
Review Request #3377 - Created March 15, 2016 and updated
| Information | |
|---|---|
| Bjoern A. Zeeb | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
| andysan | |
Changeset 11372:60739171853b
---------------------------
arm,dev,config: always preent the PMU but add option to enableAlways attach the PMU to an ARM core but do not enable the
relevant instructions/events unless asked for by setting the
new command line option --pmu.Note: this should work fine for 1 core systems, for multi-core
there might be an interrupt delivery issue still (SPI vs. PPI).
Consider this as an example for people who want to work on it
as the question has previously come up on the mailing lists on
how to hook this up.
Issue Summary
| Description | From | Last Updated | Status |
|---|---|---|---|
| This is a bit scary since the PMU is needs to know which interrupt to use and that's generally defined ... | Andreas Sandberg | March 15, 2016, 1:54 p.m. | Open |
I think this is a good idea, but...
The main reason we haven't enabled this by default is because of the way it interacts with interrupts. Due to the the fact that the PMU has interrupts, we should ideally add it via the platform since that's were the interrupt map is defined.
To make matters even more compicated, the current implementation, like many real implementations, uses SPIs. This works fine in single-core configurations (or configurations with a handfull of cores), but isn't very flexible since each core needs its own interrupt. At least Linux supports PMUs with PPIs, so I'm tempted to say that a PPI would make most sense since that'd allow us to define a single interrupt and forget about it.
I won't have time to add PPI support myself anytime soon, but I'm happy to give you a hand if you want to give it a stab. You know where to find me. :)
-
configs/common/Options.py (Diff revision 1) -
Add this together with the other ARM-specific options instead. See for example --machine-type above.
-
src/arch/arm/ArmISA.py (Diff revision 1) -
This is a bit scary since the PMU is needs to know which interrupt to use and that's generally defined by the platform code (see src/dev/arm/ReaView.py). Ideally, this device should live with the other platform devices, but I'm not sure how we would wire it to the ISA in that case.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+15 -1) |
