Showing changes from revision #3 to #4:
Added | Removed | Changed
void *RISCOS_MapInIO(unsigned int flags, void *phys, unsigned int size)
Entry | |
---|---|
flags | Bits 0-19: B, C, TEX, AP and (for VMSAv6) APX flags for L1 page table section map entry |
Bit 20: Doubly map region | |
Bit 21: AP flags specified (otherwise, default to SVC RW access, User none) | |
Other bits reserved | |
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.
Note that the flags passed in in bits 0-19 of R0 must be in the correct form for use in an L1PT section mapping (1MB page).
A doubly-mapped region should only be requested if the base physical address and size are multiples of 1MB.