• Jeffrey Lee's avatar
    Support RAM banks with high physical addresses · df4efb68
    Jeffrey Lee authored
    This changes PhysRamTable to store the address of each RAM bank in terms
    of (4KB) pages instead of bytes, effectively allowing it to support a 44
    bit physical address space. This means that (when the long descriptor
    page table format is used) the OS can now make use of memory located
    outside the lower 4GB of the physical address space. However some
    public APIs still need extending to allow for all operations to be
    supported on high RAM (e.g. OS_Memory logical to physical address
    lookups)
    
    OS_Memory 12 (RecommendPage) has been extended to allow R4-R7 to be used
    to specify a (64bit) physical address range which the recommended pages
    must lie within. For backwards compatibility this defaults to 0-4GB.
    df4efb68
OSRSI6 4.59 KB
; Copyright 2011 Castle Technology Ltd
;
; 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.
;

; OS_ReadSysInfo 6 values

OSRSI6_CamEntriesPointer                       * 0
OSRSI6_MaxCamEntry                             * 1
OSRSI6_PageFlags_Unavailable                   * 2
OSRSI6_PhysRamTable                            * 3
OSRSI6_ARMA_Cleaner_flipflop                   * 4 ; Unused in HAL kernels
OSRSI6_TickNodeChain                           * 5
OSRSI6_ROMModuleChain                          * 6
OSRSI6_DAList                                  * 7
OSRSI6_AppSpaceDANode                          * 8
OSRSI6_Module_List                             * 9
OSRSI6_ModuleSHT_Entries                       * 10
OSRSI6_ModuleSWI_HashTab                       * 11
OSRSI6_IOSystemType                            * 12
OSRSI6_L1PT                                    * 13
OSRSI6_L2PT                                    * 14
OSRSI6_UNDSTK                                  * 15
OSRSI6_SVCSTK                                  * 16
OSRSI6_SysHeapStart                            * 17

; These are used by ROL, but conflict with our allocations

OSRSI6_ROL_KernelMessagesBlock                 * 18
OSRSI6_ROL_ErrorSemaphore                      * 19
OSRSI6_ROL_MOSdictionary                       * 20
OSRSI6_ROL_Timer_0_Latch_Value                 * 21
OSRSI6_ROL_FastTickerV_Counts_Per_Second       * 22
OSRSI6_ROL_VecPtrTab                           * 23
OSRSI6_ROL_NVECTORS                            * 24
OSRSI6_ROL_IRQSTK                              * 25
OSRSI6_ROL_SWIDispatchTable                    * 26 ; JTABLE-SWIRelocation?
OSRSI6_ROL_SWIBranchBack                       * 27 ; DirtyBranch?

; Our allocations which conflict with the above

OSRSI6_Danger_SWIDispatchTable                 * 18 ; JTABLE-SWIRelocation (Relocated base of OS SWI dispatch table)
OSRSI6_Danger_Devices                          * 19 ; Relocated base of IRQ device head nodes
OSRSI6_Danger_DevicesEnd                       * 20 ; Relocated end of IRQ device head nodes
OSRSI6_Danger_IRQSTK                           * 21
OSRSI6_Danger_SoundWorkSpace                   * 22 ; workspace (8K) and buffers (2*4K)
OSRSI6_Danger_IRQsema                          * 23

; Safe versions of the danger allocations
; Only supported by OS 5.17+, so if backwards compatability is required code
; should (safely!) fall back on the danger versions

OSRSI6_SWIDispatchTable                        * 64 ; JTABLE-SWIRelocation (Relocated base of OS SWI dispatch table)
OSRSI6_Devices                                 * 65 ; Relocated base of IRQ device head nodes
OSRSI6_DevicesEnd                              * 66 ; Relocated end of IRQ device head nodes
OSRSI6_IRQSTK                                  * 67
OSRSI6_SoundWorkSpace                          * 68 ; workspace (8K) and buffers (2*4K)
OSRSI6_IRQsema                                 * 69

; New ROOL allocations

OSRSI6_DomainId                                * 70 ; current Wimp task handle
OSRSI6_OSByteVars                              * 71 ; OS_Byte vars (previously available via OS_Byte &A6/VarStart)
OSRSI6_FgEcfOraEor                             * 72
OSRSI6_BgEcfOraEor                             * 73
OSRSI6_DebuggerSpace                           * 74
OSRSI6_DebuggerSpace_Size                      * 75
OSRSI6_CannotReset                             * 76
OSRSI6_MetroGnome                              * 77 ; OS_ReadMonotonicTime
OSRSI6_CLibCounter                             * 78
OSRSI6_RISCOSLibWord                           * 79
OSRSI6_CLibWord                                * 80
OSRSI6_FPEAnchor                               * 81
OSRSI6_ESC_Status                              * 82
OSRSI6_ECFYOffset                              * 83
OSRSI6_ECFShift                                * 84
OSRSI6_VecPtrTab                               * 85
OSRSI6_NVECTORS                                * 86
OSRSI6_CAMFormat                               * 87 ; 0 = 8 bytes per entry, 1 = 16 bytes per entry
OSRSI6_ABTSTK                                  * 88
OSRSI6_PhysRamtableFormat                      * 89 ; 0 = addresses are in byte units, 1 = addresses are in 4KB units

        END