diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2016-07-18 16:31:43 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-07-28 13:37:46 +1000 |
commit | 95ba2af20d232dcab3f923f0f509684f4767ab3c (patch) | |
tree | 81942f5b45c51802c1065d4dd0a92d163abf8f5b | |
parent | cb6402af3e01da5457a897cfe590e34d6c71be71 (diff) | |
download | skiboot-95ba2af20d232dcab3f923f0f509684f4767ab3c.zip skiboot-95ba2af20d232dcab3f923f0f509684f4767ab3c.tar.gz skiboot-95ba2af20d232dcab3f923f0f509684f4767ab3c.tar.bz2 |
FSP/MDST: Fix TCE alignment issue
We have used TCE_MASK value (4095) instead of TCE_PSIZE (4096) to align memory
source address. In some corner cases (like source memory size = 4097) we may
endup doing wrong mapping and corrupting part of SYSDUMP.
This patch uses ALIGN_UP macro with TCE_PSIZE value for alignining memory.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/fsp/fsp-mdst-table.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/fsp/fsp-mdst-table.c b/hw/fsp/fsp-mdst-table.c index e6018aa..0f145ba 100644 --- a/hw/fsp/fsp-mdst-table.c +++ b/hw/fsp/fsp-mdst-table.c @@ -90,7 +90,7 @@ static inline uint32_t get_dump_region_map_size(uint64_t addr, uint32_t size) start = addr & ~TCE_MASK; end = addr + size; - end = (end + (TCE_MASK - 1)) & ~TCE_MASK; + end = ALIGN_UP(end, TCE_PSIZE); return (end - start); } |