Changeset 59e4864 in mainline for kernel/arch/ia64/src/mm/page.c
- Timestamp:
- 2008-11-11T08:00:42Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3c4a26
- Parents:
- a2a5529
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/mm/page.c
ra2a5529 r59e4864 48 48 #include <arch/barrier.h> 49 49 #include <memstr.h> 50 #include <align.h> 50 51 51 52 static void set_environment(void); … … 263 264 } 264 265 266 extern uintptr_t last_frame; 267 268 269 uintptr_t hw_map(uintptr_t physaddr, size_t size) 270 { 271 if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) 272 panic("Unable to map physical memory %p (%d bytes)", physaddr, size) 273 274 uintptr_t virtaddr = PA2KA(last_frame); 275 pfn_t i; 276 for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) { 277 uintptr_t addr = PFN2ADDR(i); 278 page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr, PAGE_NOT_CACHEABLE | PAGE_WRITE); 279 } 280 281 last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE); 282 283 return virtaddr; 284 } 285 286 287 265 288 /** @} 266 289 */
Note:
See TracChangeset
for help on using the changeset viewer.