Commit Graph

8 Commits

Author SHA1 Message Date
Anup Patel e34aa8a671 lib: Simplify sbi_platform irqchip_init() hooks
Instead of having separate irqchip_init() hooks for cold and
warm boot, this patch updates struct sbi_platform to have just
one irqchip_init() hook. The type of boot (cold or warm) is now
a boolean flag parameter for the updated irqchip_init() hook.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-27 09:35:09 +05:30
Anup Patel 7b59571758 lib: Simplify sbi_platform early_init() and final_init() hooks
Instead of having separate early_init() and final_init() hooks
for cold and warm boot, this patch updates struct sbi_platform
to have just one early_init() and one final_init() hook. The
type of boot (cold or warm) is now a boolean flag parameter for
the updated early_init() and final_init() hooks.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-27 09:35:09 +05:30
Anup Patel 472d3f4e17 platform: Remove PLAT_HART_COUNT and PLAT_HART_STACK_SIZE
The PLAT_HART_COUNT and PLAT_HART_STACK_SIZE are only used
by platform code so no need of exposing these to everyone
by adding it to platform-cppflags-y.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-22 21:01:40 +05:30
Anup Patel 24b4d48674 platform: Remove PLAT_NAME from all platforms
The PLAT_NAME is used only in platform.c for all platforms hence
remove it.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-22 20:49:52 +05:30
Atish Patra 88b173b33b Introduce hart disabled parameter in platform.
As of now, uboot doesn't have support for SMP.
Moreover, unleashed board has a E51 hart which
doesn't not support S mode.

We should only boot only 1 non-zero hart.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
2018-12-21 22:11:21 -08:00
Anup Patel a6a5bb22a8 Fix plic warm init in platform code.
Pass S-Mode and M-mode context id separately to common warm init.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-21 22:11:21 -08:00
Damien Le Moal aa68f0252f Refine platform features control
Allow a platform to report its supported features in more details.
The new features defined are:
* SBI_PLATFORM_HAS_PMP
* SBI_PLATFORM_HAS_SCOUNTEREN
* SBI_PLATFORM_HAS_MCOUNTEREN

In addition, define the macro SBI_PLATFORM_DEFAULT_FEATURES as the set
of features that are generally expected to be supported by a Linux
capable platform.

Operations touching the features controlled with these falgs are not
executed if the platform does not set the corresponding feature flags.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
2018-12-21 15:09:13 +09:00
Anup Patel 089f70a179 top: Rename "plat" to "platform" everywhere
This patch renames "plat" to "platform" everywhere for better
readablility.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
2018-12-21 10:35:04 +05:30