Commit 6b2924bb authored by Manish Pandey's avatar Manish Pandey Committed by TrustedFirmware Code Review
Browse files

Merge changes Ic9bacaf3,I99a18dbb,I34803060,I3ed55aa4,Ic8eed072, ... into integration

* changes:
  doc: renesas: Update RZ/G2 code owner list
  plat: renesas: rzg: DT memory node enhancements
  renesas: rzg: emmc: Enable RZ/G2M support
  plat: renesas: rzg: Add HopeRun HiHope RZ/G2M board support
  drivers: renesas: rzg: Add HiHope RZ/G2M board support
  tools: renesas: Add tool support for RZ/G2 platforms
parents 3adf6012 afda405b
......@@ -15,6 +15,10 @@ tools/renesas/rcar_layout_create/*.bin
tools/renesas/rcar_layout_create/*.srec
tools/renesas/rcar_layout_create/*.map
tools/renesas/rcar_layout_create/*.elf
tools/renesas/rzg_layout_create/*.bin
tools/renesas/rzg_layout_create/*.srec
tools/renesas/rzg_layout_create/*.map
tools/renesas/rzg_layout_create/*.elf
tools/fiptool/fiptool
tools/fiptool/fiptool.exe
tools/cert_create/src/*.o
......
......@@ -494,6 +494,8 @@ Renesas RZ/G2 platform port
:G: `bijucdas`_
:M: Marek Vasut <marek.vasut@gmail.com>
:G: `marex`_
:M: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
:G: `prabhakarlad`_
:F: docs/plat/rz-g2.rst
:F: plat/renesas/common
:F: plat/renesas/rzg
......@@ -637,6 +639,7 @@ Build system
.. _mtk09422: https://github.com/mtk09422
.. _niej: https://github.com/niej
.. _npoushin: https://github.com/npoushin
.. _prabhakarlad: https://github.com/prabhakarlad
.. _qoriq-open-source: https://github.com/qoriq-open-source
.. _remi-triplefault: https://github.com/repk
.. _rockchip-linux: https://github.com/rockchip-linux
......
......@@ -11,11 +11,11 @@
#define MMC_CH0 (0U) /* SDHI2/MMC0 */
#define MMC_CH1 (1U) /* SDHI3/MMC1 */
#if RCAR_LSI == RCAR_E3
#define USE_MMC_CH (MMC_CH1) /* R-Car E3 */
#else /* RCAR_LSI == RCAR_E3 */
#if (RCAR_LSI == RCAR_E3) || (RCAR_LSI == RZ_G2M)
#define USE_MMC_CH (MMC_CH1) /* R-Car E3 or RZ/G2M */
#else /* RCAR_LSI == RCAR_E3 || RCAR_LSI == RZ_G2M */
#define USE_MMC_CH (MMC_CH0) /* R-Car H3/M3/M3N */
#endif /* RCAR_LSI == RCAR_E3 */
#endif /* RCAR_LSI == RCAR_E3 || RCAR_LSI == RZ_G2M */
#define BIT0 (0x00000001U)
#define BIT1 (0x00000002U)
......
/*
* Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <lib/mmio.h>
#include <lib/utils_def.h>
#include "board.h"
#include "rcar_def.h"
#ifndef BOARD_DEFAULT
#define BOARD_DEFAULT (BOARD_HIHOPE_RZ_G2M << BOARD_CODE_SHIFT)
#endif /* BOARD_DEFAULT */
#define BOARD_CODE_MASK (0xF8U)
#define BOARD_REV_MASK (0x07U)
#define BOARD_CODE_SHIFT (0x03)
#define BOARD_ID_UNKNOWN (0xFFU)
#define GPIO_INDT5 0xE605500C
#define GP5_19_BIT (0x01U << 19)
#define GP5_21_BIT (0x01U << 21)
#define GP5_25_BIT (0x01U << 25)
#define HM_ID { 0x10U, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU }
const char *g_board_tbl[] = {
[BOARD_HIHOPE_RZ_G2M] = "HiHope RZ/G2M",
[BOARD_UNKNOWN] = "unknown"
};
void rzg_get_board_type(uint32_t *type, uint32_t *rev)
{
static uint8_t board_id = BOARD_ID_UNKNOWN;
const uint8_t board_tbl[][8] = {
[BOARD_HIHOPE_RZ_G2M] = HM_ID,
};
uint32_t reg, boardInfo;
if (board_id == BOARD_ID_UNKNOWN) {
board_id = BOARD_DEFAULT;
}
*type = ((uint32_t) board_id & BOARD_CODE_MASK) >> BOARD_CODE_SHIFT;
if (*type >= ARRAY_SIZE(board_tbl)) {
/* no revision information, set Rev0.0. */
*rev = 0;
} else {
reg = mmio_read_32(RCAR_PRR);
if ((reg & PRR_CUT_MASK) == RCAR_M3_CUT_VER11) {
*rev = board_tbl[*type][(uint8_t)(board_id & BOARD_REV_MASK)];
} else {
boardInfo = mmio_read_32(GPIO_INDT5) &
(GP5_19_BIT | GP5_21_BIT);
*rev = (((boardInfo & GP5_19_BIT) >> 14) |
((boardInfo & GP5_21_BIT) >> 17)) + 0x30U;
}
}
}
/*
* Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef RZ_G2_BOARD_H
#define RZ_G2_BOARD_H
enum rzg2_board_id {
BOARD_HIHOPE_RZ_G2M = 0,
BOARD_UNKNOWN
};
#define BOARD_REV_UNKNOWN (0xFFU)
extern const char *g_board_tbl[];
/************************************************************************
* Revisions are expressed in 8 bits.
* The upper 4 bits are major version.
* The lower 4 bits are minor version.
************************************************************************/
#define GET_BOARD_MAJOR(a) ((uint32_t)(a) >> 0x4)
#define GET_BOARD_MINOR(a) ((uint32_t)(a) & 0xF)
#define GET_BOARD_NAME(a) (g_board_tbl[(a)])
void rzg_get_board_type(uint32_t *type, uint32_t *rev);
#endif /* RZ_G2_BOARD_H */
......@@ -18,7 +18,7 @@ static void bl2_realtime_cpg_init_h3(void);
static void bl2_system_cpg_init_h3(void);
#endif
#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3)
#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3) || (RCAR_LSI == RZ_G2M)
static void bl2_realtime_cpg_init_m3(void);
static void bl2_system_cpg_init_m3(void);
#endif
......@@ -149,7 +149,7 @@ static void bl2_system_cpg_init_h3(void)
}
#endif
#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3)
#if (RCAR_LSI == RCAR_AUTO) || (RCAR_LSI == RCAR_M3) || (RCAR_LSI == RZ_G2M)
static void bl2_realtime_cpg_init_m3(void)
{
/* Realtime Module Stop Control Registers */
......@@ -362,7 +362,7 @@ void bl2_cpg_init(void)
}
#elif (RCAR_LSI == RCAR_H3) || (RCAR_LSI == RCAR_H3N)
bl2_realtime_cpg_init_h3();
#elif RCAR_LSI == RCAR_M3
#elif (RCAR_LSI == RCAR_M3) || (RCAR_LSI == RZ_G2M)
bl2_realtime_cpg_init_m3();
#elif RCAR_LSI == RCAR_M3N
bl2_realtime_cpg_init_m3n();
......@@ -408,7 +408,7 @@ void bl2_system_cpg_init(void)
}
#elif (RCAR_LSI == RCAR_H3) || (RCAR_LSI == RCAR_H3N)
bl2_system_cpg_init_h3();
#elif RCAR_LSI == RCAR_M3
#elif (RCAR_LSI == RCAR_M3) || (RCAR_LSI == RZ_G2M)
bl2_system_cpg_init_m3();
#elif RCAR_LSI == RCAR_M3N
bl2_system_cpg_init_m3n();
......
......@@ -33,6 +33,7 @@ RCAR_H3N:=4
RCAR_D3:=5
RCAR_V3M:=6
RCAR_AUTO:=99
RZ_G2M:=100
$(eval $(call add_define,RCAR_H3))
$(eval $(call add_define,RCAR_M3))
$(eval $(call add_define,RCAR_M3N))
......@@ -41,6 +42,8 @@ $(eval $(call add_define,RCAR_H3N))
$(eval $(call add_define,RCAR_D3))
$(eval $(call add_define,RCAR_V3M))
$(eval $(call add_define,RCAR_AUTO))
$(eval $(call add_define,RZ_G2M))
RCAR_CUT_10:=0
RCAR_CUT_11:=1
RCAR_CUT_13:=3
......
This diff is collapsed.
#
# Copyright (c) 2018-2020, Renesas Electronics Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
include plat/renesas/common/common.mk
ifndef LSI
$(error "Error: Unknown LSI. Please use LSI=<LSI name> to specify the LSI")
else
ifeq (${LSI},AUTO)
RCAR_LSI:=${RCAR_AUTO}
else ifeq (${LSI},G2M)
RCAR_LSI:=${RZ_G2M}
ifndef LSI_CUT
# enable compatible function.
RCAR_LSI_CUT_COMPAT := 1
$(eval $(call add_define,RCAR_LSI_CUT_COMPAT))
else
# disable compatible function.
ifeq (${LSI_CUT},10)
RCAR_LSI_CUT:=0
else ifeq (${LSI_CUT},11)
RCAR_LSI_CUT:=1
else ifeq (${LSI_CUT},13)
RCAR_LSI_CUT:=3
else ifeq (${LSI_CUT},30)
RCAR_LSI_CUT:=20
else
$(error "Error: ${LSI_CUT} is not supported.")
endif
$(eval $(call add_define,RCAR_LSI_CUT))
endif
else
$(error "Error: ${LSI} is not supported.")
endif
$(eval $(call add_define,RCAR_LSI))
endif
# Process RZG_LCS_STATE_DETECTION_ENABLE flag
# Enable to get LCS state information
ifndef RZG_LCS_STATE_DETECTION_ENABLE
RZG_LCS_STATE_DETECTION_ENABLE := 0
endif
$(eval $(call add_define,RZG_LCS_STATE_DETECTION_ENABLE))
# Process RCAR_SECURE_BOOT flag
ifndef RCAR_SECURE_BOOT
RCAR_SECURE_BOOT := 0
endif
$(eval $(call add_define,RCAR_SECURE_BOOT))
# LCS state of RZ/G2 Chip is all CM.
# However certain chips(RZ/G2M and RZ/G2E) have incorrect factory Fuse settings
# which results in getting incorrect LCS states
# if need to enable RCAR_SECURE_BOOT, make sure the chip has proper factory Fuse settings.
ifeq (${RCAR_SECURE_BOOT},1)
ifeq (${RZG_LCS_STATE_DETECTION_ENABLE},0)
$(error "Error: Please check the chip has proper factory Fuse settings and set RZG_LCS_STATE_DETECTION_ENABLE to enable.")
endif
endif
# lock RPC HYPERFLASH access by default
# unlock to repogram the ATF firmware from u-boot
ifndef RCAR_RPC_HYPERFLASH_LOCKED
RCAR_RPC_HYPERFLASH_LOCKED := 1
endif
$(eval $(call add_define,RCAR_RPC_HYPERFLASH_LOCKED))
# Process RCAR_QOS_TYPE flag
ifndef RCAR_QOS_TYPE
RCAR_QOS_TYPE := 0
endif
$(eval $(call add_define,RCAR_QOS_TYPE))
# Process RCAR_DRAM_SPLIT flag
ifndef RCAR_DRAM_SPLIT
RCAR_DRAM_SPLIT := 0
endif
$(eval $(call add_define,RCAR_DRAM_SPLIT))
# Process RCAR_BL33_EXECUTION_EL flag
ifndef RCAR_BL33_EXECUTION_EL
RCAR_BL33_EXECUTION_EL := 0
endif
$(eval $(call add_define,RCAR_BL33_EXECUTION_EL))
# Process RCAR_AVS_SETTING_ENABLE flag
ifndef AVS_SETTING_ENABLE
AVS_SETTING_ENABLE := 0
endif
$(eval $(call add_define,AVS_SETTING_ENABLE))
# Process RCAR_LOSSY_ENABLE flag
ifndef RCAR_LOSSY_ENABLE
RCAR_LOSSY_ENABLE := 0
endif
$(eval $(call add_define,RCAR_LOSSY_ENABLE))
# Process LIFEC_DBSC_PROTECT_ENABLE flag
ifndef LIFEC_DBSC_PROTECT_ENABLE
LIFEC_DBSC_PROTECT_ENABLE := 1
endif
$(eval $(call add_define,LIFEC_DBSC_PROTECT_ENABLE))
# Process RCAR_GEN3_ULCB flag
ifndef RCAR_GEN3_ULCB
RCAR_GEN3_ULCB := 0
endif
# Process RCAR_REF_INT flag
ifndef RCAR_REF_INT
RCAR_REF_INT :=0
endif
$(eval $(call add_define,RCAR_REF_INT))
# Process RCAR_REWT_TRAINING flag
ifndef RCAR_REWT_TRAINING
RCAR_REWT_TRAINING := 1
endif
$(eval $(call add_define,RCAR_REWT_TRAINING))
# Process RCAR_SYSTEM_SUSPEND flag
ifndef RCAR_SYSTEM_SUSPEND
RCAR_SYSTEM_SUSPEND := 0
endif
$(eval $(call add_define,RCAR_SYSTEM_SUSPEND))
# Process RCAR_DRAM_LPDDR4_MEMCONF flag
ifndef RCAR_DRAM_LPDDR4_MEMCONF
RCAR_DRAM_LPDDR4_MEMCONF :=1
endif
$(eval $(call add_define,RCAR_DRAM_LPDDR4_MEMCONF))
# Process RCAR_DRAM_DDR3L_MEMCONF flag
ifndef RCAR_DRAM_DDR3L_MEMCONF
RCAR_DRAM_DDR3L_MEMCONF :=1
endif
$(eval $(call add_define,RCAR_DRAM_DDR3L_MEMCONF))
# Process RCAR_DRAM_DDR3L_MEMDUAL flag
ifndef RCAR_DRAM_DDR3L_MEMDUAL
RCAR_DRAM_DDR3L_MEMDUAL :=1
endif
$(eval $(call add_define,RCAR_DRAM_DDR3L_MEMDUAL))
# Process RCAR_BL33_ARG0 flag
ifdef RCAR_BL33_ARG0
$(eval $(call add_define,RCAR_BL33_ARG0))
endif
#Process RCAR_BL2_DCACHE flag
ifndef RCAR_BL2_DCACHE
RCAR_BL2_DCACHE := 0
endif
$(eval $(call add_define,RCAR_BL2_DCACHE))
# Process RCAR_DRAM_CHANNEL flag
ifndef RCAR_DRAM_CHANNEL
RCAR_DRAM_CHANNEL :=15
endif
$(eval $(call add_define,RCAR_DRAM_CHANNEL))
#Process RCAR_SYSTEM_RESET_KEEPON_DDR flag
ifndef RCAR_SYSTEM_RESET_KEEPON_DDR
RCAR_SYSTEM_RESET_KEEPON_DDR := 0
endif
$(eval $(call add_define,RCAR_SYSTEM_RESET_KEEPON_DDR))
include drivers/renesas/rzg/ddr/ddr.mk
include drivers/renesas/rzg/qos/qos.mk
include drivers/renesas/rzg/pfc/pfc.mk
include lib/libfdt/libfdt.mk
PLAT_INCLUDES += -Idrivers/renesas/rzg/ddr \
-Idrivers/renesas/rzg/qos \
-Idrivers/renesas/rzg/board \
-Idrivers/renesas/common \
-Idrivers/renesas/common/iic_dvfs \
-Idrivers/renesas/common/avs \
-Idrivers/renesas/common/delay \
-Idrivers/renesas/common/rom \
-Idrivers/renesas/common/scif \
-Idrivers/renesas/common/emmc \
-Idrivers/renesas/common/pwrc \
-Idrivers/renesas/common/io
BL2_SOURCES += plat/renesas/rzg/bl2_plat_setup.c \
drivers/renesas/rzg/board/board.c
# build the layout images for the bootrom and the necessary srecords
rzg: rzg_layout_create rzg_srecord
distclean realclean clean: clean_layout_tool clean_srecord
# layout images
LAYOUT_TOOLPATH ?= tools/renesas/rzg_layout_create
clean_layout_tool:
@echo "clean layout tool"
${Q}${MAKE} -C ${LAYOUT_TOOLPATH} clean
.PHONY: rzg_layout_create
rzg_layout_create:
@echo "generating layout srecs"
${Q}${MAKE} CPPFLAGS="-D=AARCH64" --no-print-directory -C ${LAYOUT_TOOLPATH}
# srecords
SREC_PATH = ${BUILD_PLAT}
BL2_ELF_SRC = ${SREC_PATH}/bl2/bl2.elf
BL31_ELF_SRC = ${SREC_PATH}/bl31/bl31.elf
clean_srecord:
@echo "clean bl2 and bl31 srecs"
rm -f ${SREC_PATH}/bl2.srec ${SREC_PATH}/bl31.srec
.PHONY: rzg_srecord
rzg_srecord: $(BL2_ELF_SRC) $(BL31_ELF_SRC)
@echo "generating srec: ${SREC_PATH}/bl2.srec"
$(Q)$(OC) -O srec --srec-forceS3 ${BL2_ELF_SRC} ${SREC_PATH}/bl2.srec
@echo "generating srec: ${SREC_PATH}/bl31.srec"
$(Q)$(OC) -O srec --srec-forceS3 ${BL31_ELF_SRC} ${SREC_PATH}/bl31.srec
#
# Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
###################################################
# makefile
###################################################
#output file name
FILE_NAME_SA0 = bootparam_sa0
FILE_NAME_SA6 = cert_header_sa6
OUTPUT_FILE_SA0 = $(FILE_NAME_SA0).elf
OUTPUT_FILE_SA6 = $(FILE_NAME_SA6).elf
#object file name
OBJ_FILE_SA0 = sa0.o
OBJ_FILE_SA6 = sa6.o
#linker script name
MEMORY_DEF_SA0 = sa0.ld.S
MEMORY_DEF_SA6 = sa6.ld.S
###################################################
# Convenience function for adding build definitions
# $(eval $(call add_define,FOO)) will have:
# -DFOO if $(FOO) is empty; -DFOO=$(FOO) otherwise
define add_define
DEFINES += -D$(1)$(if $(value $(1)),=$(value $(1)),)
endef
# Process RCAR_SA0_SIZE flag
ifndef RCAR_SA0_SIZE
RCAR_SA0_SIZE := 1
else
ifeq (${RCAR_SA0_SIZE},0)
RCAR_SA0_SIZE := 0
else
RCAR_SA0_SIZE := 1
endif
endif
$(eval $(call add_define,RCAR_SA0_SIZE))
# Process RCAR_SA6_TYPE flag
ifndef RCAR_SA6_TYPE
RCAR_SA6_TYPE := 0
else
ifeq (${RCAR_SA6_TYPE},0)
RCAR_SA6_TYPE := 0
else
RCAR_SA6_TYPE := 1
endif
endif
$(eval $(call add_define,RCAR_SA6_TYPE))
RCAR_VMA_ADJUST_ADDR := 0xE6320000
$(eval $(call add_define,RCAR_VMA_ADJUST_ADDR))
###################################################
#c compiler
CC = $(CROSS_COMPILE)gcc
CFLAGS += ${DEFINES}
CFLAGS += -nostdinc \
-I../../../include/lib/libc \
-I../../../include/lib/libc/aarch64
#Linker
LD = $(CROSS_COMPILE)ld
#objcopy
objcopy = $(CROSS_COMPILE)objcopy
#clean
CL = rm -f
###################################################
.SUFFIXES : .s .c .o
###################################################
# command
.PHONY: all
all: $(OUTPUT_FILE_SA0) $(OUTPUT_FILE_SA6)
###################################################
# Linker
###################################################
$(OUTPUT_FILE_SA0) : $(MEMORY_DEF_SA0) $(OBJ_FILE_SA0)
$(LD) $(OBJ_FILE_SA0) \
-T $(MEMORY_DEF_SA0) \
-o $(OUTPUT_FILE_SA0) \
-Map $(FILE_NAME_SA0).map \
$(objcopy) -O srec --adjust-vma=$(RCAR_VMA_ADJUST_ADDR) --srec-forceS3 $(OUTPUT_FILE_SA0) $(FILE_NAME_SA0).srec
$(objcopy) -O binary --adjust-vma=$(RCAR_VMA_ADJUST_ADDR) --srec-forceS3 $(OUTPUT_FILE_SA0) $(FILE_NAME_SA0).bin
$(OUTPUT_FILE_SA6) : $(MEMORY_DEF_SA6) $(OBJ_FILE_SA6)
$(LD) $(OBJ_FILE_SA6) \
-T $(MEMORY_DEF_SA6) \
-o $(OUTPUT_FILE_SA6) \
-Map $(FILE_NAME_SA6).map \
$(objcopy) -O srec --adjust-vma=$(RCAR_VMA_ADJUST_ADDR) --srec-forceS3 $(OUTPUT_FILE_SA6) $(FILE_NAME_SA6).srec
$(objcopy) -O binary --adjust-vma=$(RCAR_VMA_ADJUST_ADDR) --srec-forceS3 $(OUTPUT_FILE_SA6) $(FILE_NAME_SA6).bin
###################################################
# Compile
###################################################
%.o:../%.c
$(CC) -c -I $< -o $@
.PHONY: clean
clean:
$(CL) *.bin *.map *.srec *.elf *.o
/*
* Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#define RCAR_SA0_SIZE_SMALL (0) /* for RZ/G2E */
#define RCAR_SA0_SIZE_NORMAL (1) /* for RZ/G2[HMN] */
#define BL2_ADDRESS (0xE6304000) /* BL2 start address */
#if (RCAR_SA0_SIZE == RCAR_SA0_SIZE_SMALL)
#define BL2_SIZE (80*1024/4) /* BL2 size is 80KB(0x00005000) */
#else /* (RCAR_SA0_SIZE == RCAR_SA0_SIZE_SMALL) */
#define BL2_SIZE (170*1024/4) /* BL2 size is 170KB(0x0000AA00) */
#endif /* (RCAR_SA0_SIZE == RCAR_SA0_SIZE_SMALL) */
/* SA0 */
/* 0x00000000 */
const unsigned int __attribute__ ((section(".sa0_bootrom"))) bootrom_paramA = 0x00000100;
/* 0x00000080 (Map Type 3 for eMMC Boot)*/
/* 0x000001D4 */
const unsigned int __attribute__ ((section(".sa0_bl2dst_addr3"))) bl2dst_addr3 = BL2_ADDRESS;
/* 0x000002E4 */
const unsigned int __attribute__ ((section(".sa0_bl2dst_size3"))) bl2dst_size3 = BL2_SIZE;
/* 0x00000C00 (Map Type 1 for HyperFlash/QSPI Flash Boot)*/
/* 0x00000D54 */
const unsigned int __attribute__ ((section(".sa0_bl2dst_addr1"))) bl2dst_addr1 = BL2_ADDRESS;
/* 0x00000E64 */
const unsigned int __attribute__ ((section(".sa0_bl2dst_size1"))) bl2dst_size1 = BL2_SIZE;
/*
* Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
SECTIONS
{
. = 0x00000000;
.rodata : {
KEEP(*(.sa0_bootrom))
/* Map Type 3 for eMMC Boot */
/* A-side IPL content cert "Start Address" */
. = 0x000001D4; /* H'00000080 + H'00000154 */
KEEP(*(.sa0_bl2dst_addr3))
/* A-side IPL content cert "Size" */
. = 0x000002E4; /* H'00000080 + H'00000264 */
KEEP(*(.sa0_bl2dst_size3))
/* Map Type 1 for HyperFlash/QSPI Flash Boot */
/* A-side IPL content cert "Start Address" */
. = 0x00000D54; /* H'00000C00 + H'00000154 */
KEEP(*(.sa0_bl2dst_addr1))
/* A-side IPL content cert "Size" */
. = 0x00000E64; /* H'00000C00 + H'00000264 */
KEEP(*(.sa0_bl2dst_size1))
}
}
/*
* Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#define RCAR_SA6_TYPE_QSPIFLASH (0)
#define RCAR_SA6_TYPE_EMMC (1)
#if (RCAR_SA6_TYPE == RCAR_SA6_TYPE_QSPIFLASH)
/* Number of content cert for Non-secure Target Program(BL33x) */
#define RCAR_IMAGE_NUM (0x00000001U)
/* Source address on flash for BL31 */
#define RCAR_BL31SRC_ADDRESS (0x001C0000U)
/* Reserved */
#define RCAR_BL31_PARTITION (0x00000000U)
/* Source address on flash for BL32 */
#define RCAR_BL32SRC_ADDRESS (0x00200000U)
/* Reserved */
#define RCAR_BL32_PARTITION (0x00000000U)
/* Source address on flash for BL33 */
#define RCAR_BL33SRC_ADDRESS (0x00300000U)
/* Reserved */
#define RCAR_BL33_PARTITION (0x00000000U)
#define RCAR_BL332SRC_ADDRESS (0x00000000U)
/* Reserved */
#define RCAR_BL332_PARTITION (0x00000000U)
#define RCAR_BL333SRC_ADDRESS (0x00000000U)
/* Reserved */
#define RCAR_BL333_PARTITION (0x00000000U)
#define RCAR_BL334SRC_ADDRESS (0x00000000U)
/* Reserved */
#define RCAR_BL334_PARTITION (0x00000000U)
#define RCAR_BL335SRC_ADDRESS (0x00000000U)
/* Reserved */
#define RCAR_BL335_PARTITION (0x00000000U)
#define RCAR_BL336SRC_ADDRESS (0x00000000U)
/* Reserved */
#define RCAR_BL336_PARTITION (0x00000000U)
#define RCAR_BL337SRC_ADDRESS (0x00000000U)
/* Reserved */
#define RCAR_BL337_PARTITION (0x00000000U)
#define RCAR_BL338SRC_ADDRESS (0x00000000U)
/* Reserved */
#define RCAR_BL338_PARTITION (0x00000000U)
#else /* RCAR_SA6_TYPE == RCAR_SA6_TYPE_EMMC */
/* Number of content cert for Non-secure Target Program(BL33x) */
#define RCAR_IMAGE_NUM (0x00000001U)
/* Source address on eMMC for BL31 */
#define RCAR_BL31SRC_ADDRESS (0x00040000U)
/* Source partition on eMMC for BL31 */
#define RCAR_BL31_PARTITION (0x00000001U)
/* Source address on eMMC for BL32 */
#define RCAR_BL32SRC_ADDRESS (0x00200000U)
/* Source partition on eMMC for BL32 */
#define RCAR_BL32_PARTITION (0x00000001U)
/* Source address on eMMC for BL33 */
#define RCAR_BL33SRC_ADDRESS (0x00000000U)
/* Source partition on eMMC for BL33 */
#define RCAR_BL33_PARTITION (0x00000002U)
/* Reserved */
#define RCAR_BL332SRC_ADDRESS (0x00000000U)
#define RCAR_BL332_PARTITION (0x00000000U)
/* Reserved */
#define RCAR_BL333SRC_ADDRESS (0x00000000U)
#define RCAR_BL333_PARTITION (0x00000000U)
/* Reserved */
#define RCAR_BL334SRC_ADDRESS (0x00000000U)
#define RCAR_BL334_PARTITION (0x00000000U)
/* Reserved */
#define RCAR_BL335SRC_ADDRESS (0x00000000U)
#define RCAR_BL335_PARTITION (0x00000000U)
/* Reserved */
#define RCAR_BL336SRC_ADDRESS (0x00000000U)
#define RCAR_BL336_PARTITION (0x00000000U)
/* Reserved */
#define RCAR_BL337SRC_ADDRESS (0x00000000U)
#define RCAR_BL337_PARTITION (0x00000000U)
/* Reserved */
#define RCAR_BL338SRC_ADDRESS (0x00000000U)
#define RCAR_BL338_PARTITION (0x00000000U)
#endif /* RCAR_SA6_TYPE == RCAR_SA6_TYPE_QSPIFLASH */
/* Destination address for BL31 */
#define RCAR_BL31DST_ADDRESS (0x44000000U)
#define RCAR_BL31DST_ADDRESSH (0x00000000U)
/* Destination size for BL31 */
#define RCAR_BL31DST_SIZE (0x00004000U)
/* Destination address for BL32 */
#define RCAR_BL32DST_ADDRESS (0x44100000U)
#define RCAR_BL32DST_ADDRESSH (0x00000000U)
/* Destination size for BL32 */
#define RCAR_BL32DST_SIZE (0x00040000U)
/* Destination address for BL33 */
#define RCAR_BL33DST_ADDRESS (0x50000000U)
#define RCAR_BL33DST_ADDRESSH (0x00000000U)
/* Destination size for BL33 */
#define RCAR_BL33DST_SIZE (0x00040000U)
/* Reserved */
#define RCAR_BL332DST_ADDRESS (0x00000000U)
#define RCAR_BL332DST_ADDRESSH (0x00000000U)
#define RCAR_BL332DST_SIZE (0x00000000U)
/* Reserved */
#define RCAR_BL333DST_ADDRESS (0x00000000U)
#define RCAR_BL333DST_ADDRESSH (0x00000000U)
#define RCAR_BL333DST_SIZE (0x00000000U)
/* Reserved */
#define RCAR_BL334DST_ADDRESS (0x00000000U)
#define RCAR_BL334DST_ADDRESSH (0x00000000U)
#define RCAR_BL334DST_SIZE (0x00000000U)
/* Reserved */
#define RCAR_BL335DST_ADDRESS (0x00000000U)
#define RCAR_BL335DST_ADDRESSH (0x00000000U)
#define RCAR_BL335DST_SIZE (0x00000000U)
/* Reserved */
#define RCAR_BL336DST_ADDRESS (0x00000000U)
#define RCAR_BL336DST_ADDRESSH (0x00000000U)
#define RCAR_BL336DST_SIZE (0x00000000U)
/* Reserved */
#define RCAR_BL337DST_ADDRESS (0x00000000U)
#define RCAR_BL337DST_ADDRESSH (0x00000000U)
#define RCAR_BL337DST_SIZE (0x00000000U)
/* Reserved */
#define RCAR_BL338DST_ADDRESS (0x00000000U)
#define RCAR_BL338DST_ADDRESSH (0x00000000U)
#define RCAR_BL338DST_SIZE (0x00000000U)
/* SA6 */
const uint64_t __attribute__ ((section(".sa6_image_num")))
image_num = RCAR_IMAGE_NUM;
const uint64_t __attribute__ ((section(".sa6_bl31src_addr")))
bl31src_addr = RCAR_BL31SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl31partition")))
bl31partition = RCAR_BL31_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl32src_addr")))
bl32src_addr = RCAR_BL32SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl32partition")))
bl32partition = RCAR_BL32_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl33src_addr")))
bl33src_addr = RCAR_BL33SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl33partition")))
bl33partition = RCAR_BL33_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl332src_addr")))
bl332src_addr = RCAR_BL332SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl332partition")))
bl332partition = RCAR_BL332_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl333src_addr")))
bl333src_addr = RCAR_BL333SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl333partition")))
bl333partition = RCAR_BL333_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl334src_addr")))
bl334src_addr = RCAR_BL334SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl334partition")))
bl334partition = RCAR_BL334_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl335src_addr")))
bl335src_addr = RCAR_BL335SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl335partition")))
bl335partition = RCAR_BL335_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl336src_addr")))
bl336src_addr = RCAR_BL336SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl336partition")))
bl336partition = RCAR_BL336_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl337src_addr")))
bl337src_addr = RCAR_BL337SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl337partition")))
bl337partition = RCAR_BL337_PARTITION;
const uint64_t __attribute__ ((section(".sa6_bl338src_addr")))
bl338src_addr = RCAR_BL338SRC_ADDRESS;
const uint64_t __attribute__ ((section(".sa6_bl338partition")))
bl338partition = RCAR_BL338_PARTITION;
const uint32_t __attribute__ ((section(".sa6_bl31dst_addr")))
bl31dst_addr = RCAR_BL31DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl31dst_addrh")))
bl31dst_addrh = RCAR_BL31DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl31dst_size")))
bl31dst_size = RCAR_BL31DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl32dst_addr")))
bl32dst_addr = RCAR_BL32DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl32dst_addrh")))
bl32dst_addrh = RCAR_BL32DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl32dst_size")))
bl32dst_size = RCAR_BL32DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl33dst_addr")))
bl33dst_addr = RCAR_BL33DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl33dst_addrh")))
bl33dst_addrh = RCAR_BL33DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl33dst_size")))
bl33dst_size = RCAR_BL33DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl332dst_addr")))
bl332dst_addr = RCAR_BL332DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl332dst_addrh")))
bl332dst_addrh = RCAR_BL332DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl332dst_size")))
bl332dst_size = RCAR_BL332DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl333dst_addr")))
bl333dst_addr = RCAR_BL333DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl333dst_addrh")))
bl333dst_addrh = RCAR_BL333DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl333dst_size")))
bl333dst_size = RCAR_BL333DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl334dst_addr")))
bl334dst_addr = RCAR_BL334DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl334dst_addrh")))
bl334dst_addrh = RCAR_BL334DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl334dst_size")))
bl334dst_size = RCAR_BL334DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl335dst_addr")))
bl335dst_addr = RCAR_BL335DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl335dst_addrh")))
bl335dst_addrh = RCAR_BL335DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl335dst_size")))
bl335dst_size = RCAR_BL335DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl336dst_addr")))
bl336dst_addr = RCAR_BL336DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl336dst_addrh")))
bl336dst_addrh = RCAR_BL336DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl336dst_size")))
bl336dst_size = RCAR_BL336DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl337dst_addr")))
bl337dst_addr = RCAR_BL337DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl337dst_addrh")))
bl337dst_addrh = RCAR_BL337DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl337dst_size")))
bl337dst_size = RCAR_BL337DST_SIZE;
const uint32_t __attribute__ ((section(".sa6_bl338dst_addr")))
bl338dst_addr = RCAR_BL338DST_ADDRESS;
const uint32_t __attribute__ ((section(".sa6_bl338dst_addrh")))
bl338dst_addrh = RCAR_BL338DST_ADDRESSH;
const uint32_t __attribute__ ((section(".sa6_bl338dst_size")))
bl338dst_size = RCAR_BL338DST_SIZE;
/*
* Copyright (c) 2020, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
SECTIONS
{
. = 0x00000000;
.rodata : {
KEEP(*(.sa6_image_num))
. = 0x00000008;
KEEP(*(.sa6_bl31src_addr))
. = 0x00000010;
KEEP(*(.sa6_bl31partition))
. = 0x00000018;
KEEP(*(.sa6_bl32src_addr))
. = 0x00000020;
KEEP(*(.sa6_bl32partition))
. = 0x00000028;
KEEP(*(.sa6_bl33src_addr))
. = 0x00000030;
KEEP(*(.sa6_bl33partition))
. = 0x00000038;
KEEP(*(.sa6_bl332src_addr))
. = 0x00000040;
KEEP(*(.sa6_bl332partition))
. = 0x00000048;
KEEP(*(.sa6_bl333src_addr))
. = 0x00000050;
KEEP(*(.sa6_bl333partition))
. = 0x00000058;
KEEP(*(.sa6_bl334src_addr))
. = 0x00000060;
KEEP(*(.sa6_bl334partition))
. = 0x00000068;
KEEP(*(.sa6_bl335src_addr))
. = 0x00000070;
KEEP(*(.sa6_bl335partition))
. = 0x00000078;
KEEP(*(.sa6_bl336src_addr))
. = 0x00000080;
KEEP(*(.sa6_bl336partition))
. = 0x00000088;
KEEP(*(.sa6_bl337src_addr))
. = 0x00000090;
KEEP(*(.sa6_bl337partition))
. = 0x00000098;
KEEP(*(.sa6_bl338src_addr))
. = 0x000000A0;
KEEP(*(.sa6_bl338partition))
. = 0x00000554;
KEEP(*(.sa6_bl31dst_addr))
. = 0x00000558;
KEEP(*(.sa6_bl31dst_addrh))
. = 0x00000664;
KEEP(*(.sa6_bl31dst_size))
. = 0x00000D54;
KEEP(*(.sa6_bl32dst_addr))
. = 0x00000D58;
KEEP(*(.sa6_bl32dst_addrh))
. = 0x00000E64;
KEEP(*(.sa6_bl32dst_size))
. = 0x00001554;
KEEP(*(.sa6_bl33dst_addr))
. = 0x00001558;
KEEP(*(.sa6_bl33dst_addrh))
. = 0x00001664;
KEEP(*(.sa6_bl33dst_size))
. = 0x00001D54;
KEEP(*(.sa6_bl332dst_addr))
. = 0x00001D58;
KEEP(*(.sa6_bl332dst_addrh))
. = 0x00001E64;
KEEP(*(.sa6_bl332dst_size))
. = 0x00002554;
KEEP(*(.sa6_bl333dst_addr))
. = 0x00002558;
KEEP(*(.sa6_bl333dst_addrh))
. = 0x00002664;
KEEP(*(.sa6_bl333dst_size))
. = 0x00002D54;
KEEP(*(.sa6_bl334dst_addr))
. = 0x00002D58;
KEEP(*(.sa6_bl334dst_addrh))
. = 0x00002E64;
KEEP(*(.sa6_bl334dst_size))
. = 0x00003554;
KEEP(*(.sa6_bl335dst_addr))
. = 0x00003558;
KEEP(*(.sa6_bl335dst_addrh))
. = 0x00003664;
KEEP(*(.sa6_bl335dst_size))
. = 0x00003D54;
KEEP(*(.sa6_bl336dst_addr))
. = 0x00003D58;
KEEP(*(.sa6_bl336dst_addrh))
. = 0x00003E64;
KEEP(*(.sa6_bl336dst_size))
. = 0x00004554;
KEEP(*(.sa6_bl337dst_addr))
. = 0x00004558;
KEEP(*(.sa6_bl337dst_addrh))
. = 0x00004664;
KEEP(*(.sa6_bl337dst_size))
. = 0x00004D54;
KEEP(*(.sa6_bl338dst_addr))
. = 0x00004D58;
KEEP(*(.sa6_bl338dst_addrh))
. = 0x00004E64;
KEEP(*(.sa6_bl338dst_size))
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment