<commit_before>/*
 * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H

#include <arch.h>
#include <drivers/arm/gic_common.h>
#include <lib/utils_def.h>
#include <plat/common/common_def.h>

#include "../stm32mp1_def.h"

/*******************************************************************************
 * Generic platform constants
 ******************************************************************************/

/* Size of cacheable stacks */
#if defined(IMAGE_BL32)
#define PLATFORM_STACK_SIZE		0x600
#else
#define PLATFORM_STACK_SIZE		0xC00
#endif

#ifdef AARCH32_SP_OPTEE
#define OPTEE_HEADER_IMAGE_NAME		"teeh"
#define OPTEE_PAGED_IMAGE_NAME		"teed"
#define OPTEE_PAGER_IMAGE_NAME		"teex"
#define OPTEE_HEADER_BINARY_TYPE	U(0x20)
#define OPTEE_PAGER_BINARY_TYPE		U(0x21)
#define OPTEE_PAGED_BINARY_TYPE		U(0x22)
#endif

/* SSBL = second stage boot loader */
#define BL33_IMAGE_NAME			"ssbl"
#define BL33_BINARY_TYPE		U(0x0)

#define STM32MP_PRIMARY_CPU		U(0x0)
#define STM32MP_SECONDARY_CPU		U(0x1)

#define PLATFORM_CLUSTER_COUNT		ULL(1)
#define PLATFORM_CLUSTER0_CORE_COUNT	U(2)
#define PLATFORM_CLUSTER1_CORE_COUNT	U(0)
#define PLATFORM_CORE_COUNT		(PLATFORM_CLUSTER1_CORE_COUNT + \
					 PLATFORM_CLUSTER0_CORE_COUNT)
#define PLATFORM_MAX_CPUS_PER_CLUSTER	2

#define MAX_IO_DEVICES			U(4)
#define MAX_IO_HANDLES			U(4)
#define MAX_IO_BLOCK_DEVICES		U(1)
#define MAX_IO_MTD_DEVICES		U(1)

/*******************************************************************************
 * BL2 specific defines.
 ******************************************************************************/
/*
 * Put BL2 just below BL3-1. BL2_BASE is calculated using the current BL2 debug
 * size plus a little space for growth.
 */
#define BL2_BASE			STM32MP_BL2_BASE
#define BL2_LIMIT			(STM32MP_BL2_BASE + \
					 STM32MP_BL2_SIZE)

/*******************************************************************************<commit_msg>st: Unify Platform specific defines for PSCI module<commit_after>/*
 * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H

#include <arch.h>
#include <drivers/arm/gic_common.h>
#include <lib/utils_def.h>
#include <plat/common/common_def.h>

#include "../stm32mp1_def.h"

/*******************************************************************************
 * Generic platform constants
 ******************************************************************************/

/* Size of cacheable stacks */
#if defined(IMAGE_BL32)
#define PLATFORM_STACK_SIZE		0x600
#else
#define PLATFORM_STACK_SIZE		0xC00
#endif

#ifdef AARCH32_SP_OPTEE
#define OPTEE_HEADER_IMAGE_NAME		"teeh"
#define OPTEE_PAGED_IMAGE_NAME		"teed"
#define OPTEE_PAGER_IMAGE_NAME		"teex"
#define OPTEE_HEADER_BINARY_TYPE	U(0x20)
#define OPTEE_PAGER_BINARY_TYPE		U(0x21)
#define OPTEE_PAGED_BINARY_TYPE		U(0x22)
#endif

/* SSBL = second stage boot loader */
#define BL33_IMAGE_NAME			"ssbl"
#define BL33_BINARY_TYPE		U(0x0)

#define STM32MP_PRIMARY_CPU		U(0x0)
#define STM32MP_SECONDARY_CPU		U(0x1)

#define PLATFORM_CLUSTER_COUNT		U(1)
#define PLATFORM_CLUSTER0_CORE_COUNT	U(2)
#define PLATFORM_CLUSTER1_CORE_COUNT	U(0)
#define PLATFORM_CORE_COUNT		(PLATFORM_CLUSTER1_CORE_COUNT + \
					 PLATFORM_CLUSTER0_CORE_COUNT)
#define PLATFORM_MAX_CPUS_PER_CLUSTER	2

#define MAX_IO_DEVICES			U(4)
#define MAX_IO_HANDLES			U(4)
#define MAX_IO_BLOCK_DEVICES		U(1)
#define MAX_IO_MTD_DEVICES		U(1)

/*******************************************************************************
 * BL2 specific defines.
 ******************************************************************************/
/*
 * Put BL2 just below BL3-1. BL2_BASE is calculated using the current BL2 debug
 * size plus a little space for growth.
 */
#define BL2_BASE			STM32MP_BL2_BASE
#define BL2_LIMIT			(STM32MP_BL2_BASE + \
					 STM32MP_BL2_SIZE)

/*******************************************************************************
{'fraction_non_alphanumeric': 0.265281173594132, 'fraction_numerical': 0.03667481662591687, 'mean_word_length': 6.718867924528302, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2219888', 'n_tokens_mistral': 1582, 'n_tokens_neox': 1463, 'n_words': 287}