void *callout_memory_map(unsigned size, paddr_t phys, unsigned prot_flags); void *callout_memory_map_indirect(unsigned size, paddr_t *phys, unsigned prot_flags);
Same as mmap_device_memory() in the C library — provide access to a memory-mapped device. The value is for use in any kernel callouts (i.e. they live beyond the end of the startup program and are maintained by the OS while running).
The difference between callout_memory_map() and callout_memory_map_indirect() is the second argument: callout_memory_map() takes a paddr_t, but callout_memory_map_indirect() takes a pointer to a paddr_t. Using the indirect form makes it easier for you to accomodate 32- and 64-bit addresses.