/branches/tracing/kernel/genarch/include/fb/visuals.h |
---|
44,7 → 44,6 |
#define VISUAL_RGB_0_8_8_8 5 |
#define VISUAL_BGR_0_8_8_8 6 |
#define VISUAL_SB1500_PALETTE 7 |
#endif |
/branches/tracing/kernel/genarch/src/fb/fb.c |
---|
191,26 → 191,6 |
BLUE(rgb, 3); |
} |
static void sb1500rgb_byte8(void *dst, int rgb) |
{ |
if (RED(rgb, 1) && GREEN(rgb, 1) && BLUE(rgb, 1)) |
*((uint8_t *) dst) = 255; |
else if (RED(rgb, 1) && GREEN(rgb, 1)) |
*((uint8_t *) dst) = 150; |
else if (GREEN(rgb, 1) && BLUE(rgb, 1)) |
*((uint8_t *) dst) = 47; |
else if (RED(rgb, 1) && BLUE(rgb, 1)) |
*((uint8_t *) dst) = 48; |
else if (RED(rgb, 1)) |
*((uint8_t *) dst) = 32; |
else if (GREEN(rgb, 1)) |
*((uint8_t *) dst) = 47; |
else if (BLUE(rgb, 1)) |
*((uint8_t *) dst) = 2; |
else |
*((uint8_t *) dst) = 1; |
} |
/** Return pixel color - 8-bit depth (color palette/3:2:3) |
* |
* See the comment for rgb_byte(). |
466,11 → 446,6 |
scr2rgb = byte8_rgb; |
pixelbytes = 1; |
break; |
case VISUAL_SB1500_PALETTE: |
rgb2scr = sb1500rgb_byte8; |
scr2rgb = byte8_rgb; |
pixelbytes = 1; |
break; |
case VISUAL_RGB_5_5_5: |
rgb2scr = rgb_byte555; |
scr2rgb = byte555_rgb; |
505,10 → 480,11 |
panic("Unsupported visual.\n"); |
} |
unsigned int fbsize = props->scan * props->y + props->offset; |
unsigned int fbsize = props->scan * props->y; |
/* Map the framebuffer */ |
fbaddress = (uint8_t *) hw_map((uintptr_t) props->addr, fbsize); |
fbaddress = (uint8_t *) hw_map((uintptr_t) props->addr + props->offset, |
fbsize); |
fbaddress += props->offset; |
xres = props->x; |
531,6 → 507,7 |
sysinfo_set_item_val("fb.scanline", NULL, props->scan); |
sysinfo_set_item_val("fb.visual", NULL, props->visual); |
sysinfo_set_item_val("fb.address.physical", NULL, props->addr); |
sysinfo_set_item_val("fb.offset", NULL, props->offset); |
sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors); |
/* Allocate double buffer */ |
/branches/tracing/kernel/generic/include/udebug/udebug.h |
---|
215,9 → 215,9 |
/** What type of event are we stopped in or 0 if none. */ |
udebug_event_t cur_event; |
bool go; /**< thread is GO */ |
bool stoppable; /**< thread is stoppable */ |
bool debug_active; /**< thread is in a debugging session */ |
bool go; /**< thread is GO */ |
bool stoppable; /**< thread is stoppable */ |
bool active; /**< thread is in a debugging session */ |
} udebug_thread_t; |
struct task; |
/branches/tracing/kernel/generic/src/time/clock.c |
---|
191,15 → 191,18 |
spinlock_unlock(&THREAD->lock); |
if (!ticks && !PREEMPTION_DISABLED) { |
#ifdef CONFIG_UDEBUG |
istate_t *istate; |
#endif |
scheduler(); |
#ifdef CONFIG_UDEBUG |
/* |
* Give udebug chance to stop the thread |
* before it begins executing. |
* before it begins executing userspace code. |
*/ |
if (istate_from_uspace(THREAD->udebug.uspace_state)) |
istate = THREAD->udebug.uspace_state; |
if (istate && istate_from_uspace(istate)) |
udebug_before_thread_runs(); |
#endif |
} |
/branches/tracing/kernel/generic/src/udebug/udebug.c |
---|
72,7 → 72,7 |
ut->uspace_state = NULL; |
ut->go = false; |
ut->stoppable = true; |
ut->debug_active = false; |
ut->active = false; |
ut->cur_event = 0; /* none */ |
} |
112,7 → 112,7 |
bool res; |
mutex_lock(&THREAD->udebug.lock); |
res = THREAD->udebug.debug_active; |
res = THREAD->udebug.active; |
mutex_unlock(&THREAD->udebug.lock); |
return res; |
170,7 → 170,7 |
* Active debugging session |
*/ |
if (THREAD->udebug.debug_active == true && |
if (THREAD->udebug.active == true && |
THREAD->udebug.go == false) { |
/* |
* Thread was requested to stop - answer go call |
210,8 → 210,7 |
mutex_lock(&TASK->udebug.lock); |
mutex_lock(&THREAD->udebug.lock); |
if (THREAD->udebug.debug_active && |
THREAD->udebug.go == false) { |
if (THREAD->udebug.active && THREAD->udebug.go == false) { |
TASK->udebug.begin_call = NULL; |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
264,8 → 263,7 |
mutex_lock(&THREAD->udebug.lock); |
/* Must only generate events when in debugging session and is go. */ |
if (THREAD->udebug.debug_active != true || |
THREAD->udebug.go == false || |
if (THREAD->udebug.active != true || THREAD->udebug.go == false || |
(TASK->udebug.evmask & UDEBUG_EVMASK(etype)) == 0) { |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
334,9 → 332,9 |
LOG("- check state\n"); |
/* Must only generate events when in debugging session */ |
if (THREAD->udebug.debug_active != true) { |
LOG("- debug_active: %s, udebug.go: %s\n", |
THREAD->udebug.debug_active ? "yes(+)" : "no(-)", |
if (THREAD->udebug.active != true) { |
LOG("- udebug.active: %s, udebug.go: %s\n", |
THREAD->udebug.active ? "yes(+)" : "no(-)", |
THREAD->udebug.go ? "yes(-)" : "no(+)"); |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
384,9 → 382,9 |
LOG("- check state\n"); |
/* Must only generate events when in debugging session. */ |
if (THREAD->udebug.debug_active != true) { |
/* printf("- debug_active: %s, udebug.go: %s\n", |
THREAD->udebug.debug_active ? "yes(+)" : "no(-)", |
if (THREAD->udebug.active != true) { |
/* printf("- udebug.active: %s, udebug.go: %s\n", |
THREAD->udebug.active ? "yes(+)" : "no(-)", |
THREAD->udebug.go ? "yes(-)" : "no(+)");*/ |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
401,7 → 399,7 |
IPC_SET_ARG1(call->data, UDEBUG_EVENT_THREAD_E); |
/* Prevent any further debug activity in thread. */ |
THREAD->udebug.debug_active = false; |
THREAD->udebug.active = false; |
THREAD->udebug.cur_event = 0; /* none */ |
THREAD->udebug.go = false; /* set to initial value */ |
424,8 → 422,7 |
mutex_lock(&THREAD->udebug.lock); |
/* Must only generate events when in debugging session and have go. */ |
if (THREAD->udebug.debug_active != true || |
THREAD->udebug.go == false) { |
if (THREAD->udebug.active != true || THREAD->udebug.go == false) { |
mutex_unlock(&THREAD->udebug.lock); |
mutex_unlock(&TASK->udebug.lock); |
return; |
516,13 → 513,13 |
/* Only process userspace threads. */ |
if ((flags & THREAD_FLAG_USPACE) != 0) { |
/* Prevent any further debug activity in thread. */ |
t->udebug.debug_active = false; |
t->udebug.active = false; |
t->udebug.cur_event = 0; /* none */ |
/* Is the thread still go? */ |
if (t->udebug.go == true) { |
/* |
* Yes, so clear go. As debug_active == false, |
* Yes, so clear go. As active == false, |
* this doesn't affect anything. |
*/ |
t->udebug.go = false; |
/branches/tracing/kernel/generic/src/udebug/udebug_ops.c |
---|
58,7 → 58,7 |
* Specifically, verifies that thread t exists, is a userspace thread, |
* and belongs to the current task (TASK). Verifies, that the thread |
* is (or is not) go according to being_go (typically false). |
* It also locks t->udebug.lock, making sure that t->udebug.debug_active |
* It also locks t->udebug.lock, making sure that t->udebug.active |
* is true - that the thread is in a valid debugging session. |
* |
* With this verified and the t->udebug.lock mutex held, it is ensured |
108,7 → 108,7 |
} |
/* Verify debugging state. */ |
if (t->udebug.debug_active != true) { |
if (t->udebug.active != true) { |
/* Not in debugging session or undesired GO state */ |
spinlock_unlock(&t->lock); |
interrupts_restore(ipl); |
117,8 → 117,8 |
} |
/* |
* Since the thread has debug_active == true, TASK->udebug.lock |
* is enough to ensure its existence and that debug_active remains |
* Since the thread has active == true, TASK->udebug.lock |
* is enough to ensure its existence and that active remains |
* true. |
*/ |
spinlock_unlock(&t->lock); |
204,7 → 204,7 |
reply = 0; /* no reply */ |
} |
/* Set udebug.debug_active on all of the task's userspace threads. */ |
/* Set udebug.active on all of the task's userspace threads. */ |
for (cur = TASK->th_head.next; cur != &TASK->th_head; cur = cur->next) { |
t = list_get_instance(cur, thread_t, th_link); |
211,7 → 211,7 |
mutex_lock(&t->udebug.lock); |
if ((t->flags & THREAD_FLAG_USPACE) != 0) |
t->udebug.debug_active = true; |
t->udebug.active = true; |
mutex_unlock(&t->udebug.lock); |
} |
/branches/tracing/kernel/arch/sparc64/src/drivers/scr.c |
---|
78,6 → 78,7 |
} |
uintptr_t fb_addr; |
unsigned int fb_offset = 0; |
uint32_t fb_width = 0; |
uint32_t fb_height = 0; |
uint32_t fb_depth = 0; |
167,10 → 168,12 |
return; |
} |
fb_offset = 4 * 0x2000; |
switch (fb_depth) { |
case 8: |
fb_scanline = fb_linebytes * (fb_depth >> 3); |
visual = VISUAL_SB1500_PALETTE; |
visual = VISUAL_INDIRECT_8; |
break; |
case 16: |
fb_scanline = fb_linebytes * (fb_depth >> 3); |
225,7 → 228,7 |
fb_properties_t props = { |
.addr = fb_addr, |
.offset = 0, |
.offset = fb_offset, |
.x = fb_width, |
.y = fb_height, |
.scan = fb_scanline, |