Commit 6ee2f464 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Remove OS_Memory 10 and associated code

Detail:
  s/MemInfo - Remove OS_Memory 10 (free pool locking). Locking the free pool has never been a very nice thing to do, so now that there's no logical mapping of the free pool it seems like it's a good time to outlaw the behaviour altogether.
  s/ChangeDyn - No free pool locking means one less thing to check when claiming the OS_ChangeDynamicArea mutex.
  hdr/KernelWS - VRAMRescue_control workspace variable is no longer needed
Admin:
  Tested on Pandaboard


Version 5.35, 4.79.2.285. Tagged as 'Kernel-5_35-4_79_2_285'
parent 54872d8c
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.284"
Module_Date SETS "31 Aug 2015"
Module_ApplicationDate SETS "31-Aug-15"
Module_MinorVersion SETS "4.79.2.285"
Module_Date SETS "01 Sep 2015"
Module_ApplicationDate SETS "01-Sep-15"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.284)"
Module_HelpVersion SETS "5.35 (31 Aug 2015) 4.79.2.284"
Module_FullVersion SETS "5.35 (4.79.2.285)"
Module_HelpVersion SETS "5.35 (01 Sep 2015) 4.79.2.285"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.284
#define Module_Date_CMHG 31 Aug 2015
#define Module_MinorVersion_CMHG 4.79.2.285
#define Module_Date_CMHG 01 Sep 2015
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.284"
#define Module_Date "31 Aug 2015"
#define Module_MinorVersion "4.79.2.285"
#define Module_Date "01 Sep 2015"
#define Module_ApplicationDate "31-Aug-15"
#define Module_ApplicationDate "01-Sep-15"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.284)"
#define Module_HelpVersion "5.35 (31 Aug 2015) 4.79.2.284"
#define Module_FullVersion "5.35 (4.79.2.285)"
#define Module_HelpVersion "5.35 (01 Sep 2015) 4.79.2.285"
#define Module_LibraryVersionInfo "5:35"
......@@ -1125,16 +1125,6 @@ SyncCodeA_sema # 1 ; re-entrancy semaphore for SynchroniseCodeAreas
! 0, "SyncCodeA_sema (byte) at ":CC::STR:(SyncCodeA_sema)
]
]
; [ this was used on Phoebe as described below, now only used for Wimp free pool lock ]
; word controlling rescue of VRAM that is not used by screen (and sorting into bottom of free pool) - VRAM is slower than SDRAM for Phoebe.
; word organised as 3 fields - control field (byte) is not written by interrupt routine, so can be safely manipulated by foreground with IRQs enabled
VRAMRescue_control # 1 ; control bits manipulated by foreground, read by interrupt driven rescuer
; Bit fields of VRAMRescue_control (VRRc_...) defined as follows:
;
VRRc_disable * &01 ; control bit 0 slow page rescue from Free Pool disabled completely, if set (disabled for no VRAM)
VRRc_suspend * &02 ; control bit 1 slow page rescue suspended by outside agent, if set
VRRc_wimp_lock * &04 ; control bit 2 slow page rescue suspended because Wimp_ClaimFreeMemory has claimed free pool, if set
; control bits 3..7 reserved (should be 0)
AlignSpace 4
Oscli_CmdHashSum # 4 ;for hashed command lookup
......
......@@ -4693,8 +4693,6 @@ ClaimCDASemaphore
TEQ lr, #0
LDREQ lr, [r10, #CDASemaphore] ; now also check whether ChangeDynamicArea is already threaded
TEQEQ lr, #0
LDREQB lr, [r10, #VRAMRescue_control] ; also check that wimp has not locked Free Pool
TSTEQ lr, #VRRc_wimp_lock
STREQ pc, [r10, #CDASemaphore] ; store non-zero value in CDASemaphore, to indicate we're threaded
EXIT
......
......@@ -60,7 +60,7 @@ MemReturn
B MemoryReadPhys ; 7
B MemoryAmounts ; 8
B MemoryIOSpace ; 9
B MemoryFreePoolLock ; 10
B %BT20 ; Reason code 10 reserved (for free pool locking)
B %BT20 ; Reason code 11 reserved (for PCImapping).
B RecommendPage ; 12
B MapIOpermanent ; 13
......@@ -868,51 +868,7 @@ easi_space_table
] ; HAL
;----------------------------------------------------------------------------------------
; MemoryFreePoolLock
;
;
; In: r0 bits 0..7 = 10 (reason code 10)
; r0 bit 8 = 1 if call is by Wimp (reserved for Acorn use), 0 otherwise
; r0 bits 9..31 reserved (must be 0)
; r1 = 0 to resume any background actions that may manipulate FreePool mapping
; (currently, this is just VRAMRescue)
; = 1 to suspend any background actions that may manipulate FreePool mapping
; all other values reserved (undefined behaviour)
;
; Out: r1 = previous state (1=suspended, 0=not suspended)
;
; A suspend call from the Wimp will be taken to mean that the whole FreePool is locked, and
; memory cannot be moved (supports Wimp_ClaimFreeMemory)
;
; VRAM rescue doesn't happen in this Kernel, but we still support the call for the Wimp.
;
MemoryFreePoolLock ROUT
Push "r2,r3,lr"
LDR r3,=ZeroPage
LDRB lr,[r3,#VRAMRescue_control]
TEQ r1,#0
BNE %FT10
;flush TLB(s) for resume - needed for Wimp resume, precaution for other - no cache flush
;since Free Pool is uncached
[ HAL
Push "r0"
ARMop TLB_InvalidateAll,,,r3
Pull "r0"
|
ARM_flush_TLB r2
]
10
TST r0,#&100 ;is it Wimp?
MOVEQ r2,#VRRc_suspend
MOVNE r2,#VRRc_wimp_lock
TEQ r1,#0
AND r1,lr,r2 ;previous state
BICEQ lr,lr,r2
ORRNE lr,lr,r2
STRB lr,[r3,#VRAMRescue_control] ;set/clear relevant bit
TEQ r1,#0
MOVNE r1,#1
Pull "r2,r3,pc"
; MemoryFreePoolLock - removed now that free pool is a PMP
;----------------------------------------------------------------------------------------
;PCImapping - reserved for Acorn use (PCI manager)
......
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