Changeset 06b0211b in mainline for kernel/generic/src/mm/backend_elf.c
- Timestamp:
- 2013-04-29T11:29:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa2b32c
- Parents:
- ba4799a (diff), df956b9b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/backend_elf.c
rba4799a r06b0211b 235 235 * 236 236 * @param area Pointer to the address space area. 237 * @param addr Faulting virtual address.237 * @param upage Faulting virtual page. 238 238 * @param access Access mode that caused the fault (i.e. 239 239 * read/write/exec). … … 242 242 * on success (i.e. serviced). 243 243 */ 244 int elf_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access)244 int elf_page_fault(as_area_t *area, uintptr_t upage, pf_access_t access) 245 245 { 246 246 elf_header_t *elf = area->backend_data.elf; … … 250 250 uintptr_t frame; 251 251 uintptr_t kpage; 252 uintptr_t upage;253 252 uintptr_t start_anon; 254 253 size_t i; … … 257 256 ASSERT(page_table_locked(AS)); 258 257 ASSERT(mutex_locked(&area->lock)); 258 ASSERT(IS_ALIGNED(upage, PAGE_SIZE)); 259 259 260 260 if (!as_area_check_access(area, access)) 261 261 return AS_PF_FAULT; 262 262 263 if ( addr< ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE))263 if (upage < ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) 264 264 return AS_PF_FAULT; 265 265 266 if ( addr>= entry->p_vaddr + entry->p_memsz)266 if (upage >= entry->p_vaddr + entry->p_memsz) 267 267 return AS_PF_FAULT; 268 268 269 i = ( addr- ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) >> PAGE_WIDTH;269 i = (upage - ALIGN_DOWN(entry->p_vaddr, PAGE_SIZE)) >> PAGE_WIDTH; 270 270 base = (uintptr_t) 271 271 (((void *) elf) + ALIGN_DOWN(entry->p_offset, PAGE_SIZE)); 272 273 /* Virtual address of faulting page */274 upage = ALIGN_DOWN(addr, PAGE_SIZE);275 272 276 273 /* Virtual address of the end of initialized part of segment */
Note:
See TracChangeset
for help on using the changeset viewer.