Browse Source

import fb support from lm.

git-svn-id: file:///svn/pmon-all/pmon-all@7 214b0138-1524-0410-9122-e5cb4b5bc56c
master
root 18 years ago
parent
commit
102f4c99f4
  1. 13
      Targets/Bonito2emcpu/Bonito/mycmd.c
  2. 17
      Targets/Bonito2enc/Bonito/tgt_machdep.c
  3. 5
      Targets/Bonito2enc/conf/Bonito
  4. 4
      conf/files
  5. 16710
      fb/bmp_logo.h
  6. 13
      fb/cfb_console.c
  7. 47
      pmon/dev/vgacon.c

13
Targets/Bonito2emcpu/Bonito/mycmd.c

@ -189,6 +189,7 @@ return 0;
*/
#include "serial.c"
#define SHAREBASEADDRESS 0x98000000c0000000ULL
#define COMBASEADDRESS 0x98000000c0100000ULL
static void serial_init()
{
@ -541,8 +542,20 @@ if(maincpu)
serial_init();
tgt_poll_register(1, serial_poll, 0);
#endif
#if 0
highmemset(CMDBASEADDRESS,0,32*12);
mycacheflush(CMDBASEADDRESS,32*12,1);
#else
if(maincpu)
{
highmemset(SHAREBASEADDRESS,0,0x200000);
mycacheflush(SHAREBASEADDRESS,0x200000,1);
}
else
{
mycacheflush(SHAREBASEADDRESS,0x200000,0);
}
#endif
}
/*if(getenv("cmdpoll"))*/ tgt_poll_register(1, mycmd_poll, 0);
}

17
Targets/Bonito2enc/Bonito/tgt_machdep.c

@ -68,6 +68,7 @@
#include "mod_vgacon.h"
#include "mod_framebuffer.h"
extern int vga_bios_init(void);
extern int radeon_init(void);
extern int kbd_initialize(void);
extern int write_at_cursor(char val);
extern const char *kbd_error_msgs[];
@ -83,9 +84,7 @@ extern const char *kbd_error_msgs[];
#endif
#if NMOD_X86EMU_INT10 == 0
int vga_available=0;
#else
#if NMOD_X86EMU_INT10 != 0
#include "vgarom.c"
#endif
@ -95,6 +94,7 @@ extern void *memset(void *, int, size_t);
int kbd_available = 0;
int usb_kbd_available;
int vga_available = 0;
static int md_pipefreq = 0;
static int md_cpufreq = 0;
@ -247,6 +247,7 @@ asm("
*/
extern void vt82c686_init(void);
extern int fb_init(unsigned long,unsigned long);
void
tgt_devconfig()
{
@ -261,6 +262,12 @@ if(maincpu) _pci_devinit(1); /* PCI device initialization */
#if NMOD_X86EMU_INT10 > 0
SBD_DISPLAY("VGAI", 0);
if(maincpu) rc = vga_bios_init();
#endif
#if (NMOD_X86EMU_INT10 == 0 && defined(RADEON7000))
SBD_DISPLAY("VGAI", 0);
rc = radeon_init();
#endif
#if NMOD_FRAMEBUFFER > 0
if (rc > 0) {
@ -280,10 +287,10 @@ if(maincpu) rc = vga_bios_init();
printf("vga bios init failed, rc=%d\n",rc);
}
#endif
if (rc > 0)
if(!getenv("novga")) vga_available=1;
if(getenv("vga")) vga_available=1;
#endif
config_init();
if(maincpu) configure();
#if NMOD_VGACON >0

5
Targets/Bonito2enc/conf/Bonito

@ -49,8 +49,8 @@ select mod_uart_ns16550 # Standard UART driver
#option CONS_BAUD=B9600
option CONS_BAUD=B115200
select ext2
select mod_x86emu_int10
#select mod_framebuffer
#select mod_x86emu_int10
select mod_framebuffer
#select mod_x86emu # X86 emulation for VGA
#vga monitor
select mod_vgacon
@ -67,6 +67,7 @@ option NOSNOOP # Caches are no-snooping
#
option USB_OHCI_NO_ROM
option RADEON7000
#option VGA_NOTEBOOK # use for notebook vga init
#option X86_LIKE_SPACE # make pci addr == cpu addr
#option NEW_PCI_WINDOW # use 128/32/32 pci windows
#option VGA_BASE=0xba000000

4
conf/files

@ -266,9 +266,7 @@ file x86emu/src/biosemu/linuxpci.c mod_x86emu needs-flag
file x86emu/src/biosemu/biosemu.c mod_x86emu needs-flag
file x86emu/src/biosemu/freebiosvga.c mod_x86emu needs-flag
file fb/fb_draw.c mod_framebuffer needs-flag
file fb/fb_main.c mod_framebuffer needs-flag
file fb/fb_text_16.c mod_framebuffer needs-flag
file fb/cfb_console.c mod_framebuffer needs-flag
file pmon/dev/kbd.c mod_vgacon needs-flag
file pmon/dev/vgacon.c mod_vgacon needs-flag

16710
fb/bmp_logo.h

File diff suppressed because it is too large

13
fb/cfb_console.c

@ -98,8 +98,8 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the hardware cursor capability of the
#ifdef RADEON7000
//#define VIDEO_FB_LITTLE_ENDIAN
#define CONFIG_VIDEO_SW_CURSOR
//#define CONFIG_VIDEO_LOGO
//#define CONFIG_VIDEO_BMP_LOGO
#define CONFIG_VIDEO_LOGO
#define CONFIG_VIDEO_BMP_LOGO
//#define DEBUG_CFG_CONSOLE
#define VIDEO_HW_BITBLT
#endif
@ -1082,9 +1082,9 @@ static void *video_logo (void)
}
#endif /* CONFIG_SPLASH_SCREEN */
logo_plot (video_fb_address, VIDEO_COLS, 0, 0);
logo_plot (video_fb_address, VIDEO_COLS, ((VIDEO_COLS - VIDEO_LOGO_WIDTH)/2)* VIDEO_PIXEL_SIZE, (VIDEO_ROWS - VIDEO_LOGO_HEIGHT)/2);
video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, (unsigned char *)info);
//video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, (unsigned char *)info);
#ifdef CONFIG_CONSOLE_EXTRA_INFO
{
@ -1112,9 +1112,12 @@ int fb_init (unsigned long fbbase,unsigned long iobase)
unsigned char color8;
pGD = &GD;
#ifdef VGA_NOTEBOOK
#if defined(VGA_NOTEBOOK_V1)
pGD->winSizeX = 1280;
pGD->winSizeY = 800;
#elif defined(VGA_NOTEBOOK_V2)
pGD->winSizeX = 1024;
pGD->winSizeY = 768;
#else
pGD->winSizeX = 640;
pGD->winSizeY = 480;

47
pmon/dev/vgacon.c

@ -12,6 +12,9 @@
#define crt_data 0x3d5
extern int vga_available;
extern unsigned char kbd_code;
#if NMOD_USB_KBD != 0
extern unsigned char usb_kbd_code;
#endif
extern unsigned char usb_kbd_code;
#ifdef BONITOEL
unsigned char * vgabh=(unsigned char *)0xb00b8000;
@ -165,7 +168,7 @@ vgaterm (int op, struct DevEntry *dev, unsigned long param, int data)
case OP_RXRDY:
if (
#if NMOD_USB_KBD
#if NMOD_USB_KBD != 0
(usb_kbd_available && usb_kbd_code) ||
#endif
(kbd_available && kbd_code) ) {
@ -175,7 +178,7 @@ vgaterm (int op, struct DevEntry *dev, unsigned long param, int data)
}
case OP_RX:
#if NMOD_USB_KBD
#if NMOD_USB_KBD != 0
if(usb_kbd_available && usb_kbd_code){
code = usb_kbd_code;
usb_kbd_code = 0;
@ -216,24 +219,36 @@ fbterm (int op, struct DevEntry *dev, unsigned long param, int data)
case OP_TX:
//*(unsigned char*)0xbfd003f8 = data&0xff;
if(vga_available)
fb_putchar(data&0xff);
video_putc(data&0xff);
//fb_putchar(data&0xff);
break;
case OP_RXRDY:
if(kbd_available)
return kbd_code?1:0;
else
return 0;
if (
#if NMOD_USB_KBD != 0
(usb_kbd_available && usb_kbd_code) ||
#endif
(kbd_available && kbd_code) ) {
return 1;
}else {
return 0;
}
case OP_RX:
if(kbd_available){
code = kbd_code;
kbd_code = 0;
return code;
}else{
return 0;
}
#if NMOD_USB_KBD != 0
if(usb_kbd_available && usb_kbd_code){
code = usb_kbd_code;
usb_kbd_code = 0;
return code;
}
#endif
if(kbd_available && kbd_code){
code = kbd_code;
kbd_code = 0;
return code;
}else{
return 0;
}
case OP_RXSTOP:
break;
}

Loading…
Cancel
Save