diff options
author | Jimmy Huang <jimmy.huang@mediatek.com> | 2015-04-13 20:28:38 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-27 20:50:00 +0200 |
commit | 0fd3e79d0d9d3e5607a57a899333ddb1ef6a927e (patch) | |
tree | b0a04e1ec5a73e53082f0be1686043baee289d1e /payloads/libpayload/include/stdlib.h | |
parent | dea4597bd4e35d8421b1cf8816a3c9dc045b9b36 (diff) |
libpayload arm64: update mmu translation table granule size, logic and macros
1. change mmu granule size from 64KB to 4KB
2. correct level 1 translation table creation logic
3. automatically calculate granule size related macros
BRANCH=none
BUG=none
TEST=boot to kernel on oak board
Change-Id: Ic62c7863dff53f566b82b68ff1d1ad9ec5d0698d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e5de7d942e42a8202fb879ce64b871864b1b9d38
Original-Change-Id: I78d7838921fa82a670e18ddc2de6d766dc7a2146
Original-Signed-off-by: Jimmy Huang <jimmy.huang@mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/266010
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: Yidi Lin <yidi.lin@mediatek.com>
Original-Commit-Queue: Yidi Lin <yidi.lin@mediatek.com>
Reviewed-on: http://review.coreboot.org/10010
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/libpayload/include/stdlib.h')
-rw-r--r-- | payloads/libpayload/include/stdlib.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h index deb5e3dac4..08c7d06c3e 100644 --- a/payloads/libpayload/include/stdlib.h +++ b/payloads/libpayload/include/stdlib.h @@ -39,6 +39,7 @@ #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) #define ALIGN_UP(x,a) ALIGN((x),(a)) #define ALIGN_DOWN(x,a) ((x) & ~((typeof(x))(a)-1UL)) +#define IS_ALIGNED(x,a) (((x) & ((typeof(x))(a)-1UL)) == 0) /** * @defgroup malloc Memory allocation functions |