-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Marvell ARMADA A7K A8K platform support #1807
Add Marvell ARMADA A7K A8K platform support #1807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly minor style issues + few issues to fix.
Note you can run scripts/checkpatch.pl to your check commit(s) against basic stylish issues.
#include <marvell_sec_perf.h> | ||
#include <io.h> | ||
#include <mm/core_memprot.h> | ||
#include <initcall.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: prefer sorting include in alphabetical order
#define SIZE_1M (0x100000) | ||
#define SIZE_2M (0x200000) | ||
#define SIZE_4M (0x400000) | ||
#define SIZE_8M (0x800000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: useless parentheses .
Minor: maybe those SIZE_xM
coud nicely fit in lib/libutils/ext/include/util.h
for (i = 0; i < MAX_RANGE_NUM; i++) { | ||
tmp = read32(MCU_TZ_RANGE_LOW_REG(i)); | ||
TZ_GET_VALID(tmp, valid); | ||
if (!(valid)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: useless parentheses (here and there)
} | ||
|
||
if (!_IS_ALIGNED(addr, size)) { | ||
EMSG("ERR: region size(0x%x) not align with addr(0x%x)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor:
- prefer the
,
at the end of the previous line. - use
"... 0x%" PRIx32
rather than" ... 0x%x"
, here and below.
TZ_SET_AREA_LEN_CODE(data, sizecode); | ||
TZ_SET_START_ADDR_L(data, addr); | ||
|
||
if (valid_range == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very minor: prefer !valid_range
{ | ||
/* max supported granule for armada is 8TB | ||
* but 2GB is far enough here | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: comment indentation.
|
||
#ifdef ARM64 | ||
#ifdef CFG_WITH_PAGER | ||
#error "Pager not supported for ARM64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: ARM64
now supports pager. But maybe your platform does not yet or does not need to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It happened our platform supports 64-bit while pager not. So these codes are OK so far.
But these are the codes reference from the porting_guidelines. So the guide may need updates. :)
@@ -20,6 +20,8 @@ for these platforms. | |||
| HiKey Board (HiSilicon Kirin 620) |`Linaro <op-tee@linaro.org>`| | |||
| HiKey960 Board (HiSilicon Kirin 960) |`Linaro <op-tee@linaro.org>`| | |||
| HiSilicon D02 |`Linaro <op-tee@linaro.org>`| | |||
| Marvell Armada 70x0 |`Kevin Peng <kevinp@marvell.com>`| | |||
| Marvell Armada 80x0 |`Kevin Peng <kevinp@marvell.com>`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Armada 80x0 is not yet supported, maybe wait for its support to declare the board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry that the name "armada7080" makes confusions. It is supposed to include the two platforms, armada70x0 & armada 80x0, as they share the same codes. I shall make it clear.
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some inclusion protection, i.e:
#ifndef PLAT_MARVELL_SEC_PERF_H
#define PLAT_MARVELL_SEC_PERF_H
...
#endif
#include <platform_config.h> | ||
#include <tee_api_types.h> | ||
|
||
TEE_Result init_sec_perf(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: this function does not need to be exported as routine is local to hal_sec_perf.c (use of service_init(init_sec_perf);
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, then this head file is not necessary either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I only have two very minor comments (please see below).
Since we're now trying to use Shippable for CI, could you please rebase your code onto the latest optee_os master, and update .shippable.yml
? At the same time, please squash the fixup commits. With this done, you may add my:
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
#include <arm.h> | ||
|
||
.globl plat_my_core_pos | ||
/* ----------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: the -------
lines are not welcome. This multi-line comments should be like so:
/*
* unsigned int plat_my_core_pos(void)
* This function uses the plat_marvell_calc_core_pos()
* definition to get the index of the calling CPU.
*/
(Same for the comment below)
* unsigned int plat_marvell_calc_core_pos(uint64_t mpidr) | ||
* Helper function to calculate the core position. | ||
* With this function: CorePos = (ClusterId * 2) + | ||
* CoreId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: CoreId can be on the previous line.
0376de6
to
1cf6cec
Compare
@jforissier Hi Jerome, why checkpatch checked so many commits that are not related to this Pull Request:
While I don't see my commit checked? |
@kevin-peng-hao because the CI script ( You commit passes checkpatch (I've run it manually), so all is fine. @etienne-lms do you want to give your A-b or R-b, since you commented on this PR? |
@jforissier ok, got it. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stylish comments...
#include <asm.S> | ||
#include <arm.h> | ||
|
||
.globl plat_my_core_pos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: prefer tabs than space for indentation.
Here and in other source files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace plat_my_core_pos
with get_core_pos
.
#define PHY_2_VIR(addr) ((vaddr_t)phys_to_virt((addr), MEM_AREA_IO_SEC)) | ||
|
||
#define MCU_MC_CONTROL_0_REG PHY_2_VIR(MCU_BASE + 0x044) | ||
#define TRUSTZONE_LOCK (0x1 << 31) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BIT(31)
#define ABORT_PERM 0x3 | ||
|
||
#define MAX_RANGE_NUM (16) | ||
#define INVALID_SIZE_CODE (0xff) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: useless parentheses
|
||
#define RA_ADDR (TZDRAM_BASE) | ||
#define RA_SIZE (TZDRAM_SIZE) | ||
#define RA_PERM (ABORT_PERM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: useless parentheses
} while (0) | ||
|
||
#define RANGE_CODE_TO_SIZE_K(code, sizek) \ | ||
((sizek) = ((4) << (code))) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove last \
minor: fits in a single line.
i, MCU_TZ_RANGE_LOW_REG(i), tmp); | ||
DMSG("AddrL: 0x%08" PRIx32, addr_read); | ||
RANGE_CODE_TO_SIZE_K(sizecode_read, sizek); | ||
sizem = (sizek >> 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: useless parentheses
DMSG("AddrL: 0x%08" PRIx32, addr_read); | ||
RANGE_CODE_TO_SIZE_K(sizecode_read, sizek); | ||
sizem = (sizek >> 10); | ||
DMSG("Size: %" PRId32 "K, %" PRId32 "M", sizek, sizem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: s/PRId32
/PRIu32
/
lib/libutils/ext/include/util.h
Outdated
#define SIZE_2M 0x200000 | ||
#define SIZE_4M 0x400000 | ||
#define SIZE_8M 0x800000 | ||
#define SIZE_2G 0x10000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: use tabulations for indentation.
#define MCU_BASE (0xF0020000) | ||
#define MCU_REG_SIZE (0x1000) | ||
#define MC_SCR_REGISTER (0xF06F0204) | ||
#define MC_SCR_REG_SIZE (0x1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: useless parentheses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review. I think all fixed.
|
||
#define CONSOLE_UART_BASE PLAT_MARVELL_BOOT_UART_BASE | ||
|
||
/* Location of trusted dram on the base fvp */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe update fvp
with something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix SIZE_2G
|
||
.globl get_core_pos | ||
/* | ||
* unsigned int plat_my_core_pos(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: comment not consistent. Maybe better remove it.
lib/libutils/ext/include/util.h
Outdated
#define SIZE_2M 0x200000 | ||
#define SIZE_4M 0x400000 | ||
#define SIZE_8M 0x800000 | ||
#define SIZE_2G 0x10000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define SIZE_2G 0x80000000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, stupid mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor coding style comments...
To get nice consistency in optee_os source tree.
#error "Unknown platform flavor" | ||
#endif | ||
|
||
#define CFG_TEE_RAM_VA_SIZE (4 * 1024 * 1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using SIZE_4M
here ?
You could consider using SIZE_4K
instead of the 2 #define xxx_SIZE 0x1000
above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not use SIZE_4M for CFG_TEE_RAM_VA_SIZE. Looks like kern.ls do not recognize "UL"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use UINTPTR_C()
instead of "UL"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not only caused by "UL", but also the different definitions of ROUND_UP in util.h and kernel/kern.ld.S.
b plat_marvell_calc_core_pos | ||
END_FUNC get_core_pos | ||
|
||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: indentation below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Er...sorry, I don't quite follow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a extra spaces to remove in the 4 lines below.
/*
- * unsigned int plat_marvell_calc_core_pos(uint64_t mpidr)
- * Helper function to calculate the core position.
- * With this function: CorePos = (ClusterId * 2) + CoreId
- */
+ * unsigned int get_core_pos_mpidr(uint32_t mpidr)
+ * Helper function to calculate the core position.
+ * With this function: CorePos = (ClusterId * 2) + CoreId
+ */
(note: 32bit argument, use the generic label get_core_pos_mpidr
as @jenswi-linaro recommends)
|
||
.globl get_core_pos | ||
|
||
FUNC get_core_pos , : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #1817 this function isn't needed
* Helper function to calculate the core position. | ||
* With this function: CorePos = (ClusterId * 2) + CoreId | ||
*/ | ||
FUNC plat_marvell_calc_core_pos , : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #1817 this function should be named get_core_pos_mpidr()
#define TZ_GET_VALID(data, ret) ((ret) = ((data) & (0x1))) | ||
#define TZ_SET_VALID(data, val) \ | ||
do { \ | ||
(data) &= (~(0x1)); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This macro will probably only work as intended if data
is of the same width as the type int
core/arch/arm/plat-marvell/main.c
Outdated
void console_init(void) | ||
{ | ||
serial8250_uart_init(&console_data, CONSOLE_UART_BASE | ||
, CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first ,
should be at the end of previous line.
core/arch/arm/plat-marvell/sub.mk
Outdated
@@ -0,0 +1,6 @@ | |||
global-incdirs-y += . | |||
srcs-y += main.c | |||
ifdef PLATFORM_FLAVOR_armada7k8k |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer
ifeq ($(PLATFORM_FLAVOR_armada7k8k),y)
lib/libutils/ext/include/util.h
Outdated
@@ -30,6 +30,13 @@ | |||
#include <compiler.h> | |||
#include <stdint.h> | |||
|
|||
#define SIZE_4K 0x1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these constants should be of an unsigned type, same width as size_t
would be a good choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry but how to address this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We maybe something like #define SIZE_2G 0x80000000UL
lib/libutils/ext/include/util.h
Outdated
@@ -30,6 +30,13 @@ | |||
#include <compiler.h> | |||
#include <stdint.h> | |||
|
|||
#define SIZE_4K 0x1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We maybe something like #define SIZE_2G 0x80000000UL
{ | ||
/* max supported granule for armada is 8TB | ||
* but 2GB is far enough here | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- /* max supported granule for armada is 8TB
- * but 2GB is far enough here
- */
+ /*
+ * Max supported granule for armada is 8TB
+ * but 2GB is far enough here
+ */
b plat_marvell_calc_core_pos | ||
END_FUNC get_core_pos | ||
|
||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a extra spaces to remove in the 4 lines below.
/*
- * unsigned int plat_marvell_calc_core_pos(uint64_t mpidr)
- * Helper function to calculate the core position.
- * With this function: CorePos = (ClusterId * 2) + CoreId
- */
+ * unsigned int get_core_pos_mpidr(uint32_t mpidr)
+ * Helper function to calculate the core position.
+ * With this function: CorePos = (ClusterId * 2) + CoreId
+ */
(note: 32bit argument, use the generic label get_core_pos_mpidr
as @jenswi-linaro recommends)
@jforissier @jenswi-linaro @etienne-lms |
With the checkpatch errors/warnings fixed: |
@kevin-peng-hao yes, please do squash the patches, fix the two checkpatch warnings/errors [1], and add Jens' A-b. [1]:
|
Hi @etienne-lms , can I add you ack in this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments. Thanks.
#ifndef PLATFORM_CONFIG_H | ||
#define PLATFORM_CONFIG_H | ||
|
||
#include <util.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not include <util.h>
here because nothing in this file requires it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's required 'cause SIZE_XX are referenced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly needed because you're just #defining things. So the user of those things could include <util.h>
instead of having it included here.
But, thinking again about it, I think it's a bad idea ;) so you can leave the include here.
@@ -44,12 +51,14 @@ | |||
|
|||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | |||
|
|||
#ifndef ASM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to a separate commit.
#define SIZE_2M UINTPTR_C(0x200000) | ||
#define SIZE_4M UINTPTR_C(0x400000) | ||
#define SIZE_8M UINTPTR_C(0x800000) | ||
#define SIZE_2G UINTPTR_C(0x80000000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to a separate commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me. But is it the right format for asm/C to get the (unsigned long int) sized value ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASM seems not recognize UL or L...etc. I cannot figure out what's the difference between UL and LU. But UINTPTR_C distinguishes ASM and C, so I used it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "LU" is a typo that slipped trough because the compiler seems to accept it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, UL
and LU
are equivalent and are defined by the C99 standard in section 6.4.4.1:
integer-suffix:
unsigned-suffix long-suffix opt
unsigned-suffix long-long-suffix
long-suffix unsigned-suffix opt
long-long-suffix unsigned-suffix opt
unsigned-suffix: one of
u U
long-suffix: one of
l L
long-long-suffix: one of
ll LL
core/arch/arm/plat-marvell/main.c
Outdated
.cpu_resume = pm_do_nothing, | ||
.system_off = pm_do_nothing, | ||
.system_reset = pm_do_nothing, | ||
#else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can that happen since plat-marvell/conf.mk
has $(call force,CFG_WITH_ARM_TRUSTED_FW,y)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor comments.
Agree with @jforissier, changes in util.h should be in a specific change, before the plat-marvell/ changes.
FUNC get_core_pos_mpidr , : | ||
and x1, x0, #MPIDR_CPU_MASK | ||
and x0, x0, #MPIDR_CLUSTER_MASK | ||
add x0, x1, x0, LSR #7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get rid of this file by settings $(call force,CFG_CORE_CLUSTER_SHIFT,1)
in your conk.mk, see core/arch/arm/kernel/misc_a64.S.
#define RA_PERM ABORT_PERM | ||
|
||
#define TZ_IS_VALID(data) ((data) & (0x1)) | ||
#define TZ_SET_VALID(data) (data) |= 0x1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add parenthesis.
core/arch/arm/plat-marvell/kern.ld.S
Outdated
@@ -0,0 +1 @@ | |||
#include "../kernel/kern.ld.S" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: you can remove this file (since #1873)
core/arch/arm/plat-marvell/link.mk
Outdated
@@ -0,0 +1 @@ | |||
include core/arch/arm/kernel/link.mk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: you can remove this file (since #1873)
lib/libutils/ext/include/util.h
Outdated
/* Round up the even multiple of size, size has to be a multiple of 2 */ | ||
#define ROUNDUP(v, size) (((v) + ((__typeof__(v))(size) - 1)) & \ | ||
~((__typeof__(v))(size) - 1)) | ||
|
||
/* Round down the even multiple of size, size has to be a multiple of 2 */ | ||
#define ROUNDDOWN(v, size) ((v) & ~((__typeof__(v))(size) - 1)) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe define an ASM version for these ROUNDDOWN/ROUNDUP.
#define ROUNDUP(x, y) ((((x) + (y) - 1) / (y)) * (y))
#define ROUNDDOWN(x, y) (((x) / (y)) * (y))
78e30aa
to
1170210
Compare
|
@kevin-peng-hao you have modified |
1170210
to
739ec27
Compare
@jforissier Yeah, sure. My mistake, sorry for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last question for the 1st commit (SIZE_xx macros)
Otherwise looks ok to me.
#define SIZE_2M UINTPTR_C(0x200000) | ||
#define SIZE_4M UINTPTR_C(0x400000) | ||
#define SIZE_8M UINTPTR_C(0x800000) | ||
#define SIZE_2G UINTPTR_C(0x80000000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me. But is it the right format for asm/C to get the (unsigned long int) sized value ?
@kevin-peng-hao please add the |
Add some useful SIZE_XX definitions like 4k, 1M, etc... Signed-off-by: Kevin Peng <kevinp@marvell.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Add ROUNDDOWN and ROUNDUP definitions for ASM version which are different from C versions Signed-off-by: Kevin Peng <kevinp@marvell.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Only tested 64-bit mode with default configurations: 1. build command make PLATFORM=marvell-armada7080 CFG_ARM64_core=y 2. Passed xtest Signed-off-by: Kevin Peng <kevinp@marvell.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
739ec27
to
a0825ef
Compare
Ok, thank you guys very much. |
Added Marvell platform with initial support for ARMADA A7K & A8K.
Only tested 64-bit mode with default configurations:
make PLATFORM=marvell-armada7080 CFG_ARM64_core=y
Signed-off-by: Kevin Peng kevinp@marvell.com