Skip to content

Commit

Permalink
conf/evalsoc: change ddr base from 0xA0000000 to 0x80000000, size 2G
Browse files Browse the repository at this point in the history
1. default CPU HZ changed from 100M to 50M
2. uboot boot delay changed to 5s

Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Jun 2, 2023
1 parent f2e983c commit 72a253a
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 20 deletions.
6 changes: 3 additions & 3 deletions conf/evalsoc/build.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
UIMAGE_AE_CMD := -a 0xA0400000 -e 0xA0400000
# qemu currently not work for evalsoc
QEMU_MACHINE_OPTS := -M nuclei_u,download=flashxip -smp 8 -m 1.5G
UIMAGE_AE_CMD := -a 0x80400000 -e 0x80400000
# qemu currently not work for evalsoc for qemu <= 2022.12
QEMU_MACHINE_OPTS := -M nuclei_evalsoc,download=flashxip -smp 8 -m 2G
# initramfs pre command before generate initrd ramfs
INITRAMFS_PRECMD := bash $(confdir)/preramfs.sh $(confdir) $(buildroot_initramfs_sysroot) copyfiles.txt
# eg. $(confdir)/amp/cx.bin
Expand Down
4 changes: 2 additions & 2 deletions conf/evalsoc/freeloader.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DDR_BASE ?= 0xA0000000
DDR_BASE ?= 0x80000000
FLASH_BASE ?= 0x20000000
FLASH_SIZE ?= 32M
CACHE_CTRL ?= 0x100C1
Expand All @@ -10,6 +10,6 @@ SPFL1DCTRL2 ?=
MERGL1DCTRL ?= 0x013503FF
ENABLE_SMP ?= 1
ENABLE_L2 ?= 1
AMPFW_START_OFFSET ?= 0x5E000000
AMPFW_START_OFFSET ?= 0x7E000000
AMPFW_SIZE ?= 0x400000
AMP_START_CORE ?= 8
4 changes: 2 additions & 2 deletions conf/evalsoc/nuclei_rv64imac.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define TIMERCLK_FREQ 32768
#endif
#ifndef CPUCLK_FREQ
#define CPUCLK_FREQ 100000000
#define CPUCLK_FREQ 50000000
#endif
#ifndef PERIPHCLK_FREQ
#define PERIPHCLK_FREQ CPUCLK_FREQ
Expand Down Expand Up @@ -149,7 +149,7 @@

memory@A0000000 {
device_type = "memory";
reg = <0x0 0xA0000000 0x0 0x5E000000>;
reg = <0x0 0x80000000 0x0 0x7E000000>;
};

soc {
Expand Down
4 changes: 2 additions & 2 deletions conf/evalsoc/nuclei_rv64imafdc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define TIMERCLK_FREQ 32768
#endif
#ifndef CPUCLK_FREQ
#define CPUCLK_FREQ 100000000
#define CPUCLK_FREQ 50000000
#endif
#ifndef PERIPHCLK_FREQ
#define PERIPHCLK_FREQ CPUCLK_FREQ
Expand Down Expand Up @@ -149,7 +149,7 @@

memory@A0000000 {
device_type = "memory";
reg = <0x0 0xA0000000 0x0 0x5E000000>;
reg = <0x0 0x80000000 0x0 0x7E000000>;
};

soc {
Expand Down
2 changes: 1 addition & 1 deletion conf/evalsoc/opensbi/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ platform-runcmd = xl_spike \
$(build_dir)/platform/nuclei/evalsoc/firmware/fw_payload.elf

# Blobs to build
FW_TEXT_START ?= 0xA0000000
FW_TEXT_START ?= 0x80000000
FW_DYNAMIC=y
FW_JUMP=y

Expand Down
8 changes: 4 additions & 4 deletions conf/evalsoc/uboot.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ test -z "${dtbimg}" && setenv dtbimg ${bootloc}/kernel.dtb

echo "Boot images located in ${bootloc}"
echo "Loading kernel: ${kernelimg}"
fatload mmc 0 0xa1000000 ${kernelimg}
fatload mmc 0 0x81000000 ${kernelimg}
echo "Loading ramdisk: ${rootfsimg}"
fatload mmc 0 0xa8300000 ${rootfsimg}
fatload mmc 0 0x88300000 ${rootfsimg}
if test -e mmc 0 ${dtbimg} ; then
echo "Loading dtb: ${dtbimg}"
fatload mmc 0 0xa8000000 ${dtbimg}
fatload mmc 0 0x88000000 ${dtbimg}
else
echo "${dtbimg} not found, ignore it"
fi
echo "Starts booting from SD"
bootm 0xa1000000 0xa8300000 0xa8000000
bootm 0x81000000 0x88300000 0x88000000
5 changes: 3 additions & 2 deletions conf/evalsoc/uboot_rv64imac_flash_config
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ CONFIG_RISCV=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x20000
CONFIG_TARGET_NUCLEI_GENERIC_SOC=y
CONFIG_SYS_TEXT_BASE=0xA0200000
CONFIG_SYS_TEXT_BASE=0x80200000
CONFIG_ARCH_RV64I=y
CONFIG_CMODEL_MEDANY=y
CONFIG_RISCV_SMODE=y
CONFIG_SBI_V01=y
CONFIG_SHOW_REGS=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=5
CONFIG_LOG_MAX_LEVEL=8
CONFIG_LOG_DEFAULT_LEVEL=6
CONFIG_DISPLAY_CPUINFO=y
Expand All @@ -36,4 +37,4 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_RISCV_SBI_CONSOLE=y
CONFIG_HEXDUMP=y
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="bootm 0xA1000000 0xA8300000 0xA8000000"
CONFIG_BOOTCOMMAND="bootm 0x81000000 0x88300000 0x88000000"
3 changes: 2 additions & 1 deletion conf/evalsoc/uboot_rv64imac_sd_config
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ CONFIG_RISCV=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x20000
CONFIG_TARGET_NUCLEI_GENERIC_SOC=y
CONFIG_SYS_TEXT_BASE=0xA0200000
CONFIG_SYS_TEXT_BASE=0x80200000
CONFIG_ARCH_RV64I=y
CONFIG_CMODEL_MEDANY=y
CONFIG_RISCV_SMODE=y
CONFIG_SBI_V01=y
CONFIG_SHOW_REGS=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=5
CONFIG_LOG_MAX_LEVEL=8
CONFIG_LOG_DEFAULT_LEVEL=6
CONFIG_DISPLAY_CPUINFO=y
Expand Down
5 changes: 3 additions & 2 deletions conf/evalsoc/uboot_rv64imafdc_flash_config
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ CONFIG_RISCV=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x20000
CONFIG_TARGET_NUCLEI_GENERIC_SOC=y
CONFIG_SYS_TEXT_BASE=0xA0200000
CONFIG_SYS_TEXT_BASE=0x80200000
CONFIG_ARCH_RV64I=y
CONFIG_CMODEL_MEDANY=y
CONFIG_RISCV_SMODE=y
CONFIG_SBI_V01=y
CONFIG_SHOW_REGS=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=5
CONFIG_LOG_MAX_LEVEL=8
CONFIG_LOG_DEFAULT_LEVEL=6
CONFIG_DISPLAY_CPUINFO=y
Expand All @@ -36,4 +37,4 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_RISCV_SBI_CONSOLE=y
CONFIG_HEXDUMP=y
CONFIG_USE_BOOTCOMMAND=y
CONFIG_BOOTCOMMAND="bootm 0xA1000000 0xA8300000 0xA8000000"
CONFIG_BOOTCOMMAND="bootm 0x81000000 0x88300000 0x88000000"
3 changes: 2 additions & 1 deletion conf/evalsoc/uboot_rv64imafdc_sd_config
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
CONFIG_RISCV=y
CONFIG_SYS_TEXT_BASE=0x80200000
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x20000
CONFIG_TARGET_NUCLEI_GENERIC_SOC=y
CONFIG_SYS_TEXT_BASE=0xA0200000
CONFIG_ARCH_RV64I=y
CONFIG_CMODEL_MEDANY=y
CONFIG_RISCV_SMODE=y
CONFIG_SBI_V01=y
CONFIG_SHOW_REGS=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_BOOTDELAY=5
CONFIG_LOG_MAX_LEVEL=8
CONFIG_LOG_DEFAULT_LEVEL=6
CONFIG_DISPLAY_CPUINFO=y
Expand Down

0 comments on commit 72a253a

Please sign in to comment.