[Skiboot] [PATCH 34/61] hw/phb5: Add initial support
Frederic Barrat
fbarrat at linux.ibm.com
Thu Jul 22 00:40:16 AEST 2021
> diff --git a/hw/phb4.c b/hw/phb4.c
> index 31f9fa250..033f08e6c 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -4979,9 +5014,12 @@ static void phb4_init_ioda3(struct phb4 *p)
> /* Init_24 - CRW Base Address Reg */
> /* See enable_capi_mode() */
>
> - /* Init_25 - ASN Compare/Mask */
> - out_be64(p->regs + PHB_ASN_CMPM, ((u64)ASNIND << 48) |
> - ((u64)ASNMASK << 32) | PHB_ASN_CMPM_ENABLE);
> + if (is_phb4()) {
> + /* TODO (clg): unused on P10 */
> + /* Init_25 - ASN Compare/Mask */
> + out_be64(p->regs + PHB_ASN_CMPM, ((u64)ASNIND << 48) |
> + ((u64)ASNMASK << 32) | PHB_ASN_CMPM_ENABLE);
> + }
We can drop the TODO comment, the code is correct as is. The "ASN
compare/mask" register is for PCI tunneled operations, which are
specific to P9.
> @@ -5976,8 +6072,11 @@ static void phb4_probe_stack(struct dt_node *stk_node, uint32_t pec_index,
> }
>
> /* Clear errors in PFIR and NFIR */
> - xscom_write(gcid, pci_stack + XPEC_PCI_STK_PCI_FIR, 0);
> - xscom_write(gcid, nest_stack + XPEC_NEST_STK_PCI_NFIR, 0);
> + if (is_phb4()) {
> + /* TODO (clg): unused on P10 */
> + xscom_write(gcid, pci_stack + XPEC_PCI_STK_PCI_FIR, 0);
> + xscom_write(gcid, nest_stack + XPEC_NEST_STK_PCI_NFIR, 0);
> + }
We actually need this for phb4 and 5. I've clarified it with Cedric (aka
clg). The if statement was to quiet a slightly overzealous warning in
simics.
Fred
More information about the Skiboot
mailing list