blob: 2fc2046d0667f8717b68efe6e543561f5558efe4 [file] [log] [blame]
Varun Wadekar93bed2a2016-03-18 13:07:33 -07001/*
Varun Wadekarfadd5382019-01-11 14:48:41 -08002 * Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
Pritesh Raithatha75c94432018-08-03 15:48:15 +05303 * Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
Varun Wadekar93bed2a2016-03-18 13:07:33 -07004 *
dp-armfa3cf0b2017-05-03 09:38:09 +01005 * SPDX-License-Identifier: BSD-3-Clause
Varun Wadekar93bed2a2016-03-18 13:07:33 -07006 */
7
8#include <arch.h>
9#include <asm_macros.S>
Varun Wadekarfadd5382019-01-11 14:48:41 -080010#include <common/bl_common.h>
Varun Wadekar93bed2a2016-03-18 13:07:33 -070011#include <memctrl_v2.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000012#include <plat/common/common_def.h>
Varun Wadekar93bed2a2016-03-18 13:07:33 -070013#include <tegra_def.h>
14
Pritesh Raithatha75c94432018-08-03 15:48:15 +053015#define TEGRA186_MC_CTX_SIZE 0x93
Varun Wadekar93bed2a2016-03-18 13:07:33 -070016
Varun Wadekar17ad11a2018-11-09 09:08:16 -080017 .globl tegra186_get_mc_ctx_size
Varun Wadekar93bed2a2016-03-18 13:07:33 -070018
19 /*
Varun Wadekar17ad11a2018-11-09 09:08:16 -080020 * Tegra186 reset data (offset 0x0 - 0x420)
Varun Wadekar93bed2a2016-03-18 13:07:33 -070021 *
Varun Wadekar17ad11a2018-11-09 09:08:16 -080022 * 0x000: MC context start
23 * 0x420: MC context end
Varun Wadekar93bed2a2016-03-18 13:07:33 -070024 */
25
26 .align 4
Pritesh Raithatha75c94432018-08-03 15:48:15 +053027__tegra186_mc_context:
28 .rept TEGRA186_MC_CTX_SIZE
Varun Wadekar93bed2a2016-03-18 13:07:33 -070029 .quad 0
30 .endr
Varun Wadekar93bed2a2016-03-18 13:07:33 -070031
32 .align 4
Varun Wadekar17ad11a2018-11-09 09:08:16 -080033__tegra186_mc_context_end:
Varun Wadekarfa887672017-11-08 14:45:08 -080034
Pritesh Raithatha75c94432018-08-03 15:48:15 +053035/* return the size of the MC context */
Varun Wadekar17ad11a2018-11-09 09:08:16 -080036func tegra186_get_mc_ctx_size
37 adr x0, __tegra186_mc_context_end
38 adr x1, __tegra186_mc_context
Varun Wadekarfa887672017-11-08 14:45:08 -080039 sub x0, x0, x1
40 ret
Varun Wadekar17ad11a2018-11-09 09:08:16 -080041endfunc tegra186_get_mc_ctx_size