diff options
author | Gabriel Ganne <gabriel.ganne@enea.com> | 2018-01-11 15:04:19 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-01-14 16:14:54 +0000 |
commit | c5239ad59716a833a15523755b03418a47e02a5a (patch) | |
tree | 806e883c498da48fe0a2f3bc6fdc7f2aa9394f93 /src/svm | |
parent | 4478d8edc35757c1da66e1c3c108af24940fbdd3 (diff) |
vabits - subtract from the 'end' address instead of from 'bits'.
This is a fixup for the commits on
calc base address on AArch64 based on autodetected VA space size
As reported by: Brian Brooks <brian.brooks@arm.com>
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Change-Id: Id1bd7b7d7e5c188d8547c46134082bd4563b92db
Diffstat (limited to 'src/svm')
-rw-r--r-- | src/svm/svm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/svm/svm.c b/src/svm/svm.c index 2cbc0d77c22..d3e56c1a46a 100644 --- a/src/svm/svm.c +++ b/src/svm/svm.c @@ -76,14 +76,15 @@ svm_get_global_region_base_va () unformat_init_clib_file (&input, fd); while (unformat_check_input (&input) != UNFORMAT_END_OF_INPUT) { - unformat (&input, "%llx-%llx", &start, &end); + if (unformat (&input, "%llx-%llx", &start, &end)) + end--; unformat_skip_line (&input); } unformat_free (&input); close (fd); count_leading_zeros (bits, end); - bits = 64 - (bits + 1); + bits = 64 - bits; if (bits >= 36 && bits <= 48) return ((1ul << bits) / 4) - (2 * SVM_GLOBAL_REGION_SIZE); else |