Changes in kernel/generic/src/mm/km.c [b0c2075:c387838] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/km.c
rb0c2075 rc387838 239 239 uintptr_t km_temporary_page_get(uintptr_t *framep, frame_flags_t flags) 240 240 { 241 uintptr_t frame; 242 uintptr_t page; 243 241 244 ASSERT(THREAD); 242 245 ASSERT(framep); 243 246 ASSERT(!(flags & ~(FRAME_NO_RESERVE | FRAME_ATOMIC))); 244 247 245 248 /* 246 249 * Allocate a frame, preferably from high memory. 247 250 */ 248 uintptr_t page; 249 uintptr_t frame = 250 frame_alloc(1, FRAME_HIGHMEM | FRAME_ATOMIC | flags, 0); 251 frame = (uintptr_t) frame_alloc(ONE_FRAME, 252 FRAME_HIGHMEM | FRAME_ATOMIC | flags); 251 253 if (frame) { 252 254 page = km_map(frame, PAGE_SIZE, 253 255 PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE); 254 255 // FIXME 256 ASSERT(page); 256 ASSERT(page); // FIXME 257 257 } else { 258 frame = frame_alloc(1, FRAME_LOWMEM | flags, 0); 258 frame = (uintptr_t) frame_alloc(ONE_FRAME, 259 FRAME_LOWMEM | flags); 259 260 if (!frame) 260 261 return (uintptr_t) NULL; 261 262 262 page = PA2KA(frame); 263 263 } 264 264 265 265 *framep = frame; 266 return page; 266 return page; 267 267 } 268 268
Note:
See TracChangeset
for help on using the changeset viewer.