Revert "cpu/x86/mtrr: Fix sign overflow"

This reverts commit 6bbc8d8050.

The macro is used in assembly where integer suffixes are not portable.

Also, it is unclear how this can overflow as it's already the macros
purpose to avoid the overflow.

Change-Id: I12c9bfe40891ae3afbfda05f60a20b59e2954aed
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/31290
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Nico Huber 2019-02-08 16:09:57 +01:00 committed by Patrick Georgi
parent 8ab1752070
commit c9e33573c1
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ static inline unsigned int fls(unsigned int x)
#define _ALIGN_DOWN_POW2(x) ((x) & ~_POW2_MASK(x))
/* Calculate `4GiB - x` (e.g. absolute address for offset from 4GiB) */
#define _FROM_4G_TOP(x) (((1UL << 20) - ((x) >> 12)) << 12)
#define _FROM_4G_TOP(x) (((1 << 20) - ((x) >> 12)) << 12)
/* At the end of romstage, low RAM 0..CACHE_TM_RAMTOP may be set
* as write-back cacheable to speed up ramstage decompression.