Changeset 666773c in mainline for kernel/arch/ia64/src/mm/page.c
- Timestamp:
- 2008-12-31T15:33:29Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9805cde
- Parents:
- d8c0dc5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/mm/page.c
rd8c0dc5 r666773c 124 124 * Interrupts must be disabled. 125 125 * 126 * @param page 127 * @param asid 128 * 129 * @return 126 * @param page Address of virtual page including VRN bits. 127 * @param asid Address space identifier. 128 * 129 * @return VHPT entry address. 130 130 */ 131 131 vhpt_entry_t *vhpt_hash(uintptr_t page, asid_t asid) … … 168 168 * Interrupts must be disabled. 169 169 * 170 * @param page Address of virtual page including VRN bits. 171 * @param asid Address space identifier. 172 * 173 * @return True if page and asid match the page and asid of t, false otherwise. 170 * @param page Address of virtual page including VRN bits. 171 * @param asid Address space identifier. 172 * 173 * @return True if page and asid match the page and asid of t, 174 * false otherwise. 174 175 */ 175 176 bool vhpt_compare(uintptr_t page, asid_t asid, vhpt_entry_t *v) … … 212 213 * 213 214 * @param v VHPT entry to be set up. 214 * @param page Virtual address of the page mapped by the entry. 215 * @param asid Address space identifier of the address space to which page belongs. 216 * @param frame Physical address of the frame to wich page is mapped. 217 * @param flags Different flags for the mapping. 218 */ 219 void vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, int flags) 215 * @param page Virtual address of the page mapped by the entry. 216 * @param asid Address space identifier of the address space to which 217 * page belongs. 218 * @param frame Physical address of the frame to wich page is mapped. 219 * @param flags Different flags for the mapping. 220 */ 221 void 222 vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, 223 int flags) 220 224 { 221 225 region_register rr_save, rr; … … 251 255 252 256 v->present.p = true; 253 v->present.ma = (flags & PAGE_CACHEABLE) ? MA_WRITEBACK : MA_UNCACHEABLE; 257 v->present.ma = (flags & PAGE_CACHEABLE) ? 258 MA_WRITEBACK : MA_UNCACHEABLE; 254 259 v->present.a = false; /* not accessed */ 255 260 v->present.d = false; /* not dirty */ … … 266 271 extern uintptr_t last_frame; 267 272 268 269 273 uintptr_t hw_map(uintptr_t physaddr, size_t size) 270 274 { 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) 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) 273 279 274 280 uintptr_t virtaddr = PA2KA(last_frame); … … 276 282 for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) { 277 283 uintptr_t addr = PFN2ADDR(i); 278 page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr, PAGE_NOT_CACHEABLE | PAGE_WRITE); 284 page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr, 285 PAGE_NOT_CACHEABLE | PAGE_WRITE); 279 286 } 280 287 … … 284 291 } 285 292 286 287 288 293 /** @} 289 294 */
Note:
See TracChangeset
for help on using the changeset viewer.