Commit 699a746a authored by Ben Avison's avatar Ben Avison Committed by ROOL

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

Version 0.81. Tagged as 'HAL_BCM2835-0_81'
parent 34d04d6b
/* (0.80)
/* (0.81)
* This file is automatically maintained by srccommit, do not edit manually.
#define Module_MajorVersion_CMHG 0.80
#define Module_MajorVersion_CMHG 0.81
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 03 Aug 2019
#define Module_Date_CMHG 10 Aug 2019
#define Module_MajorVersion "0.80"
#define Module_Version 80
#define Module_MajorVersion "0.81"
#define Module_Version 81
#define Module_MinorVersion ""
#define Module_Date "03 Aug 2019"
#define Module_Date "10 Aug 2019"
#define Module_ApplicationDate "03-Aug-19"
#define Module_ApplicationDate "10-Aug-19"
#define Module_ComponentName "HAL_BCM2835"
#define Module_FullVersion "0.80"
#define Module_HelpVersion "0.80 (03 Aug 2019)"
#define Module_LibraryVersionInfo "0:80"
#define Module_FullVersion "0.81"
#define Module_HelpVersion "0.81 (10 Aug 2019)"
#define Module_LibraryVersionInfo "0:81"
......@@ -37,6 +37,7 @@
GET Hdr:System
GET Hdr:Machine.<Machine>
GET Hdr:HALSize.<HALSize>
GET Hdr:FSNumbers
GET Hdr:NewErrors
GET Hdr:BCMSupport
......@@ -708,7 +709,7 @@ HAL_Init
; Map in the A7/A53 control logic
MOV a1, #0
MOV a1, #L1_S
......@@ -717,7 +718,8 @@ HAL_Init
LDR a2, =IO_Base_BCM2836
; Map in the main IO region
MOV a1, #0
MOVCC a1, #0
MOVCS a1, #L1_S
LDR a3, =IO_Size
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