target-arm: use extended address bits from supersection short descriptor
PATCH 1/1 target-arm: use extended address bits from supersection short descriptor
--- target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+)
target-arm/helper.c +2 -0
@@ -5333,6 +5333,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
Quoted 9 lines · Sergey Fedorov
--- target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+)target-arm/helper.c +0
-0
target-arm/helper.c static int get_phys_addr_v6(CPUARMState *env, uint32_t address, int access_type, · line 5340
Quoted 8 lines
target-arm/helper.c +2
-0@@ -5333,6 +5333,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. */
This looks OK codewise, but I can't apply it because you've forgotten the signed-off-by line.
Can you also provide a useful commit message, please? Patches should pretty much always have a long-form commit message, except possibly when they're part of a large patch series, and rarely even then. (For instance in this case it's worth mentioning that supporting these extra bits is IMPDEF in v6 and in v7-without-LPAE but required in LPAE.)
thanks
-- PMM
Quoted 29 lines · Peter Maydell
Quoted 9 lines · Sergey Fedorov
--- target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+)target-arm/helper.c +0
-0target-arm/helper.c static int get_phys_addr_v6(CPUARMState *env, uint32_t address, int access_type, · line 5340
Quoted 8 lines
target-arm/helper.c +2
-0@@ -5333,6 +5333,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. */ This looks OK codewise, but I can't apply it because you've forgotten the signed-off-by line.
Can you also provide a useful commit message, please? Patches should pretty much always have a long-form commit message, except possibly when they're part of a large patch series, and rarely even then. (For instance in this case it's worth mentioning that supporting these extra bits is IMPDEF in v6 and in v7-without-LPAE but required in LPAE.)
Quoted 2 lines
thanks
-- PMM
Thanks, Peter. Your comments are very useful, as always :) Sorry for forgetting sign-off-by. Will resend the patch soon!
Best,
Sergey
Quoted 9 lines · Sergey Fedorov
--- target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+)target-arm/helper.c +0
-0
target-arm/helper.c static int get_phys_addr_v6(CPUARMState *env, uint32_t address, int access_type, · line 5337
Quoted 5 lines
target-arm/helper.c +2
-0@@ -5333,6 +5333,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 );
Outermost parentheses not needed.
Regards,
Peter
Quoted 7 lines
target-arm/helper.c +0
-1*page_size =0x1000000 ; }else {/* Section. */ --1.9.1
Quoted 5 lines · Peter Crosthwaite
Quoted 4 lines · Sergey Fedorov
--- target-arm/helper.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 11 lines
target-arm/helper.c static int get_phys_addr_v6(CPUARMState *env, uint32_t address, int access_type, · line 5337
Quoted 10 lines
target-arm/helper.c +2
-0@@ -5333,6 +5333,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 );Outermost parentheses not needed.
Thanks, Peter. Will fix it v3.
Best,
Sergey
Quoted 11 lines
Regards,
PeterQuoted 7 lines
target-arm/helper.c +0
-1*page_size =0x1000000 ; }else {/* Section. */ --1.9.1