summaryrefslogtreecommitdiff
path: root/platform/template
AgeCommit message (Collapse)AuthorFilesLines
2019-04-24all: run clang-format and update checked-in filesOlof Johansson1-18/+16
Noisy commit, no functional changes. Generated with an current upstream clang-format and: clang-format -i $(find . -name \*.[ch]) Signed-off-by: Olof Johansson <olof@lixom.net>
2019-03-06platform: Make the `platform` read-onlyXiang Wang1-1/+1
platform should be a read-only variable, if it is placed in the data segment, it may be exploited. Signed-off-by: Xiang Wang <wxjstz@126.com>
2019-03-05lib:platform: Fix sbi_getc return type.Atish Patra1-1/+1
As per the current SBI specification, sbi_getc should return an int instead of char. In case of FIFO is empty, return -1 as per the specification. Reported-by: Sergi Granell <xerpi.g.12@gmail.com> Suggested-by:Thadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br> Signed-off-by: Atish Patra <atish.patra@wdc.com>
2019-02-19template: Fix some callback namesSergi Granell1-3/+3
2019-02-19template: Remove trailing ';'Sergi Granell1-1/+1
2019-02-19template: Fix typo in platform_final_initSergi Granell1-1/+1
There was a space instead of '_' in the function `platform_final_init`.
2019-02-15Makefile: Add 'make run' command for platform specific runOlof Johansson1-2/+8
Makes for easy and quick build-run one-stop command. For now only added for qemu targets. It can be added for any platform having simulator/emulator (such as QEMU). Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-02-12Makefile: Set ABI, ISA and Code Model in top-level makeAnup Patel1-8/+12
This patch introduces following optional PLATFORM options: PLATFORM_RISCV_XLEN -> RISC-V register width PLATFORM_RISCV_ABI -> RISC-V GCC ABI PLATFORM_RISCV_ISA -> RISC-V GCC ISA string PLATFORM_RISCV_CODE_MODEL -> RISC-V GCC Code Model If the above options are not provided by platform config.mk or by command-line parameters then: 1. PLATFORM_RISCV_XLEN will be determined using toolchain capability 2. PLATFORM_RISCV_ABI, PLATFORM_RISCV_ISA, and PLATFORM_RISCV_CODE_MODEL is set to value best suited for generic libsbi.a As a result of these optional PLATFORM options, the platform-cflags-y and platform-asflags-y is further simplified for platform config.mk. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-02-12platform: template: Improve comments for FW_JUMP_ADDR and FW_PAYLOAD_OFFSETAnup Patel1-3/+13
Both FW_JUMP_ADDR and FW_PAYLOAD_OFFSET, should be: 1. 4MB aligned for 32bit system 2. 2MB aligned for 64bit system Explicitly specify the above details in config.mk comments for template platform. Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-02-08platform: template: Move kernel start address to 4MB allignedAlistair Francis1-2/+4
In order to support 32-bit guests move the start address to a 4MB allignment. As 64-bit kernels have a requirement on being 2MB alligned let's just make this the default for both 32 and 64 bit kernels. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-02-08platform/qemu/virt: Dynamically calculate xlenAlistair Francis1-0/+2
The QEMU virt machine can be either 32 or 66 bit. Don't hard code the CPU bit length and instead let the compiler determine it. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-01-24platform: add template platform filesDamien Le Moal3-0/+319
Create commented template files to use as a base for new platforms support implementation. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>