summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/CommonDataClass/CommonClass.py
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@arm.com>2020-03-31 20:25:02 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-04-02 15:35:52 +0300
commitdb0f8c2f849e9bc0c965db0d1befb19050224d66 (patch)
treedccc43e12c2f91602275382a28f20c08edca2a2f /BaseTools/Source/Python/CommonDataClass/CommonClass.py
parent49188b2aa481e76190883e73147af72128c878db (diff)
downloadedk2-db0f8c2f849e9bc0c965db0d1befb19050224d66.tar.xz
ArmPkg/ArmMmuLib: drop pointless LookupAddresstoRootTable() routine
LookupAddresstoRootTable() uses a loop to go over its MaxAddress argument, essentially to do a log2() and determine how many bits are needed to represent it. Since the argument is the result of a shift-left expression, there is some room for improvement here, and we can simply use the bit count directly to calculate the value of T0SZ. At the same time, we can omit calling GetRootTranslationTableInfo() to determine the number of root table entries, and add a new helper that applies the trivial calculation directly. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Diffstat (limited to 'BaseTools/Source/Python/CommonDataClass/CommonClass.py')
0 files changed, 0 insertions, 0 deletions