Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
f009c5f3
Unverified
Commit
f009c5f3
authored
Mar 05, 2019
by
Antonio Niño Díaz
Committed by
GitHub
Mar 05, 2019
Browse files
Merge pull request #1847 from jts-arm/mbedtls
Remove Mbed TLS dependency from plat_bl_common.c
parents
bf9e90c9
17e1335c
Changes
2
Hide whitespace changes
Inline
Side-by-side
drivers/auth/mbedtls/mbedtls_common.c
View file @
f009c5f3
/*
* Copyright (c) 2015-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2015-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -16,6 +16,8 @@
#include <drivers/auth/mbedtls/mbedtls_config.h>
#include <plat/common/platform.h>
#pragma weak plat_get_mbedtls_heap
static
void
cleanup
(
void
)
{
ERROR
(
"EXIT from BL2
\n
"
);
...
...
@@ -54,3 +56,19 @@ void mbedtls_init(void)
ready
=
1
;
}
}
/*
* The following default implementation of the function simply returns the
* by default allocated heap.
*/
int
plat_get_mbedtls_heap
(
void
**
heap_addr
,
size_t
*
heap_size
)
{
static
unsigned
char
heap
[
TF_MBEDTLS_HEAP_SIZE
];
assert
(
heap_addr
!=
NULL
);
assert
(
heap_size
!=
NULL
);
*
heap_addr
=
heap
;
*
heap_size
=
sizeof
(
heap
);
return
0
;
}
plat/common/plat_bl_common.c
View file @
f009c5f3
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018
-2019
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -10,9 +10,6 @@
#include <arch_helpers.h>
#include <common/bl_common.h>
#include <common/debug.h>
#if TRUSTED_BOARD_BOOT
#include <drivers/auth/mbedtls/mbedtls_config.h>
#endif
#include <lib/xlat_tables/xlat_tables_compat.h>
#include <plat/common/platform.h>
...
...
@@ -26,7 +23,6 @@
#pragma weak bl2_plat_handle_pre_image_load
#pragma weak bl2_plat_handle_post_image_load
#pragma weak plat_try_next_boot_source
#pragma weak plat_get_mbedtls_heap
void
bl2_el3_plat_prepare_exit
(
void
)
{
...
...
@@ -57,24 +53,6 @@ int plat_try_next_boot_source(void)
return
0
;
}
#if TRUSTED_BOARD_BOOT
/*
* The following default implementation of the function simply returns the
* by-default allocated heap.
*/
int
plat_get_mbedtls_heap
(
void
**
heap_addr
,
size_t
*
heap_size
)
{
static
unsigned
char
heap
[
TF_MBEDTLS_HEAP_SIZE
];
assert
(
heap_addr
!=
NULL
);
assert
(
heap_size
!=
NULL
);
*
heap_addr
=
heap
;
*
heap_size
=
sizeof
(
heap
);
return
0
;
}
#endif
/* TRUSTED_BOARD_BOOT */
/*
* Set up the page tables for the generic and platform-specific memory regions.
* The size of the Trusted SRAM seen by the BL image must be specified as well
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment