• Joel Hutton's avatar
    Clean usage of void pointers to access symbols · 9f85f9e3
    Joel Hutton authored
    
    Void pointers have been used to access linker symbols, by declaring an
    extern pointer, then taking the address of it. This limits symbols
    values to aligned pointer values. To remove this restriction an
    IMPORT_SYM macro has been introduced, which declares it as a char
    pointer and casts it to the required type.
    
    Change-Id: I89877fc3b13ed311817bb8ba79d4872b89bfd3b0
    Signed-off-by: default avatarJoel Hutton <Joel.Hutton@Arm.com>
    9f85f9e3
bl1_private.h 1.07 KB
/*
 * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef __BL1_PRIVATE_H__
#define __BL1_PRIVATE_H__

#include <types.h>
#include <utils_def.h>

/*******************************************************************************
 * Declarations of linker defined symbols which will tell us where BL1 lives
 * in Trusted ROM and RAM
 ******************************************************************************/
IMPORT_SYM(uintptr_t, __BL1_ROM_END__,   BL1_ROM_END);

IMPORT_SYM(uintptr_t, __BL1_RAM_START__, BL1_RAM_BASE);
IMPORT_SYM(uintptr_t, __BL1_RAM_END__,   BL1_RAM_LIMIT);

/******************************************
 * Function prototypes
 *****************************************/
void bl1_arch_setup(void);
void bl1_arch_next_el_setup(void);

void bl1_prepare_next_image(unsigned int image_id);

register_t bl1_fwu_smc_handler(unsigned int smc_fid,
		register_t x1,
		register_t x2,
		register_t x3,
		register_t x4,
		void *cookie,
		void *handle,
		unsigned int flags);
#endif /* __BL1_PRIVATE_H__ */