Commit 66f82e9c authored by Ben Avison's avatar Ben Avison

Set shareability bit in page tables for IO region on Pi 2 onwards

RISCOS_MapInIO does relatively little processing on the L1PT flags that the
HAL passes to it. However, when modules come along later and try to locate
IO again, using OS_Memory 13, access permissions are specified using a
variation on dynamic area flags. The kernel translates from these to L1PT
flags, and one of the rules it applies is that the shareability bit is set
if on a multiprocessor system. On Pi 2 and later, this means it doesn't find
a match amongst the sections that were mapped in by the HAL, and in practice
this means BCMVideo ends up causing 16MB of IO space to be mapped in twice.

Fix this by passing the L1_S flag to RISCOS_MapInIO on Pi 2 and later. This
effectively frees up an additional 16MB of logical address space for dynamic
areas.
parent 34d04d6b
...@@ -4,18 +4,18 @@ ...@@ -4,18 +4,18 @@
* *
*/ */
#define Module_MajorVersion_CMHG 0.80 #define Module_MajorVersion_CMHG 0.80
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG FixShareability.1
#define Module_Date_CMHG 03 Aug 2019 #define Module_Date_CMHG 09 Aug 2019
#define Module_MajorVersion "0.80" #define Module_MajorVersion "0.80"
#define Module_Version 80 #define Module_Version 80
#define Module_MinorVersion "" #define Module_MinorVersion "FixShareability.1"
#define Module_Date "03 Aug 2019" #define Module_Date "09 Aug 2019"
#define Module_ApplicationDate "03-Aug-19" #define Module_ApplicationDate "09-Aug-19"
#define Module_ComponentName "HAL_BCM2835" #define Module_ComponentName "HAL_BCM2835"
#define Module_FullVersion "0.80" #define Module_FullVersion "0.80 (FixShareability.1)"
#define Module_HelpVersion "0.80 (03 Aug 2019)" #define Module_HelpVersion "0.80 (09 Aug 2019) FixShareability.1"
#define Module_LibraryVersionInfo "0:80" #define Module_LibraryVersionInfo "0:80"
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
GET Hdr:System GET Hdr:System
GET Hdr:Machine.<Machine> GET Hdr:Machine.<Machine>
GET Hdr:HALSize.<HALSize> GET Hdr:HALSize.<HALSize>
GET Hdr:MEMM.VMSAv6
GET Hdr:FSNumbers GET Hdr:FSNumbers
GET Hdr:NewErrors GET Hdr:NewErrors
GET Hdr:BCMSupport GET Hdr:BCMSupport
...@@ -708,7 +709,7 @@ HAL_Init ...@@ -708,7 +709,7 @@ HAL_Init
BCC %FT05 BCC %FT05
; Map in the A7/A53 control logic ; Map in the A7/A53 control logic
MOV a1, #0 MOV a1, #L1_S
LDR a2, =QA7_BASE LDR a2, =QA7_BASE
LDR a3, =QA7_SIZE LDR a3, =QA7_SIZE
CallOS OS_MapInIO CallOS OS_MapInIO
...@@ -717,7 +718,8 @@ HAL_Init ...@@ -717,7 +718,8 @@ HAL_Init
LDR a2, =IO_Base_BCM2836 LDR a2, =IO_Base_BCM2836
05 05
; Map in the main IO region ; Map in the main IO region
MOV a1, #0 MOVCC a1, #0
MOVCS a1, #L1_S
LDR a3, =IO_Size LDR a3, =IO_Size
CallOS OS_MapInIO CallOS OS_MapInIO
STR a1, PeriBase STR a1, PeriBase
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment