/* SPDX-License-Identifier: LGPL-2.1-only OR BSD-3-Clause */
/******************************************************************************
 *
 * This file is provided under a dual license.  When you use or
 * distribute this software, you may choose to be licensed under
 * version 2.1 of the GNU Lesser General Public License
 * ("LGPLv2.1 License") or BSD License.
 *
 * LGPLv2.1 License
 *
 * Copyright(C) 2019 MediaTek Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html for more
 * details.
 *
 * BSD LICENSE
 *
 * Copyright(C) 2019 MediaTek Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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.
 *
 *****************************************************************************/

/*-----------------------------------------------------------------------------
 *
 * $Author: $
 * $Date: $
 * $RCSfile: $
 * $Revision: $
 *
 *---------------------------------------------------------------------------*/

/** @file gcpu_iram.h
 *  gcpu driver - instruction ram uCode inclusion
 */

static const unsigned int GCPU_IRAM0_TRAPPING[] = {
0x82910293,     // bypass aes secure check

//0x8a84201f,     // bypass dram addr [38:32],ts_dma_rd_src
//0x8a8f2023,     // bypass dram addr [38:32],ts_dma_wr_dst
//0x8ac3202b,     // bypass dram addr [38:32],ts_main_20b
//0x8b0b2039,     // bypass dram addr [38:32],ts_sync_found
//0x8bb1203c,     // bypass dram addr [38:32],exe_ts_desc_gcpu
//0x8be82044,     // bypass dram addr [38:32],ts_main_3b
//0x8c96204a,     // bypass dram addr [38:32],ts_main_11b
//0x8caa2053,     // bypass dram addr [38:32],ts_cut_upon_dma
//0x8cbc205a,     // bypass dram addr [38:32],ts_main_15b
//0x8cdf205e,     // bypass dram addr [38:32],ts_exit
//
//0x8bda2060,     // bypass dram addr [38:32],ts_main_2b
//0x8c9c204e,     // bypass dram addr [38:32],ts_main_12b
//0x8cb02057,     // bypass dram addr [38:32],ts_main_14b
//0x8ac3202b,     // bypass dram addr [38:32],ts_main_20b
//0x8aed202f,     // bypass dram addr [38:32],ts_find_sync_dma

0x80582085,     // trigger trng only, CMD = 0x45
0x80592088,     // stop trng , CMD = 0x46
};

static const unsigned int GCPU_IRAM0_CODE[] = {
0x001d8955, 0x001c8be8, 0x000909fa, 0x001d8941, 0x001dcd53, 
0x001dcd72, 0x001dcd1d, 0x001d89fc, 0x001d897f, 0x00090fc1, 
0x001d8941, 0x001dcd33, 0x001dcdd2, 0x001dcd9d, 0x001d885c, 
0x001d897f, 0x00090fc1, 0x001d8941, 0x001dcd33, 0x001dcdf2, 
0x001dcd9d, 0x001d885c, 0x001d897f, 0x00090fc1, 0x001d8941, 
0x001dc1b3, 0x001dc052, 0x001dc07d, 0x001d891f, 0x001d89dc, 
0x00090fc1, 0x001b9945, 0x000889a1, 0x001ec9d1, 0x000903dc, 
0x001b9d45, 0x001ee9d5, 0x001c8b5b, 0x001ee9f5, 0x001c8b5a, 
0x000889a1, 0x001ec9d0, 0x000903c1, 0x001d8826, 0x000889a1, 
0x001ec9df, 0x00090392, 0x001d8866, 0x000889a1, 0x001b8d47, 
0x000883c0, 0x001bcd5a, 0x001a8115, 0x000f83a2, 0x00128756, 
0x0012af5c, 0x000903a2, 0x001caa56, 0x001cba52, 0x0009025a, 
0x001ee852, 0x001d8955, 0x001c8b58, 0x001c8b40, 0x001c8b59, 
0x001ee875, 0x001ee814, 0x000902e3, 0x001d8866, 0x000889a1, 
0x00118d95, 0x001ec9d1, 0x001ee9b3, 0x000902ba, 0x001d8866, 
0x000889a1, 0x001ec9d1, 0x001ee825, 0x0012c985, 0x001d8926, 
0x000889a1, 0x001ee9b5, 0x000905f4, 0x001d8866, 0x000889a1, 
0x001ec9d1, 0x001ee825, 0x001d8926, 0x000889a1, 0x000905e6, 
0x001ee9d5, 0x001b8955, 0x00080596, 0x00090284, 0x001cba52, 
0x000909fa, 0x001d8966, 0x000889a1, 0x00090288, 0x001ee974, 
0x001ee915, 0x001de946, 0x00128b35, 0x001ee927, 0x001bc147, 
0x000809fa, 0x00092924, 0x000c0115, 0x001b8975, 0x001b8dd4, 
0x001ac167, 0x000fa93f, 0x000909fa, 0x001c83ef, 0x0009292d, 
0x001d8917, 0x001c9bee, 0x00092928, 0x001ede57, 0x0009293e, 
0x001d8817, 0x001a8177, 0x001b8157, 0x000fa92c, 0x00092926, 
0x001ede37, 0x001b8157, 0x000fa928, 0x00092923, 0x001d8905, 
0x001c0b84, 0x0019ca85, 0x00091abd, 0x001d8905, 0x001c0b84, 
0x000909fa, 0x001d8945, 0x001c0b84, 0x000909fa
};

#define GCPU_IRAM0_LEN   0x22C
