Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
1a433965
Commit
1a433965
authored
5 years ago
by
Soby Mathew
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "allwinner: Fix incorrect ARISC code patch offset check" into integration
parents
2bcc672f
5cffedce
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
plat/allwinner/common/include/sunxi_private.h
+2
-3
plat/allwinner/common/include/sunxi_private.h
plat/allwinner/common/sunxi_common.c
+3
-5
plat/allwinner/common/sunxi_common.c
plat/allwinner/common/sunxi_cpu_ops.c
+1
-1
plat/allwinner/common/sunxi_cpu_ops.c
with
6 additions
and
9 deletions
+6
-9
plat/allwinner/common/include/sunxi_private.h
View file @
1a433965
/*
* Copyright (c) 2017-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -20,7 +20,6 @@ void sunxi_security_setup(void);
uint16_t
sunxi_read_soc_id
(
void
);
void
sunxi_set_gpio_out
(
char
port
,
int
pin
,
bool
level_high
);
int
sunxi_init_platform_r_twi
(
uint16_t
socid
,
bool
use_rsb
);
void
sunxi_execute_arisc_code
(
uint32_t
*
code
,
size_t
size
,
int
patch_offset
,
uint16_t
param
);
void
sunxi_execute_arisc_code
(
uint32_t
*
code
,
size_t
size
,
uint16_t
param
);
#endif
/* SUNXI_PRIVATE_H */
This diff is collapsed.
Click to expand it.
plat/allwinner/common/sunxi_common.c
View file @
1a433965
/*
* Copyright (c) 2017-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -172,8 +172,7 @@ DEFINE_BAKERY_LOCK(arisc_lock);
* in SRAM, put the address of that into the reset vector and release the
* arisc reset line. The SCP will execute that code and pull the line up again.
*/
void
sunxi_execute_arisc_code
(
uint32_t
*
code
,
size_t
size
,
int
patch_offset
,
uint16_t
param
)
void
sunxi_execute_arisc_code
(
uint32_t
*
code
,
size_t
size
,
uint16_t
param
)
{
uintptr_t
arisc_reset_vec
=
SUNXI_SRAM_A2_BASE
-
0x4000
+
0x100
;
...
...
@@ -187,8 +186,7 @@ void sunxi_execute_arisc_code(uint32_t *code, size_t size,
}
while
(
1
);
/* Patch up the code to feed in an input parameter. */
if
(
patch_offset
>=
0
&&
patch_offset
<=
(
size
-
4
))
code
[
patch_offset
]
=
(
code
[
patch_offset
]
&
~
0xffff
)
|
param
;
code
[
0
]
=
(
code
[
0
]
&
~
0xffff
)
|
param
;
clean_dcache_range
((
uintptr_t
)
code
,
size
);
/*
...
...
This diff is collapsed.
Click to expand it.
plat/allwinner/common/sunxi_cpu_ops.c
View file @
1a433965
...
...
@@ -78,7 +78,7 @@ void sunxi_cpu_off(u_register_t mpidr)
* patched into the first instruction.
*/
sunxi_execute_arisc_code
(
arisc_core_off
,
sizeof
(
arisc_core_off
),
0
,
BIT_32
(
core
));
BIT_32
(
core
));
}
void
sunxi_cpu_on
(
u_register_t
mpidr
)
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help