[okl4-developer] qemu crashes if lcdcon1 is set to (0x1) - s3c2410 - gta01
Dennis Gessner
d.gessner at sirrix.com
Tue Aug 19 02:03:57 EST 2008
Hello everyone,
hello Nelson,
is there any reason, why qemu crashes if I set the lcdcon1-register to
0x1 (reading doc - a value of 0x1 means to "enable" the output??)?
I'm using a emulated gta01 inside qemu.
Here is what I did (similar to the "Tutorial: Using A Virtual Device"):
----
static int init_fb(struct ig_fb * fb, struct ig_lcd * lcd) {
struct lcd_control_block *ctrl = lcd->control;
fb->size = ctrl->xres * ctrl->yres / 8;
// size of fb in bytes
fb->ms = memsection_create_dma
(
fb->size,
&fb->vbase,
&fb->pm,
L4_WriteThroughMemory
);
/* If the following is executed - qemu closes... Why??*/
L4_KDB_Enter("Entering virtual_lcd_set_fb");
virtual_lcd_set_fb(lcd->server, lcd->obj, fb->vbase, NULL);
return 0;
}
----
inside "virtual_lcd_set_fb" (nearly at the end of the file
(./iguana/vlcd/src/lcd_server.c) there is a
"fb_set_buffer(lcd->fb, new_paddr);"
The following two functions come from
./drivers/s3c2410_lcd/src/s3c2410_lcd.c
----
static void fb_set_buffer_impl(struct fb_interface *fbi, struct
s3c2410_lcd *device, uintptr_t buff)
{
fb_set_buffer_base(device, buff);
}
----
static void fb_set_buffer_base(struct s3c2410_lcd * device, uint32_t addr)
{
//uint32_t offsize = OFFSET_AFTER_LINE;
// uint32_t pagewidth = X_RES * BITS_PER_PIXEL / BITS_PER_HWORD;
//uint32_t lcdbank = addr >> 22 & ((1 << 9) - 1);
// uint32_t lcdbaseu = (addr & ((1 << 22) - 1)) >> 1;
// uint32_t lcdbasel = lcdbaseu + (pagewidth + offsize) * Y_RES;
/*
* XXX: should read previous bit value and restore that, instead
* assuming it should be set afterwards - nt
*/
lcdcon1_set_envid(0x0); /* clear ENVID */
// lcdsaddr1_set_lcdbank(lcdbank);
// lcdsaddr1_set_lcdbaseu(lcdbaseu);
lcdsaddr1_write(addr>>1);
lcdsaddr2_set_lcdbasel(
(lcdsaddr1_read() & 0x1fffff) + 640*480
);
// lcdsaddr2_set_lcdbasel( (addr+648*480*2)>>1);
// lcdsaddr3_set_offsize(offsize);
lcdsaddr3_set_pagewidth(480);
// After the next line - qemu crashes... Why?
lcdcon1_set_envid(0x1); /* set ENVID */
}
------
I start qemu with the following command:
"arm-softmmu/qemu-system-arm -M gta01 -m 130 -mtdblock flash.image
-kernel image.boot -usb -show-cursor -serial
telnet:localhost:1200,server -std-vga"
My next step will be to try this in real hardware - but I think this
will produce the same crash...
Any help would be very welcome.
Best regards,
Dennis
More information about the Developer
mailing list