[PATCH 5/7] examples: fix incompatible type casts

2020-04-20 Thread mhorne
From: Mitchell Horne Some printf statements in the API demo assume pointers to be 32-bits long, presumably since it was originally developed for 32-bit arm. This generates a number of warnings when compiling for 64-bit architectures, and may result in truncation of these values. Fix this by avoid

[PATCH 7/7] api: enumerate virtio-blk devices

2020-04-20 Thread mhorne
From: Mitchell Horne API clients can make a syscall requesting the enumeration of network and storage devices. However, this does not check for virtio-blk storage devices, which API consumers may wish to use. Add the support to enumerate these devices as well. Signed-off-by: Mitchell Horne ---

[PATCH 6/7] riscv: add CONFIG_API support

2020-04-20 Thread mhorne
From: Mitchell Horne Add the necessary changes to allow building the CONFIG_API option on the RISC-V architecture. The downstream consumer of this API is the u-boot version of FreeBSD's loader(8). This enables the loader to be ported to RISC-V. Signed-off-by: Mitchell Horne Cc: r...@andestech.c

[PATCH 4/7] examples: fix the type of search_hint

2020-04-20 Thread mhorne
From: Mitchell Horne search_hint is defined in assembly as a .long, and is intended to hold the initial stack pointer as a hint to the api_search_sig() routine. Convert this to a uintptr_t, to avoid possible truncation on 64-bit systems. Signed-off-by: Mitchell Horne --- examples/api/glue.c |

[PATCH 3/7] examples: add a linker script for the API demo

2020-04-20 Thread mhorne
From: Mitchell Horne When compiling the API demo program, the first object file in the linker arguments is crt0.o, which contains the _start routine. This is done with the hope that it will appear first in the .text section, but the linker doesn't guarantee this behaviour. Add a simple linker sc

[PATCH 2/7] examples: rename __start to _start on MIPS

2020-04-20 Thread mhorne
From: Mitchell Horne On MIPS, __start marks the entry point to the CONFIG_API demo program. Change the name to _start, to be consistent with all other architectures. Signed-off-by: Mitchell Horne --- examples/api/crt0.S | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 1/7] examples: generate demo.bin

2020-04-20 Thread mhorne
From: Mitchell Horne The CONFIG_API option builds the example program, examples/api/demo, as an ELF file. The make logic exists to create a binary as well, so add the target to do so. Signed-off-by: Mitchell Horne --- examples/api/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-

[PATCH 0/7] Add support for CONFIG_API on RISC-V

2020-04-20 Thread mhorne
From: Mitchell Horne FreeBSD makes use of u-boot's CONFIG_API to provide a version of its standard bootloader for embedded architectures. This series adds the necessary support for the RISC-V architecture, along with some small fixes to the API demo program for 64-bit systems. Mitchell Horne (7)