Changeset c1982e45 in mainline for arch/ia32/src/mm
- Timestamp:
- 2006-05-20T21:11:08Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 125e944
- Parents:
- 1068f6a
- File:
- 
      - 1 edited
 
 - 
          
  arch/ia32/src/mm/page.c (modified) (3 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      arch/ia32/src/mm/page.cr1068f6a rc1982e45 34 34 #include <mm/as.h> 35 35 #include <arch/types.h> 36 #include <align.h> 36 37 #include <config.h> 37 38 #include <func.h> … … 42 43 #include <print.h> 43 44 #include <interrupt.h> 45 44 46 45 47 void page_arch_init(void) … … 70 72 paging_on(); 71 73 } 74 75 76 __address hw_map(__address physaddr, size_t size) 77 { 78 if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) 79 panic("Unable to map physical memory %p (%d bytes)", physaddr, size) 80 81 __address virtaddr = PA2KA(last_frame); 82 pfn_t i; 83 for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) 84 page_mapping_insert(AS_KERNEL, virtaddr + PFN2ADDR(i), physaddr + PFN2ADDR(i), PAGE_NOT_CACHEABLE); 85 86 last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE); 87 88 return virtaddr; 89 } 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  
