Showing changes from revision #3 to #4:
Added | Removed | Changed
void *RISCOS_AddRAM(unsigned int flags, void *start, void *end, uintptr_t sigbits, void *ref)
Entry | |
---|---|
flags | Bit 0: video memory (only first contiguous range will be used) |
Bit 1: video memory is not suitable for general use | |
Bit 7: memory can’t be used for DMA | |
Bits 8-11: speed indicator (arbitrary, higher => faster) | |
Other bits reserved (SBZ) | |
start | Start address of RAM (inclusive) (no alignment requirements) |
end | End address of RAM (exclusive) (no alignment requirements, but must be >= start) |
sigbits | Significant address bit mask (1 => this bit of addr decoded, 0 => this bit ignored) |
ref | reference handle (NULL for first call) |
SVC32 mode | |
MMU and data caches off | |
IRQs and FIQs disabled |
Exit | |
---|---|
- | Returns ref for next call |
This entry point must be the first call from is used to describe describe to the OS the area(s) of HAL RAM that are present in the system. It should only be called during the early stage of system initialisation, prior toRISCRISCOS_Start , OS and following should a hardware reset. It may be called as many times as necessary to enumerate allRAM that is available for general purpose use. It should only be called to declare video memory if the video memory may be used as normal RAM when in small video modes.
To The permit OS software will resets: attempt to coalesce adjacent blocks if they share the same attributes – however this only works well ifRAM banks are added in ascending address order.
RISC OS will use RAM at the start of the first block as initial workspace, to store the list of RAM blocks. Max usage is 16 bytes per block + 32 (currently 8 per block + 4). This limits the number of discontiguous blocks – the first block must be large enough to store the full list.
The At first least block one of the blocks must be at least 256K in size and at least 16K aligned. Block coalescing only works well ifRAM banks are added in ascending address order.
RISC OS will use RAM at the start of the first block as initial workspace. Max usage is 16 bytes per block + 32 (currently 8 per block + 4). This limits the number of discontiguous blocks (although RISC OS will concatanate contiguous blocks where possible).
Note that Wimp task switching will not work correctly if blocks are smaller than 512K in size, due to limits in the Kernel’s memory management code (see AMBPhysBinShift & AMBPhysBinMask in Kernel.s.AMBControl.Options)
This call must not be made after RISCOS_Start.