On Tue, 2018-05-08 at 11:14 +0200, Marcin Maka wrote:
There is a HAL function xthal_get_prid() as well as XTHAL_GET_PRID() macro already provided by the HAL.
Hi Maka, you can search my first version of this patch,
xthal_get_prid is used. i change this for Liam
advised me not to call this function in generic code
Sure, there should be a generic int cpu_get_id(void) visible to the generic code, either #define'd or implemented as a call to xthal_get_prid() in xtensa arch specific implementation.
I'm just not sure what is the point of having another asm implementation, not use the one already provided by the HAL lib.
The idea here is to make any coupling to Xtos/HAL as a loose as possible. This way we can use a thin abstraction (that will mostly compile out) to use other RTOSes (like Zephyr) to provide HAL/xtos like functionality. The abstraction becomes thinner the more we can loosen the coupling.
Liam