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
88b69fcc
Commit
88b69fcc
authored
Sep 12, 2019
by
Soby Mathew
Committed by
TrustedFirmware Code Review
Sep 12, 2019
Browse files
Merge "Tegra: memctrl_v2: fix "overflow before widen" coverity issue" into integration
parents
f52f73b3
36bf55d6
Changes
1
Show whitespace changes
Inline
Side-by-side
plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c
View file @
88b69fcc
/*
/*
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
...
@@ -360,17 +361,15 @@ void tegra_memctrl_videomem_setup(uint64_t phys_base, uint32_t size_in_bytes)
...
@@ -360,17 +361,15 @@ void tegra_memctrl_videomem_setup(uint64_t phys_base, uint32_t size_in_bytes)
if
((
phys_base
>
vmem_end_old
)
||
(
video_mem_base
>
vmem_end_new
))
{
if
((
phys_base
>
vmem_end_old
)
||
(
video_mem_base
>
vmem_end_new
))
{
tegra_clear_videomem
(
video_mem_base
,
tegra_clear_videomem
(
video_mem_base
,
(
uint32_t
)
video_mem_size_mb
<<
20U
);
video_mem_size_mb
<<
20U
);
}
else
{
}
else
{
if
(
video_mem_base
<
phys_base
)
{
if
(
video_mem_base
<
phys_base
)
{
non_overlap_area_size
=
phys_base
-
video_mem_base
;
non_overlap_area_size
=
phys_base
-
video_mem_base
;
tegra_clear_videomem
(
video_mem_base
,
tegra_clear_videomem
(
video_mem_base
,
non_overlap_area_size
);
(
uint32_t
)
non_overlap_area_size
);
}
}
if
(
vmem_end_old
>
vmem_end_new
)
{
if
(
vmem_end_old
>
vmem_end_new
)
{
non_overlap_area_size
=
vmem_end_old
-
vmem_end_new
;
non_overlap_area_size
=
vmem_end_old
-
vmem_end_new
;
tegra_clear_videomem
(
vmem_end_new
,
tegra_clear_videomem
(
vmem_end_new
,
non_overlap_area_size
);
(
uint32_t
)
non_overlap_area_size
);
}
}
}
}
...
...
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