Rev 1376 | Rev 1473 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1376 | Rev 1382 | ||
|---|---|---|---|
| Line 30... | Line 30... | ||
| 30 | #include <genarch/fb/fb.h> |
30 | #include <genarch/fb/fb.h> |
| 31 | #include <console/chardev.h> |
31 | #include <console/chardev.h> |
| 32 | #include <console/console.h> |
32 | #include <console/console.h> |
| 33 | #include <sysinfo/sysinfo.h> |
33 | #include <sysinfo/sysinfo.h> |
| 34 | #include <mm/slab.h> |
34 | #include <mm/slab.h> |
| 35 | #include <bitops.h> |
- | |
| 36 | #include <align.h> |
35 | #include <align.h> |
| 37 | #include <panic.h> |
36 | #include <panic.h> |
| 38 | #include <memstr.h> |
37 | #include <memstr.h> |
| 39 | #include <config.h> |
38 | #include <config.h> |
| 40 | 39 | ||
| Line 347... | Line 346... | ||
| 347 | default: |
346 | default: |
| 348 | panic("Unsupported bpp"); |
347 | panic("Unsupported bpp"); |
| 349 | } |
348 | } |
| 350 | 349 | ||
| 351 | unsigned int fbsize = scan * y; |
350 | unsigned int fbsize = scan * y; |
| 352 | unsigned int fborder; |
- | |
| 353 | - | ||
| 354 | if (fbsize <= FRAME_SIZE) |
- | |
| 355 | fborder = 0; |
- | |
| 356 | else |
- | |
| 357 | fborder = (fnzb32(fbsize - 1) + 1) - FRAME_WIDTH; |
- | |
| 358 | 351 | ||
| 359 | /* Map the framebuffer */ |
352 | /* Map the framebuffer */ |
| 360 | fbaddress = (__u8 *) PA2KA(PFN2ADDR(frame_alloc(fborder, FRAME_KA))); |
- | |
| 361 | - | ||
| 362 | fb_map_arch((__address) fbaddress, (__address) addr, fbsize); |
353 | fbaddress = (__u8 *) hw_map((__address) addr, fbsize); |
| 363 | 354 | ||
| 364 | xres = x; |
355 | xres = x; |
| 365 | yres = y; |
356 | yres = y; |
| 366 | bitspp = bpp; |
357 | bitspp = bpp; |
| 367 | scanline = scan; |
358 | scanline = scan; |