Revert changes to intel.py

This commit is contained in:
David McDonald
2025-03-29 15:51:19 -05:00
parent ee3d965ef6
commit c17bcb644b
+8 -8
View File
@@ -9,7 +9,7 @@ import math
import struct
from typing import Any, Dict, Iterable, List, Optional, Tuple
import volatility3
from volatility3 import classproperty
from volatility3.framework import exceptions, interfaces, constants
from volatility3.framework.configuration import requirements
from volatility3.framework.layers import linear
@@ -75,13 +75,13 @@ class Intel(linear.LinearlyMappedLayer):
# These can vary depending on the type of space
self._index_shift = math.ceil(math.log2(struct.calcsize(self._entry_format)))
@volatility3.classproperty
@classproperty
@functools.lru_cache
def page_shift(cls) -> int:
"""Page shift for the intel memory layers."""
return cls._page_size_in_bits
@volatility3.classproperty
@classproperty
@functools.lru_cache
def page_size(cls) -> int:
"""Page size for the intel memory layers.
@@ -90,30 +90,30 @@ class Intel(linear.LinearlyMappedLayer):
"""
return 1 << cls._page_size_in_bits
@volatility3.classproperty
@classproperty
@functools.lru_cache
def page_mask(cls) -> int:
"""Page mask for the intel memory layers."""
return ~(cls.page_size - 1)
@volatility3.classproperty
@classproperty
@functools.lru_cache
def bits_per_register(cls) -> int:
"""Returns the bits_per_register to determine the range of an
IntelTranslationLayer."""
return cls._bits_per_register
@volatility3.classproperty
@classproperty
@functools.lru_cache
def minimum_address(cls) -> int:
return 0
@volatility3.classproperty
@classproperty
@functools.lru_cache
def maximum_address(cls) -> int:
return (1 << cls._maxvirtaddr) - 1
@volatility3.classproperty
@classproperty
def structure(cls) -> List[Tuple[str, int, bool]]:
return cls._structure