[Skiboot] [PATCH 5/5] npu2: Move to new GPU memory map

Michael Neuling mikey at neuling.org
Tue Nov 14 21:50:58 AEDT 2017


> > +       /* Get 0x05011c0c bit 2 = 1 */
> > +       xscom_read(p->chip_id, PB_CENT_HP_MODE_CURR, &val);
> > +       if ((val & PB_CFG_CHG_RATE_GP_MASTER) != 0) {
> > +               /* Get 0x05011c0a bits 42:48 */
> > +               xscom_read(p->chip_id, PB_CENT_MODE, &val);
> > +               if (GETFIELD(PB_CFG_CHIP_ADDR_EXTENSION_MASK_CENT, val) == 0) {
> > +                       /* 1) */
> > +                       NPU2DBG(p, "Using old memory map + MCD enabled in skiboot\n");
> > +                       NPU2ERR(p, "!!! Old firmware detected. Update hostboot for new MCD mapping !!!\n");
> > +                       p->gpu_map_type = GPU_MEM_4T_DOWN;
> > +                       npu2_mcd_init(p);
> > +               } else {
> > +                       /* 2) */
> > +                       NPU2DBG(p, "Using small memory map + MCD enabled\n");
> > +                       p->gpu_map_type = GPU_MEM_4T_UP;
> 
> Should be explicitly check if GETFIELD(..., val) == 3? I think it
> might be safer.

ok.  I could return an error if that happens I guess.

Mikey


More information about the Skiboot mailing list