composite
composite copied to clipboard
Hardware device identification
Currently in cos_hw_attach()
, hwid_t
is actually the 'IRQ line number' and the API supports IRQ numbers 32-63 requiring users to actually pass the hwid_t number 32-63 which isn't a good design for a API to expose the internal or machine-level details to the users.
ex: cos_hw_attach(BOOT_CAPTBL_SELF_INITHW_BASE, 32 + i, irq_arcvcap[i]);
This needs to be fixed in kernel/include/hw.h
and kernel/include/shared/cos_types.h
by allowing kernel API to abstract away the machine level details perhaps by handling the offsets from within the kernel. That would allow users to use the API starting hwid_t at 0:
like: cos_hw_attach(BOOT_CAPTBL_SELF_INITHW_BASE, i, irq_arcvcap[i]);