mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-17 18:07:01 +02:00
All identifiers, regardless of use, that start with two underscores are reserved. This means they can't be used in header guards. The style that this project is now to use the full name of the file in capital letters followed by 'H'. For example, for a file called "uart_example.h", the header guard is UART_EXAMPLE_H. The exceptions are files that are imported from other projects: - CryptoCell driver - dt-bindings folders - zlib headers Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
42 lines
893 B
C
42 lines
893 B
C
/*
|
|
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef DDR_PARAMETER_H
|
|
#define DDR_PARAMETER_H
|
|
|
|
#include <arch_helpers.h>
|
|
#include <console.h>
|
|
#include <debug.h>
|
|
#include <delay_timer.h>
|
|
#include <mmio.h>
|
|
#include <plat_private.h>
|
|
#include <platform_def.h>
|
|
#include <soc.h>
|
|
#include <string.h>
|
|
|
|
#define DDR_REGION_NR_MAX 10
|
|
#define REGION_NR_OFFSET 0
|
|
#define REGION_ADDR_OFFSET 8
|
|
#define REGION_DATA_PER_BYTES 8
|
|
#define RG_SIZE_MB(byte) ((byte) >> 20)
|
|
|
|
/* unit: MB */
|
|
struct param_ddr_usage {
|
|
uint64_t boundary;
|
|
|
|
uint32_t ns_nr;
|
|
uint64_t ns_base[DDR_REGION_NR_MAX];
|
|
uint64_t ns_top[DDR_REGION_NR_MAX];
|
|
|
|
uint32_t s_nr;
|
|
uint64_t s_base[DDR_REGION_NR_MAX];
|
|
uint64_t s_top[DDR_REGION_NR_MAX];
|
|
};
|
|
|
|
struct param_ddr_usage ddr_region_usage_parse(uint64_t addr, uint64_t max_mb);
|
|
|
|
#endif /* DDR_PARAMETER_H */
|