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>
40 lines
970 B
C
40 lines
970 B
C
/*
|
|
* Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef PARTITION_H
|
|
#define PARTITION_H
|
|
|
|
#include <cassert.h>
|
|
#include <stdint.h>
|
|
|
|
#if !PLAT_PARTITION_MAX_ENTRIES
|
|
# define PLAT_PARTITION_MAX_ENTRIES 128
|
|
#endif /* PLAT_PARTITION_MAX_ENTRIES */
|
|
|
|
CASSERT(PLAT_PARTITION_MAX_ENTRIES <= 128, assert_plat_partition_max_entries);
|
|
|
|
#define PARTITION_BLOCK_SIZE 512
|
|
|
|
#define EFI_NAMELEN 36
|
|
|
|
typedef struct partition_entry {
|
|
uint64_t start;
|
|
uint64_t length;
|
|
char name[EFI_NAMELEN];
|
|
} partition_entry_t;
|
|
|
|
typedef struct partition_entry_list {
|
|
partition_entry_t list[PLAT_PARTITION_MAX_ENTRIES];
|
|
int entry_count;
|
|
} partition_entry_list_t;
|
|
|
|
int load_partition_table(unsigned int image_id);
|
|
const partition_entry_t *get_partition_entry(const char *name);
|
|
const partition_entry_list_t *get_partition_entry_list(void);
|
|
void partition_init(unsigned int image_id);
|
|
|
|
#endif /* PARTITION_H */
|