summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2018-12-26lib: Add misaligned load/store trap handlingAnup Patel
We generally don't get misaligned load/store traps from Linux/U-Boot compiled using GCC 8.2 or higher but this is not true with older GCC toolchains. To tackle this we add misaligned load/store trap handling adopted from BBL sources but much more simpler. (Note: BBL sources can be found at https://github.com/riscv/riscv-pk.git) Signed-off-by: Anup Patel <[email protected]>
2018-12-26lib: Move instruction encoding macros to riscv_encoding.hAnup Patel
This patch moves all instruction encoding macros to riscv_encoding.h. Signed-off-by: Anup Patel <[email protected]>
2018-12-22firmware: Don't depend on PLAT_HART_COUNT and PLAT_HART_STACK_SIZEAnup Patel
The hart_count and hart_stack_size information is already available in "struct sbi_platform" so we use that instead of depending on PLAT_HART_COUNT and PLAT_HART_STACK_SIZE. Signed-off-by: Anup Patel <[email protected]>
2018-12-21Introduce hart disabled parameter in platform.Atish Patra
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 <[email protected]>
2018-12-21Introduce HAS_MFAULTS_DELEGATION featureDamien Le Moal
Conditionnally delegate page fault exceptions from M mode to S mode based on the platform features. Signed-off-by: Damien Le Moal <[email protected]>
2018-12-21Introduce sbi_current_hartid()Damien Le Moal
Use this helper instead of hardcoding csr_read(mhartid). Signed-off-by: Damien Le Moal <[email protected]>
2018-12-21Cleanup and rename sbi_hart_boot_next()Damien Le Moal
Cleanup sbi_hart_boot_nexti() code, adding messages for clarity and rename the function to sbi_hart_switch_mode() to reflect what the function actually does. Signed-off-by: Damien Le Moal <[email protected]>
2018-12-21Refine platform features controlDamien Le Moal
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 <[email protected]>
2018-12-20Use wfi for coldboot finish call.Atish Patra
Signed-off-by: Atish Patra <[email protected]>
2018-12-11Initial commit.Anup Patel
Signed-off-by: Anup Patel <[email protected]>