mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-15 19:31:32 +00:00
docs: Add description of using OPENSBI_EXTERNAL_SBI_TYPES
Add description of using OPENSBI_EXTERNAL_SBI_TYPES in external firmware code base. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
parent
e340bbf7b5
commit
b28b8ac0d2
1 changed files with 21 additions and 0 deletions
|
@ -66,3 +66,24 @@ bootloader to service the following interrupts and traps:
|
|||
|
||||
**Note:** external firmwares or bootloaders can be more conservative by
|
||||
forwarding all traps and interrupts to *sbi_trap_handler()*.
|
||||
|
||||
Definitions of OpenSBI Data Types for the External Firmware
|
||||
-----------------------------------------------------------
|
||||
|
||||
OpenSBI can be built as library using external firmware build system such as EDK2
|
||||
code base (The open source of UEFI firmware implementation) and linked with external
|
||||
firmware drivers based on the external firmware architecture.
|
||||
|
||||
**OPENSBI_EXTERNAL_SBI_TYPES** identifier is introduced to *sbi_types.h* for selecting
|
||||
external header file during the build preprocess in order to define OpensSBI data types
|
||||
based on external firmware data type binding.
|
||||
For example, *bool* is declared as *int* in sbi_types.h. However in EDK2 build system,
|
||||
*bool* is declared as *BOOLEAN* which is defined as *unsigned char* data type.
|
||||
|
||||
External firmware can define **OPENSBI_EXTERNAL_SBI_TYPES** in CFLAGS and specify it to the
|
||||
header file maintained in its code tree. However, the external build system has to address
|
||||
the additional include directory for the external header file based on its own build system.
|
||||
For example,
|
||||
*-D***OPENSBI_EXTERNAL_SBI_TYPES***=OpensbiTypes.h*
|
||||
Above tells *sbi_types.h* to refer to *OpensbiTypes.h* instead of using original definitions of
|
||||
data types.
|
||||
|
|
Loading…
Add table
Reference in a new issue