Commit 88376e28 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix PMP corruption caused by early errors generated by OS_DynamicArea 21

Detail:
  s/ChangeDyn - When DynArea_PMP_PhysOp generates an error during the initial page list scan, make sure r12 is initialised to the (new) PMP size, as expected by PMPMemoryMoved.
  s/AMBControl/allocate, s/AMBControl/growshrink - Document some extra exit conditions for the AMB allocate & grow/shrink routines
Admin:
  Tested on BB-xM
  Fixes RAM disc PMP becoming corrupt when attempting to grow it (e.g. via *ChangeDynamicArea) by an amount larger than the amount of free memory in the system


Version 5.35, 4.79.2.324. Tagged as 'Kernel-5_35-4_79_2_324'
parent 02664d59
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.323"
Module_Date SETS "22 May 2016"
Module_ApplicationDate SETS "22-May-16"
Module_MinorVersion SETS "4.79.2.324"
Module_Date SETS "23 May 2016"
Module_ApplicationDate SETS "23-May-16"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.323)"
Module_HelpVersion SETS "5.35 (22 May 2016) 4.79.2.323"
Module_FullVersion SETS "5.35 (4.79.2.324)"
Module_HelpVersion SETS "5.35 (23 May 2016) 4.79.2.324"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.323
#define Module_Date_CMHG 22 May 2016
#define Module_MinorVersion_CMHG 4.79.2.324
#define Module_Date_CMHG 23 May 2016
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.323"
#define Module_Date "22 May 2016"
#define Module_MinorVersion "4.79.2.324"
#define Module_Date "23 May 2016"
#define Module_ApplicationDate "22-May-16"
#define Module_ApplicationDate "23-May-16"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.323)"
#define Module_HelpVersion "5.35 (22 May 2016) 4.79.2.323"
#define Module_FullVersion "5.35 (4.79.2.324)"
#define Module_HelpVersion "5.35 (23 May 2016) 4.79.2.324"
#define Module_LibraryVersionInfo "5:35"
......@@ -22,7 +22,7 @@
;
; exit:
; R1 = no. of pages actually allocated
; R2 = handle for allocation
; R2 = handle for allocation, 0 if pages were requested but none could be claimed
allocate
Push "R0,R3,R4,LR"
......
......@@ -25,6 +25,7 @@
;
; exit:
; R1 = new number of pages actually achieved
; R2 = 0 if AMB handle freed (else preserved)
; R3 = old number of pages
growshrink
......
......@@ -2860,6 +2860,7 @@ DynArea_PMP_PhysOp ROUT
FRAMLDR r3
ADD r2, r2, #12
SUB r3, r3, #1
LDR r12, [r10, #DANode_PMPSize]
93
[ PMPDebug
DebugTX "-> bad physop page number"
......@@ -2873,6 +2874,7 @@ DynArea_PMP_PhysOp ROUT
FRAMLDR r3
ADD r2, r2, #12
SUB r3, r3, #1
LDR r12, [r10, #DANode_PMPSize]
95
[ PMPDebug
DebugTX "-> physop can't move"
......
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