From 699a746a43162e83653ff385a1658730b6e16e23 Mon Sep 17 00:00:00 2001 From: Ben Avison Date: Fri, 9 Aug 2019 13:20:14 +0100 Subject: [PATCH] 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. Version 0.81. Tagged as 'HAL_BCM2835-0_81' --- VersionNum | 20 ++++++++++---------- s/Top | 6 ++++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/VersionNum b/VersionNum index aabfff3..e93b99e 100644 --- a/VersionNum +++ b/VersionNum @@ -1,21 +1,21 @@ -/* (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" diff --git a/s/Top b/s/Top index fe37641..eb38e01 100644 --- a/s/Top +++ b/s/Top @@ -37,6 +37,7 @@ GET Hdr:System GET Hdr:Machine. GET Hdr:HALSize. + GET Hdr:MEMM.VMSAv6 GET Hdr:FSNumbers GET Hdr:NewErrors GET Hdr:BCMSupport @@ -708,7 +709,7 @@ HAL_Init BCC %FT05 ; Map in the A7/A53 control logic - MOV a1, #0 + MOV a1, #L1_S LDR a2, =QA7_BASE LDR a3, =QA7_SIZE CallOS OS_MapInIO @@ -717,7 +718,8 @@ HAL_Init LDR a2, =IO_Base_BCM2836 05 ; Map in the main IO region - MOV a1, #0 + MOVCC a1, #0 + MOVCS a1, #L1_S LDR a3, =IO_Size CallOS OS_MapInIO STR a1, PeriBase -- GitLab