1 /* tag: openbios qt user interface
3 * Copyright (C) 2003-2004 Stefan Reinauer
5 * See the file "COPYING" for further information about
6 * the copyright and warranty status of this work.
13 #include "unix/plugins.h"
14 #include "unix/plugin_pci.h"
20 volatile unsigned char * fb=0;
21 volatile int gui_running=0;
28 void *gui_thread(void *ptr)
30 threaddata *td=(threaddata *)ptr;
32 QApplication a(td->argc, td->argv);
38 fb=w.getFrameBuffer();
48 extern int plugin_qt_init(void);
49 int plugin_qt_init(void)
52 char *args[]={ "plugin_qt" };
53 threaddata mytd = { 1, args };
56 printf("Initializing \"framebuffer\" plugin...");
58 pthread_create(&mythread, NULL, gui_thread, &mytd);
64 /* now we have the framebuffer start address.
65 * updating pci config space to reflect this
68 *(u32 *)(pci_config_space+0x14)=(u32)((unsigned long)fb>>32);
70 *(u32 *)(pci_config_space+0x14)=0;
72 *(u32 *)(pci_config_space+0x10)=(u32)((unsigned long)fb&0xffffffff);
74 /* next is to write the rom address. We write that at a random
75 * address in pci config space for now.
78 *(u32 *)(pci_config_space+0x34)=(u32)((unsigned long)qt_fcode>>32);
80 *(u32 *)(pci_config_space+0x34)=0;
82 *(u32 *)(pci_config_space+0x30)=(u32)((unsigned long)qt_fcode&0xffffffff);
84 /* FIXME: we need to put the fcode image for this
85 * device to the rom resource, once it exists
88 /* register pci device to be available to beginagain */
89 pci_register_device(0, 2, 0, pci_config_space);