Browse Source

support con_com1 output, fix up some bug of dvi display

master
huangzhihuan 14 years ago
parent
commit
44f5329743
  1. 51
      Targets/Bonito3a780e/Bonito/start.S
  2. 6
      Targets/Bonito3a780e/Bonito/vgarom.c
  3. 3
      sys/dev/pci/pciconf.c

51
Targets/Bonito3a780e/Bonito/start.S

@ -451,7 +451,8 @@ li t1, 0x00e0 # {cu3,cu2,cu1,cu0}<={0110, status_fr<=1
bal initserial
nop
bal initserial1
nop
//#define DEBUG_LS3
#ifdef DEBUG_LS3
dli a0, 0xfff
@ -1790,6 +1791,8 @@ ddr_config_entry:
beqz a0, 2f
nop
bal tgt_putchar
nop
bal tgt_putchar1
addiu a1, 1
b 1b
lbu a0, 0(a1)
@ -1883,6 +1886,25 @@ ddr_config_entry:
nop
END(tgt_putchar)
#endif
LEAF(tgt_putchar1)
la v0,GS3_UART1_BASE
1:
lbu v1, NSREG(NS16550_LSR)(v0)
and v1, LSR_TXRDY
# li v1, 1
beqz v1, 1b
nop
sb a0, NSREG(NS16550_DATA)(v0)
move v1, v0
la v0, GS3_UART1_BASE
bne v0, v1, 1b
nop
j ra
nop
END(tgt_putchar1)
LEAF(beep_on)
nop
dli t1,0x90000cfdfe00a080
@ -2008,6 +2030,33 @@ ddr_config_entry:
nop
END(initserial)
#endif
LEAF(initserial1)
li a0, GS3_UART1_BASE
li t1,128
# addiu a2,a0,3
sb t1,3(a0)
li t1,0x12 # divider, highest possible baud rate
sb t1,0(a0)
li t1,0x0 # divider, highest possible baud rate
sb t1,1(a0)
li t1,3
sb t1,3(a0)
#srl t1,t1,0x8
li t1,0
sb t1,1(a0)
#li t1,1 # divider, highest possible baud rate
li t1,71
sb t1,2(a0)
jr ra
nop
END(initserial1)
LEAF(initserial_COM1)
la v0, COM1_BASE_ADDR

6
Targets/Bonito3a780e/Bonito/vgarom.c

@ -1,4 +1,4 @@
char vgarom[]={
unsigned char vgarom[]={
/*00000000:*/0x55,0xaa,0x76,0xe9,0x0d,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*00000010:*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x00,0x00,0x00,0x00,0x49,0x42,
/*00000020:*/0x4d,0xb1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
@ -2830,9 +2830,9 @@ char vgarom[]={
/*0000b0c0:*/0x66,0x00,0x00,0x00,0x04,0x31,0x77,0x00,0x7d,0x00,0x00,0x00,0x10,0x31,0x92,0x00,
/*0000b0d0:*/0x98,0x00,0x00,0x00,0x10,0x32,0xb7,0x00,0xbd,0x00,0x00,0x00,0x01,0x15,0x21,0x00,
/*0000b0e0:*/0x00,0x00,0x01,0x04,0x90,0x00,0x04,0x0c,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,
/*0000b0f0:*/0x00,0x00,0xff,0x01,0x1f,0x21,0x00,0x00,0x00,0x01,0x04,0x91,0x00,0x02,0x04,0x08,
/*0000b0f0:*/0x00,0x00,0xff,0x01,0x1f,0x21,0x00,0x00,0x00,0x01,0x04,0x92,0x00,0x02,0x04,0x08,
/*0000b100:*/0x00,0x04,0x0c,0x01,0x00,0x30,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0xff,0x01,0x1e,
/*0000b110:*/0x21,0x00,0x00,0x00,0x01,0x04,0x92,0x40,0x01,0x04,0x92,0x00,0x02,0x04,0x06,0x00,
/*0000b110:*/0x21,0x00,0x00,0x00,0x01,0x04,0x91,0x40,0x01,0x04,0x92,0x00,0x02,0x04,0x06,0x00,
/*0000b120:*/0x09,0x06,0x00,0x01,0x02,0x00,0x04,0x0c,0x01,0x00,0x10,0x02,0x00,0x00,0x08,0x00,
/*0000b130:*/0x00,0x00,0xff,0x01,0x1e,0x22,0x00,0x00,0x00,0x01,0x04,0x93,0x00,0x01,0x04,0x92,
/*0000b140:*/0x40,0x09,0x06,0x00,0x01,0x02,0x00,0x04,0x0c,0x01,0x00,0x20,0x02,0x00,0x00,0x80,

3
sys/dev/pci/pciconf.c

@ -459,7 +459,8 @@ if(pm_io == NULL) {
#ifdef USE_780E_VGA
if (pm->size > 0x4000000)
{
pm->size = VRAM_SIZE<<20;
pm->size = 0x8000000;
//pm->size = VRAM_SIZE<<20;
printf("pm->size = %08x\n", pm->size);
}
#else

Loading…
Cancel
Save