blob: f8e3be93bfabe27782171a144fd7492f59f79df3 [file] [log] [blame]
tony.xie54973e72017-04-24 16:18:10 +08001/*
2 * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
3 *
dp-armd91aaae2017-05-10 15:16:15 +01004 * SPDX-License-Identifier: BSD-3-Clause
tony.xie54973e72017-04-24 16:18:10 +08005 */
6
7#ifndef __PARAMETER_H__
8#define __PARAMETER_H__
9
10#include <arch_helpers.h>
11#include <console.h>
12#include <debug.h>
13#include <delay_timer.h>
14#include <mmio.h>
tony.xie54973e72017-04-24 16:18:10 +080015#include <plat_private.h>
Isla Mitchelle3631462017-07-14 10:46:32 +010016#include <platform_def.h>
tony.xie54973e72017-04-24 16:18:10 +080017#include <soc.h>
18#include <string.h>
19
20#define DDR_REGION_NR_MAX 10
21#define REGION_NR_OFFSET 0
22#define REGION_ADDR_OFFSET 8
23#define REGION_DATA_PER_BYTES 8
24#define RG_SIZE_MB(byte) ((byte) >> 20)
25
26/* unit: MB */
27struct param_ddr_usage {
28 uint64_t boundary;
29
30 uint32_t ns_nr;
31 uint64_t ns_base[DDR_REGION_NR_MAX];
32 uint64_t ns_top[DDR_REGION_NR_MAX];
33
34 uint32_t s_nr;
35 uint64_t s_base[DDR_REGION_NR_MAX];
36 uint64_t s_top[DDR_REGION_NR_MAX];
37};
38
39struct param_ddr_usage ddr_region_usage_parse(uint64_t addr, uint64_t max_mb);
40
41#endif /* __PARAMETER_H__ */