Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1312 → Rev 1313

/kernel/trunk/genarch/include/fb/fb.h
32,6 → 32,7
#include <typedefs.h>
#include <arch/types.h>
 
extern spinlock_t fb_lock;
void fb_init(__address addr, unsigned int x, unsigned int y, unsigned int bpp, unsigned int scan);
 
#endif
/kernel/trunk/generic/src/synch/spinlock.c
40,6 → 40,10
#include <debug.h>
#include <symtab.h>
 
#ifdef CONFIG_FB
#include <genarch/fb/fb.h>
#endif
 
#ifdef CONFIG_SMP
 
/** Initialize spinlock
73,7 → 77,31
 
preemption_disable();
while (test_and_set(&sl->val)) {
if (i++ > 300000 && sl!=&printflock) {
 
/*
* We need to be careful about printflock and fb_lock.
* Both of them are used to report deadlocks via
* printf() and fb_putchar().
*
* We trust our code that there is no possible deadlock
* caused by these two locks (except when an exception
* is triggered for instance by printf() or fb_putchar()).
* However, we encountered false positives caused by very
* slow VESA framebuffer interaction (especially when
* run in a simulator) that caused problems with both
* printflock and fb_lock.
*
* Possible deadlocks on both printflock and fb_lock
* are therefore not reported as they would cause an
* infinite recursion.
*/
if (sl == &printflock)
continue;
#ifdef CONFIG_FB
if (sl == &fb_lock)
continue;
#endif
if (i++ > 300000) {
printf("cpu%d: looping on spinlock %.*p:%s, caller=%.*p",
CPU->id, sizeof(__address) * 2, sl, sl->name, sizeof(__address) * 2, CALLER);
symbol = get_symtab_entry(CALLER);
/kernel/trunk/arch/ia32/src/drivers/vesa.c
74,7 → 74,8
vram_lin_addr = PA2KA(PFN2ADDR(frame_alloc(vesa_frame_order(), FRAME_KA)));
/* Map videoram */
for (a = 0; a < ((vesa_scanline * vesa_height + PAGE_SIZE - 1) >> PAGE_WIDTH); a++)
page_mapping_insert(AS_KERNEL, vram_lin_addr+a*4096, vesa_ph_addr+a*4096, PAGE_NOT_CACHEABLE);
page_mapping_insert(AS_KERNEL, vram_lin_addr + a*PAGE_SIZE, vesa_ph_addr + a*FRAME_SIZE,
PAGE_NOT_CACHEABLE);
 
fb_init(vram_lin_addr, vesa_width, vesa_height, vesa_bpp, vesa_scanline);
}