opensbi/firmware
Anup Patel c51f02cf14 include: sbi_platform: Introduce HART index to HART id table
A platform can have discontinuous and/or sparse HART ids so we
cannot always assume a set of HARTs with continuous HART ids.

This patch adds support for discontinuous and sparse HART ids by
introducing HART index to HART id table. This table has platform
hart_count entries and it maps HART index to HART id.

The HART index to HART id table has only two restrictions:
1. HART index < sbi_platform hart_count
2. HART id < SBI_HARTMASK_MAX_BITS

Example1:
Let's say we have a platform with 2 HART ids 11 and 22, for such a
a platform:
hart_count = 2
hart_index2id[0] = 11
hart_index2id[1] = 22

Example2:
Let's say we have a platform with 5 HARTs ids 0, 1, 2, 3, and 4
but out of these HART with id 0 is not usable so for such a platform:
hart_count = 5
hart_index2id[0] = -1U
hart_index2id[1] = 1
hart_index2id[2] = 2
hart_index2id[3] = 3
hart_index2id[4] = 4
OR
hart_count = 4
hart_index2id[0] = 1
hart_index2id[1] = 2
hart_index2id[2] = 3
hart_index2id[3] = 4

With HART index to HART id table in place, the hart_disabled()
callback is now redundant so we remove it as well.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-03-19 09:30:01 +05:30
..
payloads firmware: Fix placement of .align directives 2020-01-10 09:30:27 +05:30
external_deps.mk TOP: Allow building platform out-of-tree 2019-04-09 09:14:09 +05:30
fw_base.S include: sbi_platform: Introduce HART index to HART id table 2020-03-19 09:30:01 +05:30
fw_base.ldS firmware: add missing linker sections to fw_base.ldS 2019-06-12 17:43:47 +05:30
fw_dynamic.S firmware: Fix placement of .align directives 2020-01-10 09:30:27 +05:30
fw_dynamic.elf.ldS firmware: Relocate when load address is not equal to link address 2019-06-12 17:56:28 +05:30
fw_jump.S firmware: Fix placement of .align directives 2020-01-10 09:30:27 +05:30
fw_jump.elf.ldS firmware: Relocate when load address is not equal to link address 2019-06-12 17:56:28 +05:30
fw_payload.S firmware: Fix placement of .align directives 2020-01-10 09:30:27 +05:30
fw_payload.elf.ldS firmware: Relocate when load address is not equal to link address 2019-06-12 17:56:28 +05:30
objects.mk firmware: Add fw_dynamic firmware 2019-05-10 12:26:22 +05:30