assign page_offset and kvbase based on VA_BITS passed
Change-Id: I525f3c7fd91e1f06e909c2f4c1749c44c068baea
Signed-off-by: Ankur Bansal <er.ankurbansal(a)gmail.com>
---
arm64.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/arm64.c b/arm64.c
index 7069312..2dc77f7 100644
--- a/arm64.c
+++ b/arm64.c
@@ -220,10 +220,17 @@ arm64_init(int when)
/* vabits_actual introduced after mm flip, so it should be flipped layout */
if (ms->VA_BITS_ACTUAL) {
- ms->page_offset = ARM64_FLIP_PAGE_OFFSET;
- /* useless on arm64 */
- machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET;
- machdep->kvbase = ARM64_FLIP_PAGE_OFFSET;
+ if ((pc->flags2 & SNAP)) {
+ ms->page_offset = ARM64_FLIP_PAGE_OFFSET;
+ /* useless on arm64 */
+ machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET;
+ machdep->kvbase = ARM64_FLIP_PAGE_OFFSET;
+ }
+ else{
+ ms->page_offset = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
+ machdep->identity_map_base = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
+ machdep->kvbase = ARM64_FLIP_PAGE_OFFSET_ACTUAL;
+ }
ms->userspace_top = ARM64_USERSPACE_TOP_ACTUAL;
} else {
ms->page_offset = ARM64_PAGE_OFFSET;
--
2.7.4
Show replies by date