-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
sbsaServer Base System Architecture ACS specific issues/enhancements/questions.Server Base System Architecture ACS specific issues/enhancements/questions.
Description
Many PMU SBSA tests (like test_pmu004.c) have code like this?
/* Configure PMEVTYPER to monitor Bandwidth value */
for (i = START_MONITOR; i < NUM_PMU_MON + START_MONITOR; i++) {
status = val_pmu_configure_monitor(node_index, config_events[i - START_MONITOR], i);
if (status) {
val_print(ACS_PRINT_ERR,
"\n Required PMU Event 0x%x not supported", config_events[i - START_MONITOR]);
val_print(ACS_PRINT_ERR, " at node %d", node_index);
fail_cnt++;
break;
}
}
This configures each monitor individually. The problem comes in the val_pmu_configure_monitor in sbsa_acs_pmu.c (line 251):
uint32_t
val_pmu_configure_monitor(uint32_t node_index, PMU_EVENT_TYPE_e event_type, uint32_t mon_inst)
{
addr_t base;
uint32_t offset;
uint32_t data;
uint32_t node_type;
base = val_pmu_get_info(PMU_NODE_BASE0, node_index);
/* Calculate the register offset based on selected monitor */
offset = 8 * mon_inst;
/* Disable all monitors before configuring the monitor */
**val_pmu_disable_all_monitors(node_index);**
This disables all monitors and removes settings from previously configured monitors. Wouldn't it be better to move the disable/enable of of this function and wrap it around the loop?
for loopMetadata
Metadata
Assignees
Labels
sbsaServer Base System Architecture ACS specific issues/enhancements/questions.Server Base System Architecture ACS specific issues/enhancements/questions.