>
> +#include "hw/core/sysbus.h"
> +#include "hw/core/register.h"
> +#include "system/dma.h"
> +#include "qom/object.h"
> +#include "cpu.h"
> +
> +#define TRACE_R_MAX (0xFFF / 4)
>

The Trace Control Interface register map covers offsets 0x000 through 0xFFF,
i.e. a 4-KiB window. Here 0xFFF / 4 evaluates to 1023,
which is the last valid index, not the number of 32-bit entries.
Since TRACE_R_MAX is later used as the default reg-mem-size via TRACE_R_MAX
* 4, the default MMIO region is only 0xFFC bytes long.
It therefore covers offsets 0x000 through 0xFFB, leaving the final word at
0xFFC through 0xFFF outside the region.

Thanks
Jay Chang

Reply via email to