[Pdbg] [PATCH 6/7] libpdbg/htm: Enable NCU and set single dispatch/instruction mode

Alistair Popple alistair at popple.id.au
Fri Mar 16 13:38:27 AEDT 2018


> +	/* Not great to assume the core is the parent of the htm. */

What are the chances of you having time to fix this TODO? Eg. something like
pdbg_get_parent(child, class) that would just walk up the tree until the write
target was found would be much nicer.

> +	if (HTM_ERR(pib_write(htm->target.dn->parent->target, HID0_REGISTER, hid0)))
> +		return -1;
> +
> +	/* Not great to assume the core is the parent of the htm. */
> +	if (HTM_ERR(pib_read(htm->target.dn->parent->target, NCU_MODE_REGISTER, &ncu)))
> +		return -1;
> +
> +	ncu |= NCU_MODE_HTM_ENABLE;
> +
> +	/* Not great to assume the core is the parent of the htm. */
> +	if (HTM_ERR(pib_write(htm->target.dn->parent->target, NCU_MODE_REGISTER, ncu)))
>  		return -1;
>  
>  	return 0;
> 




More information about the Pdbg mailing list