[opensbi] porting: adapt to CV180X / CV181X

Change-Id: Id7b3c64d203eb2c9af6c66f195bf0d8a05f0164c
This commit is contained in:
sam.xiang
2023-02-21 20:43:18 +08:00
parent 93f81bd490
commit 2e8190643f
4 changed files with 30 additions and 1 deletions

16
opensbi/.clang-format Normal file
View File

@ -0,0 +1,16 @@
AlignConsecutiveAssignments: true
AlignEscapedNewlines: Left
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: None
BraceWrapping:
AfterFunction: true
BreakBeforeBraces: Custom
BreakStringLiterals: false
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
IndentWidth: 8
ReflowComments: false
SortIncludes: false
SpacesInContainerLiterals: false
TabWidth: 8
UseTab: Always

11
opensbi/.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
# Object files
*.o
*.a
*.dep
#Build & install directories
build/
install/
# Development friendly files
tags

1
opensbi/lib/utils/serial/fdt_serial_uart8250.c Normal file → Executable file
View File

@ -26,6 +26,7 @@ static int serial_uart8250_init(void *fdt, int nodeoff,
} }
static const struct fdt_match serial_uart8250_match[] = { static const struct fdt_match serial_uart8250_match[] = {
{ .compatible = "snps,dw-apb-uart" },
{ .compatible = "ns16550" }, { .compatible = "ns16550" },
{ .compatible = "ns16550a" }, { .compatible = "ns16550a" },
{ }, { },

View File

@ -28,7 +28,8 @@ else
# This needs to be 2MB aligned for 64-bit system # This needs to be 2MB aligned for 64-bit system
FW_JUMP_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x200000))) FW_JUMP_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x200000)))
endif endif
FW_JUMP_FDT_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x2200000))) #set FDT_ADDR 0xB0000000
FW_JUMP_FDT_ADDR=$(shell printf "0x%X" $$(($(FW_TEXT_START) + 0x30000000)))
FW_PAYLOAD=y FW_PAYLOAD=y
ifeq ($(PLATFORM_RISCV_XLEN), 32) ifeq ($(PLATFORM_RISCV_XLEN), 32)
# This needs to be 4MB aligned for 32-bit system # This needs to be 4MB aligned for 32-bit system