Skip to contentSkip to conversation

target-arm: use extended address bits from supersection short descriptor

PATCH Applied Sergey Fedorov 2 participants 2 messages Jun 2, 2015 – Jun 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 target-arm: use extended address bits from supersection short descriptor

Since ARMv7 with LPAE support, a supersection short translation table descriptor has had extended base address fields which hold bits 39:32 of translated address. These fields are IMPDEF in ARMv6 and ARMv7 without LPAE support.

---

v3:
* needless parenthesis removed
v2:
* commit message enhanced

 target-arm/helper.c | 2 ++
 1 file changed, 2 insertions(+)
target-arm/helper.c +2 -0
index 1cc4993..b2b377a 100644
@@ -5323,6 +5323,8 @@ static int get_phys_addr_v6(CPUARMState *env, uint32_t address, int access_type,
         if (desc & (1 << 18)) {
             /* Supersection.  */
             phys_addr = (desc & 0xff000000) | (address & 0x00ffffff);
+            phys_addr |= (uint64_t)extract32(desc, 20, 4) << 32;
+            phys_addr |= (uint64_t)extract32(desc, 5, 4) << 36;
             *page_size = 0x1000000;
         } else {
             /* Section.  */
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · Sergey Fedorov

Since ARMv7 with LPAE support, a supersection short translation table descriptor has had extended base address fields which hold bits 39:32 of translated address. These fields are IMPDEF in ARMv6 and ARMv7 without LPAE support.

Quoted 7 lines

---

v3:
* needless parenthesis removed
v2:
* commit message enhanced

Applied to target-arm.next, thanks.

-- PMM