diff options
author | Furquan Shaikh <furquan@google.com> | 2020-11-20 22:50:26 -0800 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2020-12-08 18:57:35 +0000 |
commit | 19ba95f799e6a27223b9bde3d4d66a685794e3ed (patch) | |
tree | 472a2421b98d88627525b62b1002d4d314d05696 /util/cbfstool/common.h | |
parent | 6b6e9b503d9aac1e5c9e71623752399683c31218 (diff) |
util/cbfstool: Rename IS_TOP_ALIGNED_ADDRESS to IS_HOST_SPACE_ADDRESS
This change renames the macro `IS_TOP_ALIGNED_ADDRESS` to
`IS_HOST_SPACE_ADDRESS` to make it clear that the macro checks if
given address is an address in the host space as opposed to the SPI
flash space.
BUG=b:171534504
Change-Id: I84bb505df62ac41f1d364a662be145603c0bd5fa
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47830
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r-- | util/cbfstool/common.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index f1287e299f..1c83045eee 100644 --- a/util/cbfstool/common.h +++ b/util/cbfstool/common.h @@ -15,7 +15,12 @@ #include "swab.h" -#define IS_TOP_ALIGNED_ADDRESS(x) ((uint32_t)(x) > 0x80000000) +/* + * There are two address spaces that this tool deals with - SPI flash address space and host + * address space. This macros checks if the address is greater than 2GiB under the assumption + * that the low MMIO lives in the top half of the 4G address space of the host. + */ +#define IS_HOST_SPACE_ADDRESS(addr) ((uint32_t)(addr) > 0x80000000) #define unused __attribute__((unused)) |