Home | History | Annotate | Download | only in parameter
      1 /*
      2  * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
      3  *
      4  * SPDX-License-Identifier: BSD-3-Clause
      5  */
      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>
     15 #include <plat_private.h>
     16 #include <platform_def.h>
     17 #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 */
     27 struct 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 
     39 struct param_ddr_usage ddr_region_usage_parse(uint64_t addr, uint64_t max_mb);
     40 
     41 #endif /* __PARAMETER_H__ */
     42