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
edbe490b
Commit
edbe490b
authored
Feb 11, 2021
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
Feb 11, 2021
Browse files
Merge "morello: Modify morello_plat_info structure" into integration
parents
04c12231
42ea8d67
Changes
2
Hide whitespace changes
Inline
Side-by-side
plat/arm/board/morello/morello_bl31_setup.c
View file @
edbe490b
...
...
@@ -8,6 +8,7 @@
#include <drivers/arm/css/css_mhu_doorbell.h>
#include <drivers/arm/css/scmi.h>
#include <drivers/arm/css/sds.h>
#include <lib/cassert.h>
#include <plat/arm/common/plat_arm.h>
#include "morello_def.h"
...
...
@@ -17,18 +18,21 @@
* Platform information structure stored in SDS.
* This structure holds information about platform's DDR
* size which is an information about multichip setup
*
-
multichip mode
*
-
slave_count
*
-
Local DDR size in GB, DDR memory in master board
*
-
Remote DDR size in GB, DDR memory in slave board
* -
Local DDR size in bytes, DDR memory in master board
* -
Remote DDR size in bytes, DDR memory in slave board
* -
slave_count
* -
multichip mode
*/
struct
morello_plat_info
{
bool
multichip_mode
;
uint64_t
local_ddr_size
;
uint64_t
remote_ddr_size
;
uint8_t
slave_count
;
uint8_t
local_ddr_size
;
uint8_t
remote_ddr_size
;
bool
multichip_mode
;
}
__packed
;
/* Compile time assertion to ensure the size of structure is 18 bytes */
CASSERT
(
sizeof
(
struct
morello_plat_info
)
==
MORELLO_SDS_PLATFORM_INFO_SIZE
,
assert_invalid_plat_info_size
);
/*
* BL33 image information structure stored in SDS.
* This structure holds the source & destination addresses and
...
...
@@ -80,6 +84,7 @@ void bl31_platform_setup(void)
int
ret
;
struct
morello_plat_info
plat_info
;
struct
morello_bl33_info
bl33_info
;
struct
morello_plat_info
*
copy_dest
;
ret
=
sds_init
();
if
(
ret
!=
SDS_OK
)
{
...
...
@@ -99,8 +104,8 @@ void bl31_platform_setup(void)
/* Validate plat_info SDS */
if
((
plat_info
.
local_ddr_size
==
0U
)
||
(
plat_info
.
local_ddr_size
>
MORELLO_MAX_DDR_CAPACITY
_GB
)
||
(
plat_info
.
remote_ddr_size
>
MORELLO_MAX_DDR_CAPACITY
_GB
)
||
(
plat_info
.
local_ddr_size
>
MORELLO_MAX_DDR_CAPACITY
)
||
(
plat_info
.
remote_ddr_size
>
MORELLO_MAX_DDR_CAPACITY
)
||
(
plat_info
.
slave_count
>
MORELLO_MAX_SLAVE_COUNT
))
{
ERROR
(
"platform info SDS is corrupted
\n
"
);
panic
();
...
...
@@ -127,5 +132,6 @@ void bl31_platform_setup(void)
* and platform information should be passed to BL33 using NT_FW_CONFIG
* passing mechanism.
*/
mmio_write_32
(
MORELLO_PLATFORM_INFO_BASE
,
*
(
uint32_t
*
)
&
plat_info
);
copy_dest
=
(
struct
morello_plat_info
*
)
MORELLO_PLATFORM_INFO_BASE
;
*
copy_dest
=
plat_info
;
}
plat/arm/board/morello/morello_def.h
View file @
edbe490b
...
...
@@ -18,8 +18,8 @@
/* SDS Platform information defines */
#define MORELLO_SDS_PLATFORM_INFO_STRUCT_ID U(8)
#define MORELLO_SDS_PLATFORM_INFO_OFFSET U(0)
#define MORELLO_SDS_PLATFORM_INFO_SIZE U(
4
)
#define MORELLO_MAX_DDR_CAPACITY
_GB
U(
64
)
#define MORELLO_SDS_PLATFORM_INFO_SIZE U(
18
)
#define MORELLO_MAX_DDR_CAPACITY U(
0x1000000000
)
#define MORELLO_MAX_SLAVE_COUNT U(16)
/* SDS BL33 image information defines */
...
...
@@ -28,6 +28,6 @@
#define MORELLO_SDS_BL33_INFO_SIZE U(12)
/* Base address of non-secure SRAM where Platform information will be filled */
#define MORELLO_PLATFORM_INFO_BASE UL(0x0600
8
000)
#define MORELLO_PLATFORM_INFO_BASE UL(0x0600
0
000)
#endif
/* MORELLO_DEF_H */
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