1/*
2 * Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
3 * Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#include <arch.h>
9#include <asm_macros.S>
10#include <common/bl_common.h>
11#include <memctrl_v2.h>
12#include <plat/common/common_def.h>
13#include <tegra_def.h>
14
15#define TEGRA186_MC_CTX_SIZE		0x93
16
17	.globl tegra186_get_mc_ctx_size
18
19	/*
20	 * Tegra186 reset data (offset 0x0 - 0x420)
21	 *
22	 * 0x000: MC context start
23	 * 0x420: MC context end
24	 */
25
26	.align 4
27__tegra186_mc_context:
28	.rept	TEGRA186_MC_CTX_SIZE
29	.quad	0
30	.endr
31
32	.align 4
33__tegra186_mc_context_end:
34
35/* return the size of the MC context */
36func tegra186_get_mc_ctx_size
37	adr	x0, __tegra186_mc_context_end
38	adr	x1, __tegra186_mc_context
39	sub	x0, x0, x1
40	ret
41endfunc tegra186_get_mc_ctx_size
42