Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
How to connect VGA to PCI-E?
2014 年 09 月 15 日
09:35:22
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

Hi,
I'm trying to connect a VGA card to my 86Duino Zero. From the schematics I can see it supports both PCI-E target and host modes configurable via jumpers so it should work. First I checked the R26 on CPU board - it was not soldered so it should run in host mode. Then I checked the R27 on Zero board (that was tricky because it's hidden under the battery and I don't have a PDF with PCB top & bottom component placing) that was not soldered so I put a jumper here to pass PCIRST# signal to VGA.
Then I made a simple adaptor that connects:
PE0_RX+ PE0_RX- from edge connector to B16-HSIP0 B17-HSIN0 of VGA slot - should be PCI-E lane 0 output on VGA side
PE0_TX+ PE0_TX- from edge connector to B14-HSOP0 B15-HSON0 of VGA slot - should be PCI-E lane 0 input on VGA side
PE0_CLK+ PE0_CLK- from edge connector to A13-REFCLK+ A14-REFCLK+ of VGA slot - should be PCI-E clock input on VGA side - does the CPU swith to clock output in host mode?
HOSTRST from edge connector to A11-PERST of VGA slot - should be input on VGA side (I measured 3,3V there in normal mode and 0V when holding reset)
GNDs to GNDs
all signal connections are shot as posiible, about 3cm of twisted pairs
Further on VGA slot I connected 12V and 3,3V to ATX power supply. I also use 12V from ATX to power Vin of Zero board
I double checked all and power on. VGA fan spinned up, 86Duino LEDs lights on but I didn't get signal out from VGA. What can be wrong? Do I need some modification to BIOS or should it work with stock FW?

2014 年 09 月 17 日
17:16:11
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

Damn, this night I damaged the COM1 Tx line before I could try to make a PCI listing to see if VGA is detected on PCI-E :(

Warning to all users - the UART on pin header is not protected any way so if you accidentally make ESD to it or connect some external voltage it will go directly to CPU pin and shoot it.
It seems that CPU is still working so I'll have to route out probably COM4 from CPU module connectror B61,62. I will add some serial resistors and zener diodes to protect this lines. Then I need reprogram crossbar to enable COM4.
I reccomend to insert at least one serial resistor (say 1k) to Tx line that will much increase a chance of COM survival when an accident will happen...

2014 年 09 月 17 日
22:06:34
Android_Lin
Moderator
Forum Posts: 228
Member Since:
2014 年 04 月 01 日
Offline

Hello,

To hack VGA card on 86Duino Zero, you need to check three things:
1. SOM-128EX is PCI-E host mode.
2. see PCI-E layout on the page. 2 of 86Duino One schematic for reference.
3. VGA chip has VBIOS inside.

2014 年 09 月 17 日
22:07:01
Android_Lin
Moderator
Forum Posts: 228
Member Since:
2014 年 04 月 01 日
Offline

Glaux said
It seems that CPU is still working so I'll have to route out probably COM4 from CPU module connectror B61,62. I will add some serial resistors and zener diodes to protect this lines. Then I need reprogram crossbar to enable COM4.

If want to use COM4 instead of COM1, recommend to use I2C pins (SCL/SDA on 86Duino Zero and B57/B58 on CPU module) to output COM4 signal by reprograming crossbar.
For crossbar, I/O address default is 0x0A00, you need to set 0x0A10 to 0x07(COM4 TX) and 0x0A11 to 0x08(COM4 RX), and then set 0x0A24 and 0x0A25 both to 0 (dont exist two same number in the crossbar)
Finally, set 0x0A38 to 0 (set COM4 Tx to tri-stat). Thus, you will get COM4 signal on I2C pins.

2014 年 09 月 18 日
05:34:48
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

>1. SOM-128EX is PCI-E host mode.

Yes I had checked R26 and R27. R26 is not soldered - this means host mode, am I right? R27 only connect pcie reset, I soldered it

>2. see PCI-E layout on the page. 2 of 86Duino One schematic for reference.

Yes I got this idea too. I compared the circuit and I cannot see mistake, PCIE wiring is simple...

>. VGA chip has VBIOS inside.

Yes, it's standard low-end desktop nvidia GT230, it doesn't have aux power connector so I feed it from ATX PSU via PCIE connector with connected 12V and 3.3V

Today Itried to look on PCIE signals of 86duiono alone (VGA disconnected) with scope. I could recognize nice differential signal on PE0_TX+ PE0_TX- , PE0_RX+ PE0_RX- was idle and PE0_CLK+ PE0_CLK- contains some undefined low amplitude mess, I'm not sure if scope with 350MHz badwidth can display it, what is the frequency of this signal?

To UART problem - I checked it with scope and there remained only very low level signal in range of tens mV mixed with noise so it's definitely dead. I don't need use specific COM4, I can stay with COM1 if it could be remapped somewhere else. I added extra 3 pin header for new uart with protection circuit and I would like to connect it to some unused pins of CPU board (to not disable other functions). So good candidates for me would be A63+A64, B63+B64, B61+B62. From 86duino One schematics I can see that all this mentioned pins are used as UARTs.
I also tried your example in plain C program compiled by DJGPP:

#include

int main()
{
//CBBA = 0x0A00,
outportb(0x0A10, 0x07); // COM4 TX
outportb(0x0A11, 0x08); // COM4 RX
outportb(0x0A24, 0x00);
outportb(0x0A25, 0x00); // dont exist two same number in the crossbar
outportb(0x0A38, 0x00); // set COM4 Tx to tri-stat
return(0);
}

But it didn't work. I measured 2,5V on SCL and 0V on SDA and no data was there...

BTW what is normal power consumption od 86duino zero? It seems to me quite hot even after I underclocked to 200MHz. I measured 0,4A from 5V input with booted DOS from SD card and 0,31A from 5V when SD removed. It's about 2W and the metal sheet on CPU is not pleasure to touch, I would say ~50C by my calibrated finger :) (I will make some exact measure after solving uart issue...)

2014 年 09 月 18 日
09:47:43
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

Well, I managed to enable COM2 with slightly modifioed sample code for COM1:

#include "irq.h"
void setup() {
io_outpb(0x0A9E, 0x08); // CrossBar-Bit Group Selection Port1[6], switch from GPIO8 pin6 to COM2 TX
io_outpb(0x0A9F, 0x08); // CrossBar-Bit Group Selection Port1[7], switch from GPIO8 pin7 to COM2 RX
usb_Close(USBDEV);
irq_Close();
io_Close();
exit(0);
}

void loop() {}

But I wonder why it doesn't work when I compile it as stand-alone DJGPP program without 86duino libs:

unsigned cbba=0x0A00; // CrossBar Base Address
int main()
{
outportb(cbba+0x9E, 0x08); // CrossBar-Bit Group Selection Port1[6], switch from GPIO8 pin6 to COM2 TX
outportb(cbba+0x9F, 0x08); // CrossBar-Bit Group Selection Port1[7], switch from GPIO8 pin7 to COM2 RX
return(0);
}

Does the sketch code some unlocking of crossbar registers?

2014 年 09 月 18 日
09:51:54
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

I also have a progress with VGA, I made a PCI scan and yepi-yee VGA device is there!

PCI device #14 found at bus: 1, dev: 0, func: 0
Vendor ID: 10DEh (nVidia)
Device ID: 0603h, Revision ID: 162, Class: 03h (display adapter)
Sub-Class: 00h (VGA controller)
IRQ: 15, INTA, ROM base: F3000000h, Cache line: 64B, Latency: 0
BAR: F2000000h, E000000Ch, 00000000h, F0000004h, 00000000h, 00001001h
Device cfg: FBtoB,SERRE,WaitC,PaErr,VGAPS,MemWr,SpecC,BusMa,MemSE,IOSEn
0 0 0 0 0 0 0 0 1 1

So I think that the adapter I made is working. But my monitor still display no signal :( Why? How can I check if videobios was executed? Isn't it disabled in 86duino zero?
I tried another older VGA but same result...

PCI device #14 found at bus: 1, dev: 0, func: 0
Vendor ID: 10DEh (nVidia)
Device ID: 0421h, Revision ID: 161, Class: 03h (display adapter)
Sub-Class: 00h (VGA controller)
IRQ: 15, INTA, ROM base: F3000000h, Cache line: 64B, Latency: 0
BAR: F2000000h, E000000Ch, 00000000h, F0000004h, 00000000h, 00001001h
Device cfg: FBtoB,SERRE,WaitC,PaErr,VGAPS,MemWr,SpecC,BusMa,MemSE,IOSEn
0 0 0 0 0 0 0 0 1 1

2014 年 09 月 18 日
23:33:17
Android_Lin
Moderator
Forum Posts: 228
Member Since:
2014 年 04 月 01 日
Offline

Glaux said

But I wonder why it doesn't work when I compile it as stand-alone DJGPP program without 86duino libs:

unsigned cbba=0x0A00; // CrossBar Base Address
int main()
{
outportb(cbba+0x9E, 0x08); // CrossBar-Bit Group Selection Port1[6], switch from GPIO8 pin6 to COM2 TX
outportb(cbba+0x9F, 0x08); // CrossBar-Bit Group Selection Port1[7], switch from GPIO8 pin7 to COM2 RX
return(0);
}

Does the sketch code some unlocking of crossbar registers?

With 86Duino lib, before call setup(), the init() first set the crossbar I/O address on SB (offset 0x64 and 0x65) to 0x0A00 (it default value is 0). If want to compile a stand-alone DJGPP program, need first to call init() like main.cpp.
Open wiring.cpp to see init() source code for reference.
(The path of main.cpp and wiring.cpp is hardware\86duino\x86\cores\arduino)

2014 年 09 月 18 日
23:41:47
Android_Lin
Moderator
Forum Posts: 228
Member Since:
2014 年 04 月 01 日
Offline

Glaux said

So I think that the adapter I made is working. But my monitor still display no signal :( Why? How can I check if videobios was executed? Isn't it disabled in 86duino zero?

86Duino CPU has enabled VGA mode and support PCI-E 1X, may need to check whether GT230 also support PCI-E 1X and VBIOS have a good support for DOS.

2014 年 09 月 19 日
10:18:04
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

Android_Lin said
86Duino CPU has enabled VGA mode and support PCI-E 1X, may need to check whether GT230 also support PCI-E 1X and VBIOS have a good support for DOS.

Here is an article on Tom's HW where they tested how performance of VGA is affected by PCI-E bandwidth.
http://www.tomshardware.com/re.....915-5.html
They tested nV 9800GT and some ATI Radeon where simply unwanted PCI-E lanes was insulated by thin tape over the edge connector. From x16 to x1. Second VGA that I tested was gigabyte GeForce 8500GT that should be similar to 9800. And as I can find the device and access it's registers it must working in x1 mode.
Videobios is standard as on all nvidias. I had any problem booting DOS on desktop PC with this VGAs.
I can dump C000 segment to see if BIOS image is there.
Is it possible to enable some debug messages in bios/coreboot? AFAIK coreboot supports debug output on serial console...

Android_Lin said
init() first set the crossbar I/O address on SB (offset 0x64 and 0x65) to 0x0A00.

Aha, OK I will check this. I belived this was done by bios/coreboot. Do you initialize some registers in bios or is it all up to user to programm it himself?

2014 年 09 月 19 日
16:42:53
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline
11

I have another observation: I run romscan utility and it didn't find VBIOS at C0000. I guess that it's needed to set some VGA PCI register to enable ROM decoding, e.g. if you have 2 VGAs in PC you can select which one will be active and only one ROM is mapped.
Then I tried nvflash tool that can successfully dump the VBIOS to file - another check that PCI-E communication is working. I tried to load dumped image with nvidia vgabios loader but it hanged.

NVIDIA Firmware Update Utility (Version 5.100)

Adapter: GeForce GT 230 (10DE,0603,1B0A,9044) H:--:NRM B:01,PCI,D:00,F:00

The display may go *BLANK* on and off for up to 10 seconds during access to the
EEPROM depending on your display adapter and output device.

Identifying EEPROM...
EEPROM ID (9D,007B) : PMC Pm25LV512 2.7-3.6V 512Kx1S, page
Reading adapter firmware image...
Image Size : 61952 bytes
Version : 62.92.84.00.0D
~CRC32 : B78BAEBC
Subsystem ID : 1B0A-9044
Hierarchy ID : Normal Board
Chip SKU : N/A
Project : N/A
CDP : N/A
Build Date : 03/12/09
Modification Date : 05/27/09
Saving of image completed.

2014 年 09 月 20 日
05:01:41
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline
12

Here's a photo of my new COM2 connector with ZD+R protectors:
http://tinypic.com/view.php?pi.....BwmjIffHOM
and wire for PCE-E bus power
http://tinypic.com/view.php?pi.....BwmfYffHOM

2014 年 09 月 22 日
19:41:25
Android_Lin
Moderator
Forum Posts: 228
Member Since:
2014 年 04 月 01 日
Offline

Hello, Glaux
In the past, we tried two kinds of VGA card with Vortex86EX CPU on our motherboard:

1. Genrate mini-PCIE VGA card GD-SM750
2. ATI 550 (it is a PCI-E x16 VGA card but we only use x1 to work by thin tape over the edge connector.)

Above VGA cards worked fine in testing process, our hardware designer recommends that you can check the PCIRSET voltage level of GeForce GT 230 whether is 3.3V. (That is a key for compatibility)
Currently, we are trying to connect other PCI-E VGA card (Geforce series) on 86Duino zero like what you do and will report the result here.

2014 年 09 月 22 日
20:32:37
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline
14

OK, thanks for info.
Unfortunately I don't have available any ATI PCI-E VGA to test. And MiniPCIE VGA's are quite expansive. But in the article on Tom's HW, that I posted, they tested Geforce 9800 so I belive it should work in x1 mode as well.
I checked PCIRSET, it's passed from Vortex CPU via R27 - that I had already soldered (that was why I asked for PCB designators docs but I found the resistor place below the battery before...) The signal is high in normal mode and 0 when I press and hold reset button so it seems to work. Even that, I belive if there would be something wrong on HW level then I even couldn't communicate with VGA through PCI registers but it works. I think that the problem is in firmware - there may be need of programming some PCI registers to activate decoding of videobios memory range - I cannot see videobios at C0000 in current memory. Maybe you changed some coreboot/seabios settings between time when you tested in the past. I flashed the lastest FW you made available.

2014 年 09 月 26 日
03:48:01
stevemork
Moderator
Forum Posts: 16
Member Since:
2014 年 09 月 26 日
Offline
15

Hi all,

a PCI-E x1 VGA on 86Duino Zero would be very much appreciated. Please 86Duino-Team help Glaux to get this working!

If this is working I will make also an adapter cable and try some VGA cards. I then will post the results here ...

Best regards
Steve

2014 年 09 月 27 日
20:43:37
stevemork
Moderator
Forum Posts: 16
Member Since:
2014 年 09 月 26 日
Offline
16

Hello Glaux,

if the VGA BIOS is not in C0000 it can not be initialized by the main BIOS. But maybe you can mirror the VGA BIOS yourself to this location and call it's init routine?

By the way, did you see that there seems to be a new main BIOS 0.96?

Regards
Steve

2014 年 09 月 29 日
11:46:41
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline
17

stevemork said
if the VGA BIOS is not in C0000 it can not be initialized by the main BIOS. But maybe you can mirror the VGA BIOS yourself to this location and call it's init routine?

Yes, but that I tried with nvidia VGABIOS Loader Version 1.10 - this tool allows you to probe vgabios before flash - I belive it copies it to shadow ram and execute init routine - on a normal PC you can see vga bios init strings with version, etc. displayed. You can test e.g. VESA mode table changes or GPU frequency changes without risk of bricking your VGA - if it doesn't work, you simply push reset. But on 86duino this utility hanged (I previously dumped the vga bios with nvflash and then trying to load it).

stevemork said
By the way, did you see that there seems to be a new main BIOS 0.96?

I didn't know, I still have 0.95. I think, that 86duino website should extend the download section from main menu to make quick accesible all available files. Now some are on github some are somewhere else, not easy to track what all changed. But sa I read history.txt it seems there are some minor changes not releated to PCI-E or VGA behavior. Of course I will update anyway...

2014 年 09 月 30 日
23:05:27
Android_Lin
Moderator
Forum Posts: 228
Member Since:
2014 年 04 月 01 日
Offline

Hello, Glaux
During several days, we tested two PCI-E graphics cards:

1. Nvidia graphics card (GeForce 8500GT)
2. ATI graphics card (FirePro V3750)

Our testing platform: Vortex86EX CPU module and EX motherboard.
(Due 12V of PCI-E slot on EX motherboard is unavailable, first need to solder a external 12V power line on graphics card)

Result:
1. use Nvidia graphics card, get no screen:
    http://www.roboard.com/temp/VG.....6Duino.jpg
2. use ATI graphics card, can see the screen:
    http://www.roboard.com/temp/VG.....6Duino.jpg

From the above result, we think that Nvidia's PCI-E has compatible problem with Vortex86EX CPU. In both cases, Vortex86EX CPU use AMI BIOS not coreboot BIOS, otherwise, will get both no screen. This means the coreboot BIOS may need to be modified or reconfigured and we are studying it.

In addition, we also solder PCI-E signal lines from 86Duino Zero to a mini-PCIE graphics card (Genrate GD-SM750) like you do:

front: http://www.roboard.com/temp/VG....._Front.jpg
back: http://www.roboard.com/temp/VG.....A_Back.jpg

and can see the screen whether is AMI BIOS or coreboot BIOS on Vortex86EX CPU:

http://www.roboard.com/temp/VG.....screen.jpg

2014 年 10 月 01 日
10:44:05
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

Hi, thanks for your investigation. I didn't know that there's also AMI BIOS for 86Duino is it also available for Zero or only for big EX devboard?
OK to sumarize we can make the table, right?
Zero CBoot | Zero AMI | EX MB CBoot | EX MB AMI
ATI - - NO YES
nVidia - - NO NO
Genrate YES YES - -
So I can expect, that ATI will work with Zero but need AMI BIOS. What can be difference between Genrate and ATI? I think it's all firmware issue, that some registers on VGA need to be initialized and Genrate may use more compatible defaults that it work even without setting them. Did you tried nvflash on nvidia card? I still think that if the tool can communicate with GPU and even dump the vgabios from card's flash to disk it cannot be HW issue. There's possibility to enable serial debug output in CoreBoot. It would need to initialize crossbar on early stage. Or it can log to memory and can be read later. Maybe there would be some messages about vgabios mapping and execution that could help.

Here's my PCIE adapter schematics (I checked it again, I'm prety sure it's the same as yours wiring)

View post on imgur.com


And here come photos, I don't like to directly solder edge connectors :)

View post on imgur.com

View post on imgur.com

View post on imgur.com

2014 年 10 月 02 日
18:51:50
stevemork
Moderator
Forum Posts: 16
Member Since:
2014 年 09 月 26 日
Offline
20

Hi all,

the 86Duino zero is a great board, and for it's small size and it's low price it could replace many other uC boards. It could benefit of the huge codebase of DOS and Windows sources and programs. Imagine this board running Win32 for robotics and other purposes: endless possibilities! But because of annoying shortcomings it can not be that real success:

1. VGA support is missing. Although the board is meant to be monitor-less, for adapting and debugging sources and OSs it is indispensable to connect a monitor. User Glaux has already shown this could be easyly achieved, but there is still no solution from the 86Duino team. (The main BIOS doesn't map the VideoBios at the right location C0000h, so connecting a PCI-E VGA does not work.)

2. Usage with FreeDOS running independendly from Arduino IDE. This is already realized.

3. Networking running independendly from Arduino IDE. This is already realized.

4. Windows running independendly from Arduino IDE. This would be possible if we could connect a monitor. If we merely could map on-board memory at A0000h to be utilized as VideoMemory I could write a simple DOS VGA BIOS and even a simple Windows VGA driver using solely the on-board hardware of the 86Duino to generate the VGA output.

5. Hassle with the crossbar and the COM ports. There should be a simple tutorial how to manage the crossbar to get the COM ports running under plain FreeDOS independendly from the Arduino IDE.

6. And also there should be a list with *all* the main BIOS components and where to find its sources to rebuild the BIOS.

So please 86Duino team, consider thinking about that ...

Regards Steve

Forum Timezone: Asia/Taipei

Most Users Ever Online: 229

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

hippy: 9

smeezekitty: 8

lukeross: 8

tomka: 8

Ekkehard: 8

UIdahoCIT: 8

blaxxun: 7

Member Stats:

Guest Posters: 0

Members: 1568

Moderators: 15

Admins: 5

Forum Stats:

Groups: 2

Forums: 11

Topics: 248

Posts: 1114

Newest Members: Alfredhak, Davidherie, Nelsonbok, EugeneDut, RobertOwell, LamboSr, petershu, f0rkB0mb, Albert, david

Moderators: Glaux: 70, uaa: 11, guigra: 17, asian55: 22, Android_Lin: 228, bcarroll: 12, cucubutter: 84, recycled-air: 12, stevemork: 16, zerozaber: 52, pongraczi: 26, jejump: 14, George Andrews III: 56, poto: 11, garpastym: 20

Administrators: eveshih: 1, anthony: 31, viky6: 0, roboard: 135, hcl: 1