void *RISCOS_MapInIO(unsigned int flags, void *phys, unsigned int size)
| Entry | |
|---|---|
| flags | Bit 2: Make memory bufferable |
| Other bits: Ambiguous! | |
| phys | Physical address to map in |
| size | Number of bytes of memory to map in |
| Exit | |
|---|---|
| - | Virtual address corresponding to phys |
| 0 for failure |
This routine is used to map in IO memory for the HAL’s usage. Normally it would only be called during the execution of HAL_Init. Once mapped in the IO space cannot be released.
It returns the resultant virtual address corresponding to phys, or 0 for failure. Failure can only occur if no RAM is available for page tables, or if the virtual address space is exhausted.