Changeset 38f6add in mainline for kernel/arch/ia64/src/mm/page.c
- Timestamp:
- 2009-01-04T13:58:11Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 44ff4fb
- Parents:
- 8ce14e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/mm/page.c
r8ce14e3 r38f6add 269 269 } 270 270 271 extern uintptr_t last_frame; 272 273 uintptr_t hw_map(uintptr_t physaddr, size_t size) 274 { 275 if (last_frame + ALIGN_UP(size, PAGE_SIZE) > 276 KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) 277 panic("Unable to map physical memory %p (%d bytes)", physaddr, 278 size) 279 280 uintptr_t virtaddr = PA2KA(last_frame); 281 pfn_t i; 282 for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) { 283 uintptr_t addr = PFN2ADDR(i); 284 page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr, 285 PAGE_NOT_CACHEABLE | PAGE_WRITE); 286 } 287 288 last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE); 289 290 return virtaddr; 271 uintptr_t hw_map(uintptr_t physaddr, size_t size __attribute__ ((unused))) 272 { 273 /* This is a dirty hack. */ 274 return PA2KA(physaddr); 291 275 } 292 276
Note:
See TracChangeset
for help on using the changeset viewer.