- Timestamp:
- 2006-06-02T11:35:05Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d22049
- Parents:
- 49d072e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/fb.c
r49d072e rbf9afa07 360 360 * 361 361 */ 362 static void screen_init( __addressaddr, unsigned int xres, unsigned int yres, unsigned int bpp, unsigned int scan)362 static void screen_init(void *addr, unsigned int xres, unsigned int yres, unsigned int bpp, unsigned int scan) 363 363 { 364 364 switch (bpp) { … … 598 598 int fb_init(void) 599 599 { 600 __addressfb_ph_addr;600 void *fb_ph_addr; 601 601 unsigned int fb_width; 602 602 unsigned int fb_height; 603 603 unsigned int fb_bpp; 604 604 unsigned int fb_scanline; 605 __address fb_addr; 605 void *fb_addr; 606 size_t asz; 606 607 607 608 async_set_client_connection(fb_client_connection); 608 609 609 fb_ph_addr= sysinfo_value("fb.address.physical");610 fb_ph_addr=(void *)sysinfo_value("fb.address.physical"); 610 611 fb_width=sysinfo_value("fb.width"); 611 612 fb_height=sysinfo_value("fb.height"); … … 613 614 fb_scanline=sysinfo_value("fb.scanline"); 614 615 615 fb_addr=ALIGN_UP(((__address)set_maxheapsize(USER_ADDRESS_SPACE_SIZE_ARCH>>1)),PAGE_SIZE); 616 asz = fb_scanline*fb_height; 617 fb_addr = as_get_mappable_page(asz); 616 618 617 map_physmem((void *)((__address)fb_ph_addr),(void *)fb_addr, 618 (fb_scanline*fb_height+PAGE_SIZE-1)>>PAGE_WIDTH, 619 map_physmem(fb_ph_addr, fb_addr, ALIGN_UP(asz,PAGE_SIZE) >>PAGE_WIDTH, 619 620 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE); 620 621
Note:
See TracChangeset
for help on using the changeset viewer.