Options 15.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
; Copyright 2000 Pace Micro Technology plc
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;

; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; essential global variables
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                GET   Version
                GBLS  VersionNo
VersionNo       SETS  "$VString ($Date)"

24
MosVer          *       6               ; As returned by OS_Byte 0
25

26 27 28 29
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; now the conditional flags for the version we want
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

30 31 32 33 34 35 36 37 38 39 40 41
                GBLL  AddTubeBashers
AddTubeBashers  SETL  {FALSE}

Tube_Normal     *       1
Tube_Simulator  *       2

                GBLA    TubeType
TubeType        SETA    Tube_Simulator

AssemblingArthur SETL  {TRUE}
; defined in hdr.system to allow conditionals in macros

42 43 44 45 46 47
                GBLL    CanLiveOnROMCard
CanLiveOnROMCard SETL   ROMCardSupport

                GBLL    CacheOff
CacheOff        SETL    {FALSE}

48 49 50
                GBLL    ShowWS
ShowWS          SETL    {TRUE}          ; Make KernelWS be verbose

51 52 53
                GBLL    Module
Module          SETL    {FALSE}

54 55 56
                GBLL    VCOstartfix              ;code in early kernel to fix VCO start problem on A7000 (esp. 7500FE)
VCOstartfix     SETL    {TRUE}

57 58
;whether we support running on the (Risc PC) emulator
                GBLL    EmulatorSupport
59
EmulatorSupport SETL    {FALSE} ; Disabled; QEMU doesn't like it
60 61

                GBLL    DoInitialiseMode
Jeffrey Lee's avatar
Jeffrey Lee committed
62
DoInitialiseMode SETL   {TRUE}
63 64 65 66

                GBLL    SqueezeMods     ; whether squeezed modules are allowed
SqueezeMods     SETL    {TRUE}

67
                GBLL    International   ; whether text and error messages come from  messages file.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
International   SETL    {TRUE}

                GBLL    CacheCommonErrors       ; whether common internationalised errors are cached in sysheap
CacheCommonErrors       SETL    International :LAND: {TRUE}

                GBLL    MouseBufferManager      ; Whether mouse uses buffer manager
MouseBufferManager      SETL    {TRUE}

                GBLL    IrqsInClaimRelease      ; Whether OS_Claim/Release restore IRQ's before releasing heap node
IrqsInClaimRelease      SETL  {TRUE}

                GBLL    AlwaysClearRAM          ; If true, clear RAM on every break/reset
AlwaysClearRAM  SETL    {TRUE}

                GBLL    CacheCMOSRAM            ; Whether to keep a RAM copy of CMOS RAM for faster access
83
CacheCMOSRAM    SETL    {TRUE}
84

85
                GBLL    ProtectStationID        ; Disallow writes to NetStnCMOS (via OS_Byte & OS_NVMemory)
Jeffrey Lee's avatar
Jeffrey Lee committed
86
ProtectStationID        SETL {TRUE}
87

88 89 90 91 92 93
                GBLL    CheckProtectionLink     ; if true, disallow CMOS RAM changes if link in protected position
CheckProtectionLink     SETL {TRUE}             ; NB affects Delete/Copy/R/T and 0-9/.

                GBLL    ValidateCMOS            ; Apply special CMOS-corruption detection code,
ValidateCMOS    SETL    {TRUE}                  ; and do minimal default settings.

Robert Sprowson's avatar
Robert Sprowson committed
94 95 96
                GBLL    ChecksumCMOS            ; Inspect the CMOS checksum byte, and act like a CMOS reset if it's
ChecksumCMOS    SETL    {TRUE}                  ; invalid. Also, calculate CMOS checksum and write it when needed.

97
                GBLL    LCDInvert
Jeffrey Lee's avatar
Jeffrey Lee committed
98
LCDInvert       SETL    {TRUE}
99

100
                GBLL    LCDSupport              ; Whether LCD Support is assembled in or not
Jeffrey Lee's avatar
Jeffrey Lee committed
101
LCDSupport      SETL    {TRUE}
102

103
                GBLL    ModeSelectors           ; whether mode selectors are understood
104
ModeSelectors   SETL    {TRUE}
105 106 107 108 109

                GBLL    IgnoreVRAM              ; if true, don't add VRAM to the RAM list (+ don't use for screen)
IgnoreVRAM      SETL    {FALSE}

                GBLL    LateAborts              ; if true, use late abort mode on ARM600 (compulsory on ARM700)
110
LateAborts      SETL    {TRUE}
111 112 113 114

                GBLL    ShrinkableDAs           ; if true, support Shrinkable Dynamic Areas (eg. CacheFS)
ShrinkableDAs   SETL    {TRUE}

115
                GBLL    DA_Batman               ; Holey dynamic areas Batman!
Robert Sprowson's avatar
Robert Sprowson committed
116
DA_Batman       SETL    {TRUE}                  ; concept of sparsely mapped dynamic areas introduced for Ursula
117 118 119

                GBLL    Interruptible32bitModes ; if true, limited 32-bit mode code support (interrupt handler does not assume
Interruptible32bitModes SETL {TRUE}             ; 26-bit foreground), also allows faster, 32-bit APCS version of FPEmulator
Ben Avison's avatar
Ben Avison committed
120

121
                GBLL   GSWorkspaceInKernelBuffers      ; Move gstrans workspace into the kernel buffers area to fix redirection
122
GSWorkspaceInKernelBuffers SETL   {TRUE}        ; and everything else that suffers from the dodgy use of scratch space.
Ben Avison's avatar
Ben Avison committed
123

124 125
                GBLL    EarlierReentrancyInDAShrink
EarlierReentrancyInDAShrink SETL {TRUE}         ; fix for RAMFS and new FileCore (causes reentrant DA shrink/remove)
126 127 128 129 130 131

                GBLL    OnlyKernelCanAccessHardwareVectors
OnlyKernelCanAccessHardwareVectors SETL {TRUE}  ; if true, only the Kernel is permitted to write to the hardware vectors
                                                ; while in 26-bit mode. If false, the whole ROM can (including BASIC
                                                ; and the Shared C Library - eg any memcpy!)

132
                GBLL   LongCommandLines         ; first introduced for Ursula, merged into HAL kernel
133 134 135 136 137
LongCommandLines SETL   {TRUE}
  [ LongCommandLines
LongCLISize          * 1024                     ; buffer size for long commands
  ]

138
                GBLL    StrongARM
139 140 141
                GBLL    SAcleanflushbroken      ; whether StrongARM single MCR for DC clean+flush broken (is always for SA110)
                GBLL    SASTMhatbroken          ; whether ROM must support SA110's with broken STM^ (revision 3 should fix this)
                GBLL    StrongARM_POST          ; whether to run POST for StrongARM (and possibly ARM8)
142 143

                GBLL    ARM6support
144
                GBLL    XScaleMiniCache         ; is the XScale mini data-cache used (at all)
Kevin Bracey's avatar
Kevin Bracey committed
145
                GBLL    XScaleJTAGDebug
146
                GBLL    ECC                     ; use ECC on XScale. May compromise other ARM compatibility
147 148 149

StrongARM          SETL {TRUE}
SAcleanflushbroken SETL {TRUE}  :LAND: StrongARM
Kevin Bracey's avatar
Kevin Bracey committed
150 151 152
SASTMhatbroken     SETL {TRUE}  :LAND: StrongARM
StrongARM_POST     SETL {TRUE}  :LAND: StrongARM

153
ARM6support        SETL (MEMM_Type = "ARM600")  ; Needs updating for VMSAv6 compatability
Kevin Bracey's avatar
Kevin Bracey committed
154 155 156
XScaleMiniCache    SETL {FALSE}
XScaleJTAGDebug    SETL {TRUE}
ECC                SETL {FALSE}
157 158 159 160 161 162 163

                ;mjs
                ;Chocolate flavours implemented for Ursula, but they are generally useful performance enhancements
                ;(not all Ursula performance improvements are flagged with Chocolate - eg. simple changes such as slicker SWI
                ;despatch and wider SWI hashing)
                ;
                ;any ARM
164
                ;
165 166 167 168 169 170
                GBLL    ChocolateSysHeap        ;whether to save cost of SysHeap block claim/release for common cases (eg. callback blocks)
                                                ;also reduces SysHeap stress by using fewer blocks in total
                GBLL    ChocolateOSMod          ;whether to reduce SysHeap stress in module handling
                GBLL    ChocolateSysVars        ;whether to do performance improvements in system variable handling
                GBLL    ChocolateOscli          ;whether to do performance improvements in Oscli command stuff
                GBLL    ChocolateService        ;whether to implement fast module service call distribution (uses table introduced
171
                                                ;into module format by Ursula API)
172
                GBLL    ChocolateAMB            ;whether to compile support for Lazy task swapping
173
                                                ;possibly enabled at run time for some ARMs only
174 175 176 177 178
ChocolateSysHeap       SETL {TRUE}
ChocolateOSMod         SETL {TRUE}
ChocolateSysVars       SETL {TRUE}
ChocolateOscli         SETL {TRUE}
ChocolateService       SETL {TRUE}
Jeffrey Lee's avatar
Jeffrey Lee committed
179
ChocolateAMB           SETL {TRUE}
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
  [ ChocolateSysHeap
                       GBLA  MaxChocolateCBBlocks  ;max quick CallBack blocks available at any one time (else ordinary heap nodes used)
                       GBLA  MaxChocolateSVBlocks  ;max quick Software Vector blocks available at any one time (else ordinary heap nodes used)
                       GBLA  MaxChocolateTKBlocks  ;max quick Ticker blocks available at any one time (else ordinary heap nodes used)
                       GBLA  MaxChocolateMRBlocks  ;max module ROM blocks before ordinary heap nodes are used (reduces total no. nodes in SysHeap)
                       GBLA  MaxChocolateMABlocks  ;max module Active blocks before ordinary heap nodes are used
                       GBLA  MaxChocolateMSBlocks  ;max module SWI Hash blocks before ordinary heap nodes are used
MaxChocolateCBBlocks   SETA   32
MaxChocolateSVBlocks   SETA  128
MaxChocolateTKBlocks   SETA   32
MaxChocolateMRBlocks   SETA  150
MaxChocolateMABlocks   SETA  150
MaxChocolateMSBlocks   SETA  150
  ]

                          GBLL    Oscli_QuickAliases
                          GBLL    Oscli_HashedCommands
Oscli_QuickAliases        SETL    {TRUE} :LAND: ChocolateOscli   ;try to do a better job of checking for aliases
Oscli_HashedCommands      SETL    {TRUE} :LAND: ChocolateOscli   ;try to do a better job of finding commands

                     GBLL    mjsServiceTrace          ;for statistics gathering on service calls only
mjsServiceTrace      SETL    {FALSE}
                     GBLL    mjsSysHeapNodesTrace     ;for statistics gathering on some SysHeap nodes only
mjsSysHeapNodesTrace SETL    {FALSE}

                GBLL    NoSPSRcorruption              ;set to true if IRQ dispatcher
NoSPSRcorruption SETL   {FALSE}                       ;preserves SPSR_SVC

                GBLL    RMTidyDoesNowt          ; if true, RMTidy does nothing
209
RMTidyDoesNowt  SETL    {TRUE}                  ; should really be "machine has FSLock in ROM"
210 211 212 213 214

                GBLL    RogerEXEY               ; if true, use Roger's new algorithm for XEigFactor, YEigFactor
RogerEXEY       SETL    {FALSE}                 ; Marketing don't like it!

                GBLL    DebugROMInit
215 216 217 218 219 220
                GBLL    DebugHALTX

              [ FreezeDevRel
DebugROMInit    SETL    {FALSE}
DebugHALTX      SETL    {FALSE}
              |
221
DebugROMInit    SETL    (Version :AND: 1) = 1   ; Yes for odd numbered development
222 223
DebugHALTX      SETL    (Version :AND: 1) = 1   ; Yes for odd numbered development
              ]
224 225

                GBLL    DebugROMPostInit ; Displays when the PostInit service call is sent to each ROM module (currently works on vanilla service call handling only)
226
DebugROMPostInit SETL   (:LNOT: ChocolateService) :LAND: {FALSE}
Kevin Bracey's avatar
Kevin Bracey committed
227 228

                GBLL    DebugTerminal           ; default WRCH and RDCH through HAL
229
DebugTerminal   SETL    {FALSE}
Kevin Bracey's avatar
Kevin Bracey committed
230

231 232 233
                GBLL    DebugHeaps              ; initialise claimed and freed blocks
DebugHeaps      SETL    {FALSE}                 ; (may slow things down unacceptably)

234
                GBLL    DebugCDA2       ; ChangeDynamicArea and related options
235
DebugCDA2       SETL    {FALSE}
236

237
              [ DebugHeaps :LOR: DebugROMInit :LOR: DebugROMPostInit :LOR: DebugCDA2
238 239 240
                ! 0, "*** WARNING *** Debugging assembled in"
              ]

241 242 243
                GBLL    StorkPowerSave  ;True => power saving for Stork AND A4
StorkPowerSave  SETL    MorrisSupport   ;False=> older A4 code only

Ben Avison's avatar
Ben Avison committed
244 245 246
                GBLL    FixCallBacks            ; see Docs.CallbackChange
FixCallBacks    SETL    {TRUE}                  ; also addresses some atomicity problems

247
  [ :LNOT: :DEF: HiProcVecs
248
                GBLL    HiProcVecs              ; Relocate processor vectors and first 16K of workspace to &FFFF0000
249 250
HiProcVecs      SETL    "$Machine"="Tungsten" :LOR: :LNOT: NoARMv6
  ]
251

252 253 254 255
                GBLL    DebugForcedReset        ; debug forced hard resets
DebugForcedReset SETL   {FALSE}

                GBLA    FirstUnpluggableModule
256
FirstUnpluggableModule  SETA 8                  ; Podule, FileSwitch, ResourceFS, Messages, MessageTrans,
257 258
                                                ; TerritoryManager, UK. Moot now the keyboard and mouse aren't
                                                ; in the kernel - unplug those and you're stuffed.
259

260 261 262 263 264 265 266 267 268 269 270 271
                GBLL  PMPDebug
PMPDebug        SETL  {FALSE}                   ; Physical memory pool debugging

                GBLL  PMPParanoid
PMPParanoid     SETL  {FALSE}                   ; Validate PMPs after most ops

                GBLL  PMPRAMFS
PMPRAMFS        SETL  {TRUE}                    ; Whether RAMFS DA is a PMP (requires compatible RAMFS module)

 [ PMPRAMFS
PMPRAMFS_Size   * 256                           ; Number of logical pages (physical size is unlimited)
 |
272 273
                GBLA    MaxRAMFS_Size
MaxRAMFS_Size   SETA    128                     ; Max size available for RAM Disc
274
 ]
275

276 277 278 279 280 281 282 283 284 285 286 287
 [ DebugForcedReset
Reset_CannotResetFlag           * 1
Reset_SysHeapCorrupt            * 2
Reset_WrongCamMapAddress        * 3
Reset_WrongNumberOfPages        * 4
Reset_CamMapCorrupt             * 5
Reset_VectorChainCorrupt        * 6
Reset_TickNodesCorrupt          * 7
Reset_DeviceVectorCorrupt       * 8
Reset_PoduleOrCallBackCorrupt   * 9
 ]

288 289 290 291 292
                    GBLL  AssembleKEYV
AssembleKEYV        SETL  {TRUE}          ; Use KEYV.

                    GBLL  AssemblePointerV
AssemblePointerV    SETL  {TRUE}          ; Use PointerV.
293

294 295
                    GBLL  ProcessorVectors
ProcessorVectors    SETL  {TRUE}          ; Processor vectors indirected through 0 page.
296

297
                    GBLL  UseNewFX0Error
Jeffrey Lee's avatar
Jeffrey Lee committed
298
UseNewFX0Error      SETL  ((Version :AND: 1) = 1) ; Whether *FX 0 should show the ROM link date instead of the UtilityModule date
299 300 301 302 303 304 305

                    GBLS  GetMessages
 [ International
GetMessages         SETS  "GET s.MsgCode"
 |
GetMessages         SETS  ""
 ]
306 307 308 309 310 311 312 313 314
                    GBLS  GetUnsqueeze
 [ SqueezeMods
GetUnsqueeze        SETS  "GET s.Unsqueeze"
 |
GetUnsqueeze        SETS  ""
 ]
                    GBLS  GetKernelMEMC
                    GBLS  GetPalette
                    GBLS  GetMemInfo
315
GetKernelMEMC       SETS  "GET s." :CC: MEMM_Type
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345
GetMemInfo          SETS  "GET s.MemInfo"

GetPalette          SETS  "GET s.vdu.vdupalxx"

; control switches for med_00001 (the flood fill routines 1024 line limit).
; Switches have the following effects:
;
; _userma     Will use rma if >48K is free, up to a maximum of 128K. It will
;             try to acheive the latter by growing the rma if possible.
; _twowords   Use two word entries in the queue. This overcomes the limitation
;             of the original packed word format.

                    GBLL  med_00001_userma
                    GBLL  med_00001_twowords
med_00001_userma    SETL  {TRUE}
med_00001_twowords  SETL  {TRUE}

 [ med_00001_userma
smallest_rma_size   * (48*1024)                  ; define the low threshold for rma use
largest_rma_size    * (128*1024)                 ; and the ceiling for rma use
 ]

; Ickle macros. We want to be able to turn IRQs on and off fast in the
; code in various places. To do this easily, have a name for the
; SVC26/32 mode we run in.

USR2632 * USR32_mode
SVC2632 * SVC32_mode

        END