summaryrefslogtreecommitdiff
path: root/src/drivers/aspeed
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-07-15 13:48:41 -0600
committerPatrick Georgi <pgeorgi@google.com>2019-07-19 10:01:35 +0000
commitd92137adaba2898c86d696859c7c33f0a3bd7cbb (patch)
tree1269a27dad538b9d38a685ba80d1f1c93f59d13c /src/drivers/aspeed
parent6e66b4e820ca90ceb1f5dc3b2cc8fa18f9293aac (diff)
nb/via/vx900: Ensure framebuffer size is within limits
- Use log2() when rounding down size_mb to the closest power of 2. Do a sanity check beforehand that size_mb is nonzero, else log2() will return -1 and there will be an undefined integer shift. - The framebuffer size needs to be between 8 and 512 MiB, so check after all the calculations are done to make sure this is the case. Change-Id: I3962e5cdc094c8da22d8dbadf16637e02fa98689 Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Found-by: Coverity CID 1391086 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34355 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/drivers/aspeed')
0 files changed, 0 insertions, 0 deletions