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