Changeset 404be7c in mainline
- Timestamp:
- 2011-12-10T00:04:59Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d8f1545
- Parents:
- 7c3e482
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/page.c
r7c3e482 r404be7c 65 65 #include <arch/mm/asid.h> 66 66 #include <mm/as.h> 67 #include <mm/km.h> 67 68 #include <mm/frame.h> 68 69 #include <arch/barrier.h> … … 179 180 uintptr_t hw_map(uintptr_t physaddr, size_t size) 180 181 { 181 uintptr_t virtaddr = (uintptr_t) NULL; // FIXME 182 uintptr_t virtaddr; 183 size_t asize; 182 184 pfn_t i; 183 185 186 asize = ALIGN_UP(size, PAGE_SIZE); 187 virtaddr = km_page_alloc(asize, PAGE_SIZE); 188 184 189 page_table_lock(AS_KERNEL, true); 185 for (i = 0; i < ADDR2PFN( ALIGN_UP(size, PAGE_SIZE)); i++) {190 for (i = 0; i < ADDR2PFN(asize); i++) { 186 191 uintptr_t addr = PFN2ADDR(i); 187 192 page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr,
Note:
See TracChangeset
for help on using the changeset viewer.