arm-trusted-firmware/include/drivers/partition/partition.h
dp-arm 82cb2c1ad9 Use SPDX license identifiers
To make software license auditing simpler, use SPDX[0] license
identifiers instead of duplicating the license text in every file.

NOTE: Files that have been imported by FreeBSD have not been modified.

[0]: https://spdx.org/

Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2017-05-03 09:39:28 +01:00

40 lines
976 B
C

/*
* Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __PARTITION_H__
#define __PARTITION_H__
#include <cassert.h>
#include <types.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__ */