Entry into RISC OS:

POST check (if any) complete

CPU & memory systems at full speed
MMU off, SVC32 mode, IRQs+FIQs disabled
All interrupts masked
I/O timings set up
DRAM refresh running
Video system stabilised (off?)


Information passed:
Table of (addr,len) pairs of RAM
Address + amount of VRAM
Memory speed?
CPU speed?
Entry point to HAL






Questions:

How to clear RAM without logical copy? Do we NEED a logical copy?
Yes we do - but logical copy will NOT be contiguous.

Physical  Size      Logical  - offset
F0000000  01000000  80000000   70000000
F1000000  01000000  81000000   70000000
60000000  00001000  82000000   22000000 - fast SRAM - how to signal?

02000000  00200000  80000000   7FE00000
10000000  01700000  80200000   70200000
11B00000  02500000  81900000   6FE00000
14000000  04000000  83E00000   6FE00000

02000000  00200000  82000000   80000000
10000000  01700000  90000000   80000000
11B00000  02500000  91B00000   80000000
14000000  04000000  94000000   80000000




Memory Map


00000000 16K        Kernel workspace
00004000 16K        Scratch space
00008000 Mem-32K    Application memory
0xxxxxxx 3840M-Mem  Dynamic areas
F0000000 160M       I/O space (growing downwards if necessary)
FA000000 1M         HAL workspace
FA100000 8K         IRQ stack
FA200000 32K        SVC stack
FA300000 8K         ABT stack
FA400000 8K         UND stack
FAE00000 1M         Reserved for physical memory accesses
FAF00000 256k       reserved for DCache cleaner address space (eg. StrongARM)
FAF40000 64k        kernel buffers (for long command lines, size defined by KbuffsMaxSize)
FAFE8000 32K        HAL workspace
FAFF0000 32K        "Cursor/System/Sound" block (probably becoming just "System")
FAFF8000 32K        "Nowhere"
FB000000 4M         L2PT
FB400000 16K        L1PT
FB404000 4M-16K     System heap
FB800000 8M         Soft CAM
FC000000 64M        ROM


26-bit system:

00000000 16K        Kernel workspace
00004000 16K        Scratch space
00008000 28M-32K    Application memory
01C00000 32K        SVC stack
01C08000 2M-32K     System heap
01F00000 32K        Cursor/System/Sound
01F08000 32K        "Nowhere"
02100000 15M        Module area
03000000 8M         I/O space
03800000 8M         ROM
04000000 2G-64M     Dynamic areas
80000000 512M       Logical copy of physical space
A0000000 1280M      Dynamic areas
F0000000 224M       I/O space (growing downwards if necessary)
FE000000 1M         HAL workspace
FE100000 8K         ABT stack
FE200000 8K         UND stack
FF000000 4M         L2PT + embedded L1PT
FF800000 8M         Soft CAM


"Soft" resets

Entry through HAL - full HAL initialisation.
HAL must not destroy (much) memory.
RISC OS detects intact memory and makes the reset "soft".
RAM page tables reconstructed from CAM.
Other page tables reconstructed through HAL.


"Break"

RISC OS calls HAL to shut down, then shuts off MMU, and calls HAL_Reset code.
HAL then re-enters RISC OS in the usual fashion.
