/*******************************************************************************
 * Copyright (c) 2018-2021 Renesas Electronics Corporation. All rights reserved.
 *
 *     RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY
 *
 * This software is provided as reference/sample code under the license
 * agreement between Renesas Electronics Corporation and licensee (the
 * "License Agreement") and shall be treated as specified in the License
 * Agreement.
 * These instructions, statements, and software are the confidential
 * information of Renesas Electronics Corporation. They must be used and
 * modified solely for the purpose for which it was furnished by Renesas
 * Electronics Corporation. All or part of these instructions, statements and
 * software must not be reproduced nor disclosed to any third party in any
 * form, unless permitted by the License Agreement.
 *
 * THIS SOFTWARE IS PROVIDED BY RENESAS ELEOCTRONICS CORPORATION "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
 * SATISFACTORY QUALITY, ACCURACY, TITLE AND NON-INFRINGEMENT ARE DISCLAIMED.
 * IN NO EVENT SHALL RENESAS ELECTRONICS CORPORATION BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 ******************************************************************************/

/*******************************************************************************
 * DESCRIPTION   : dummy flash data for sector 6(0x180000)
 ******************************************************************************/

#include <stdint.h>

/* CA53 program load num */
#define CA53_IMAGE_NUM          (0x00000002U)
/* Source address on flash for Secure FW */
#define SECURE_FW_SRC_ADDRESS       (0x000C0000U)
/* Reserved */
#define SECURE_FW_PARTITION     (0x00000000U)
/* Source address on flash for RTOS */
#define RTOS_SRC_ADDRESS        (0x001C0000U)
/* Reserved */
#define RTOS_PARTITION          (0x00000000U)
/* Source address on flash for CA53 program(1) */
#define CA53_PROG_01_SRC_ADDRESS    (0x002C0000U)
/* Reserved */
#define CA53_PROG_01_PARTITION      (0x00000000U)
/* ----------- customized ----------- */
/* Reserved */
#define CA53_PROG_02_SRC_ADDRESS    (0x00840000U)
#define CA53_PROG_02_PARTITION      (0x00000000U)
/* Reserved */
#define CA53_PROG_03_SRC_ADDRESS    (0x00000000U)
#define CA53_PROG_03_PARTITION      (0x00000000U)
/* Reserved */
#define CA53_PROG_04_SRC_ADDRESS    (0x00000000U)
#define CA53_PROG_04_PARTITION      (0x00000000U)
/* Reserved */
#define CA53_PROG_05_SRC_ADDRESS    (0x00000000U)
#define CA53_PROG_05_PARTITION      (0x00000000U)
/* Reserved */
#define CA53_PROG_06_SRC_ADDRESS    (0x00000000U)
#define CA53_PROG_06_PARTITION      (0x00000000U)
/* Reserved */
#define CA53_PROG_07_SRC_ADDRESS    (0x00000000U)
#define CA53_PROG_07_PARTITION      (0x00000000U)
/* Reserved */
#define CA53_PROG_08_SRC_ADDRESS    (0x00000000U)
#define CA53_PROG_08_PARTITION      (0x00000000U)
/* ----------- customized ----------- */


/* Destination address for Secure FW */
#define SECURE_FW_ADDRESS       (0xEB2B4000U)
#define SECURE_FW_ADDRESSH      (0x00000000U)
/* Destination size for Secure FW */
#define SECURE_FW_DST_SIZE      (0x00011200U)
/* Destination address for RTOS */
#define RTOS_ADDRESS            (0xEB200000U)
#define RTOS_ADDRESSH           (0x00000000U)
/* Destination size for RTOS */
#define RTOS_DST_SIZE           (0x0002D000U)
/* Destination address for CA53 program(1) */
#define CA53_PROG_01_ADDRESS        (0x46400000U)
#define CA53_PROG_01_ADDRESSH       (0x00000000U)
/* Destination size for CA53 program(1) */
#define CA53_PROG_01_SIZE       (0x00020000U)   /* 512KiB/4 */
/* ----------- customized ----------- */
/* Reserved */
#define CA53_PROG_02_ADDRESS        (0x50000000U)
#define CA53_PROG_02_ADDRESSH       (0x00000000U)
#define CA53_PROG_02_SIZE       (0x00040000U)   /* 1MiB/4 */
/* Reserved */
#define CA53_PROG_03_ADDRESS        (0x00000000U)
#define CA53_PROG_03_ADDRESSH       (0x00000000U)
#define CA53_PROG_03_SIZE       (0x00000000U)
/* Reserved */
#define CA53_PROG_04_ADDRESS        (0x00000000U)
#define CA53_PROG_04_ADDRESSH       (0x00000000U)
#define CA53_PROG_04_SIZE       (0x00000000U)
/* Reserved */
#define CA53_PROG_05_ADDRESS        (0x00000000U)
#define CA53_PROG_05_ADDRESSH       (0x00000000U)
#define CA53_PROG_05_SIZE       (0x00000000U)
/* Reserved */
#define CA53_PROG_06_ADDRESS        (0x00000000U)
#define CA53_PROG_06_ADDRESSH       (0x00000000U)
#define CA53_PROG_06_SIZE       (0x00000000U)
/* Reserved */
#define CA53_PROG_07_ADDRESS        (0x00000000U)
#define CA53_PROG_07_ADDRESSH       (0x00000000U)
#define CA53_PROG_07_SIZE       (0x00000000U)
/* Reserved */
#define CA53_PROG_08_ADDRESS        (0x00000000U)
#define CA53_PROG_08_ADDRESSH       (0x00000000U)
#define CA53_PROG_08_SIZE       (0x00000000U)
/* ----------- customized ----------- */

/* sa6 */
__attribute__ ((section (".sa6_top"))) const uint32_t top_cert[1024 / 4] = {
    [0x0000 / 4] = CA53_IMAGE_NUM,
    [0x0008 / 4] = SECURE_FW_SRC_ADDRESS,
    [0x0010 / 4] = SECURE_FW_PARTITION,
    [0x0018 / 4] = RTOS_SRC_ADDRESS,
    [0x0020 / 4] = RTOS_PARTITION,
    [0x0028 / 4] = CA53_PROG_01_SRC_ADDRESS,
    [0x0030 / 4] = CA53_PROG_01_PARTITION,
    [0x0038 / 4] = CA53_PROG_02_SRC_ADDRESS,
    [0x0040 / 4] = CA53_PROG_02_PARTITION,
    [0x0048 / 4] = CA53_PROG_03_SRC_ADDRESS,
    [0x0050 / 4] = CA53_PROG_03_PARTITION,
    [0x0058 / 4] = CA53_PROG_04_SRC_ADDRESS,
    [0x0060 / 4] = CA53_PROG_04_PARTITION,
    [0x0068 / 4] = CA53_PROG_05_SRC_ADDRESS,
    [0x0070 / 4] = CA53_PROG_05_PARTITION,
    [0x0078 / 4] = CA53_PROG_06_SRC_ADDRESS,
    [0x0080 / 4] = CA53_PROG_06_PARTITION,
    [0x0088 / 4] = CA53_PROG_07_SRC_ADDRESS,
    [0x0090 / 4] = CA53_PROG_07_PARTITION,
    [0x0098 / 4] = CA53_PROG_08_SRC_ADDRESS,
    [0x00A0 / 4] = CA53_PROG_08_PARTITION,
};
__attribute__ ((section (".sa6_firm"))) const uint32_t firm_cert[2048 / 4] = {
    [0x0154 / 4] = SECURE_FW_ADDRESS,
    [0x0264 / 4] = SECURE_FW_DST_SIZE,
};
__attribute__ ((section (".sa6_rtos"))) const uint32_t rtos_cert[2048 / 4] = {
    [0x0154 / 4] = RTOS_ADDRESS,
    [0x0264 / 4] = RTOS_DST_SIZE,
};
__attribute__ ((section (".sa6_ca53_01"))) const uint32_t ca53_01_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_01_ADDRESS,
    [0x0264 / 4] = CA53_PROG_01_SIZE,
};

__attribute__ ((section (".sa6_ca53_02"))) const uint32_t ca53_02_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_02_ADDRESS,
    [0x0264 / 4] = CA53_PROG_02_SIZE,
};
__attribute__ ((section (".sa6_ca53_03"))) const uint32_t ca53_03_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_03_ADDRESS,
    [0x0264 / 4] = CA53_PROG_03_SIZE,
};
__attribute__ ((section (".sa6_ca53_04"))) const uint32_t ca53_04_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_04_ADDRESS,
    [0x0264 / 4] = CA53_PROG_04_SIZE,
};
__attribute__ ((section (".sa6_ca53_05"))) const uint32_t ca53_05_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_05_ADDRESS,
    [0x0264 / 4] = CA53_PROG_05_SIZE,
};
__attribute__ ((section (".sa6_ca53_06"))) const uint32_t ca53_06_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_06_ADDRESS,
    [0x0264 / 4] = CA53_PROG_06_SIZE,
};
__attribute__ ((section (".sa6_ca53_07"))) const uint32_t ca53_07_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_07_ADDRESS,
    [0x0264 / 4] = CA53_PROG_07_SIZE,
};
__attribute__ ((section (".sa6_ca53_08"))) const uint32_t ca53_08_cert[2048 / 4] = {
    [0x0154 / 4] = CA53_PROG_08_ADDRESS,
    [0x0264 / 4] = CA53_PROG_08_SIZE,
};

