Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RISC-V V Support #2

Draft
wants to merge 3 commits into
base: cheshire
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions arch/riscv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y)
CMODEL = medany
endif

ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI) \
-mcmodel=$(CMODEL)
# hacky fix, to make the image for Cheshire + Ara
ifeq ($(RVV), 1)
ARCH_FLAGS=-march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C)_zicsr_zifencei -mabi=$(ABI) -mcmodel=$(CMODEL)
else
ARCH_FLAGS=-march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI) -mcmodel=$(CMODEL)
endif

PLATFORM_CPPFLAGS += $(ARCH_FLAGS)
CFLAGS_EFI += $(ARCH_FLAGS)
Expand Down
3 changes: 2 additions & 1 deletion configs/pulp-platform_cheshire_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ CONFIG_BOOTDELAY=5
CONFIG_HUSH_PARSER=y
CONFIG_USE_BOOTCOMMAND=y
# Boot with mmc if mmc probes normally, else boot with spi (get CS from "boot-with" in device tree)
CONFIG_BOOTCOMMAND="fdt addr ${fdtcontroladdr}; if mmc info; then mmc read 90000000 2000 5000; else fdt get value boot-with /soc/spi boot-with; if sf probe 0:${boot-with}; then sf read 90000000 400000 800000; fi; fi; bootm 90000000 - ${fdtcontroladdr};"
# CONFIG_BOOTCOMMAND="fdt addr ${fdtcontroladdr}; if mmc info; then mmc read 90000000 2000 5000; else fdt get value boot-with /soc/spi boot-with; if sf probe 0:${boot-with}; then sf read 90000000 400000 800000; fi; fi; bootm 90000000 - ${fdtcontroladdr};"
CONFIG_BOOTCOMMAND="sf probe 0:1; sf read 90000000 400000 2000000; bootm 90000000 - ${fdtcontroladdr};"
CONFIG_DISPLAY_CPUINFO=y
CONFIG_SPL_SPI_FLASH_MTD=y
CONFIG_CMD_GPT=y
Expand Down