On 26/06/17 04:50AM, Saif Abrar wrote:
> <...snip...>
>
> @@ -724,6 +762,7 @@ static void pnv_phb4_reg_write(void *opaque, hwaddr off,
> uint64_t val,
> pnv_phb4_update_all_msi_regions(phb);
> }
> break;
> +
> case PHB_M32_START_ADDR:
> case PHB_M64_UPPER_BITS:
> if (changed) {
> @@ -771,27 +810,63 @@ static void pnv_phb4_reg_write(void *opaque, hwaddr
> off, uint64_t val,
> break;
>
> /* Silent simple writes */
> - case PHB_ASN_CMPM:
> - case PHB_CONFIG_ADDRESS:
> - case PHB_IODA_ADDR:
> - case PHB_TCE_KILL:
> - case PHB_TCE_SPEC_CTL:
> - case PHB_PEST_BAR:
> - case PHB_PELTV_BAR:
Few of these are not handled in new code, like ASN_CMPM.
As you said in v4 that these are removed in PHB5 spec. The ASN_CMPM in
particular was anyways a silent skip, and now it will turn up as
unimplemented.
With separation of phb5, i will let you remove them or keep them as
silent skip for phb4.
Can you also check if there are any other such regs which may have been
skipped ?
> --- a/tests/qtest/pnv-phb-test.c
> +++ b/tests/qtest/pnv-phb-test.c
> @@ -88,11 +88,10 @@ static void phb5_sticky_rst_test(QTestState *qts)
> g_assert_cmpuint(val, ==, (PPC_BITMASK(24, 27) | PPC_BITMASK(36, 37) |
> PPC_BITMASK(39, 45) | PPC_BITMASK(47, 48) |
> PPC_BITMASK(52, 54)));
> -
> }
>
> /* Check that write-only bits/regs return 0 when read */
> -static void phb4_writeonly_read_test(QTestState *qts)
> +static void phb5_writeonly_read_test(QTestState *qts)
> {
> uint64_t val;
>
> @@ -143,6 +142,12 @@ static void phb4_writeonly_read_test(QTestState *qts)
> g_assert_cmpuint(val, ==, 0x0);
> }
>
> +/* Check that reading an unimplemented address 0x0 returns -1 */
> +static void phb5_unimplemented_read_test(QTestState *qts)
> +{
> + g_assert_cmpint(PHB5_XSCOM_READ(0x0), ==, -1);
> +}
> +
> static void phb5_tests(void)
> {
> QTestState *qts = NULL;
> @@ -156,7 +161,10 @@ static void phb5_tests(void)
> phb5_sticky_rst_test(qts);
>
> /* Check write-only logic */
> - phb4_writeonly_read_test(qts);
> + phb5_writeonly_read_test(qts);
With PHB5 separated out from PHB4, let's keep phb4_writeonly_read_test
also.
Thanks,
- Aditya G