Changeset 315 for trunk/kernel/mm/page.c
- Timestamp:
- Aug 3, 2017, 10:15:18 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/page.c
r296 r315 232 232 } 233 233 234 //////////////////////////////235 void page_copy( page_t * dst,236 page_t * src )237 {238 uint32_t size;239 void * src_base;240 void * dst_base;241 242 assert( (dst->order == src->order) , __FUNCTION__ , "src size != dst size\n" );243 244 size = (1 << dst->order) * CONFIG_PPM_PAGE_SIZE;245 src_base = ppm_page2vaddr( src );246 dst_base = ppm_page2vaddr( dst );247 248 memcpy( dst_base , src_base , size );249 }250 251 234 /////////////////////////////// 252 235 void page_zero( page_t * page ) 253 236 { 254 uint32_t size; 255 void * base; 256 257 size = (1 << page->order) * CONFIG_PPM_PAGE_SIZE; 258 base = ppm_page2vaddr( page ); 259 260 memset( base , 0 , size ); 237 uint32_t size = (1 << page->order) * CONFIG_PPM_PAGE_SIZE; 238 239 xptr_t base_xp = ppm_page2base( XPTR( local_cxy , page ) ); 240 241 memset( GET_PTR( base_xp ) , 0 , size ); 261 242 } 262 243 … … 266 247 printk("*** Page %d : base = %x / flags = %x / order = %d / count = %d\n", 267 248 page->index, 268 ppm_page2vaddr( page),249 GET_PTR( ppm_page2base( XPTR( local_cxy , page ) ) ), 269 250 page->flags, 270 251 page->order,
Note: See TracChangeset
for help on using the changeset viewer.