help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub with serial line configuration using PCI serial adapter


From: rishat
Subject: Re: grub with serial line configuration using PCI serial adapter
Date: Thu, 27 Oct 2016 18:17:42 +0300
User-agent: Roundcube Webmail/1.2.0

On 2016-10-27 15:44, Andrei Borzenkov wrote:
On Wed, Oct 26, 2016 at 10:23 PM, Songatov Rishat <address@hidden> wrote:
Hi

I have solved this issue with PCI serial adapter


Congratulations!

I was given another card (same chip and revision) and passing attribute in following format helped me to redirect input and output to serial console:

serial --port=0x0cc00 ...


How did you come to this address?

I just tried to put this address by this format without knowing that this would help me. But I was pretty sure that serial.c has piece of code where it adds COM port by function grub_serial_ns8250_add_port.

But I feel this is rather rhetorical question, isn't it :)


I still don't know why my first card dislikes grub or vice versa but the new
one is working now and I'm satisfied.

Thank you very much Andrei to your help.

--

With best regards

Rishat


On 21.10.2016 00:49, Songatov Rishat wrote:

Hi Andrei

I've found PCI specification and dumped its registers, so now I can
identify Subsystem Vendor ID/ Subsystem Device ID. Is this what you want to
know?

lspci -s 01:05.0 -vb -xxx
01:05.0 Serial controller: MosChip Semiconductor Technology Ltd. PCI 9835
Multi-I/O Controller (rev 01) (prog-if 02 [16550])
    Subsystem: LSI Logic / Symbios Logic 2S (16C550 UART)
    Flags: medium devsel, IRQ 11
    I/O ports at cc00
    I/O ports at c880
    I/O ports at c800
    I/O ports at c480
    I/O ports at c400
    I/O ports at c080
    Kernel driver in use: serial
00: 10 97 35 98 03 01 88 02 01 02 00 07 10 40 00 00
10: 01 cc 00 00 81 c8 00 00 01 c8 00 00 81 c4 00 00
20: 01 c4 00 00 81 c0 00 00 00 00 00 00 00 10 02 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
40: 80 80 00 00 00 00 00 c0 10 97 00 77 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Looks like it is 1000:0002. Do you need something else to help me?

Thank you in advance.


On 19.10.2016 18:31, rishat wrote:

On 2016-10-19 12:26, Andrei Borzenkov wrote:

and subvendor/subroduct?


Sorry Andrei, I'm not with you. Could you please specify what do you
mean.
I've found http://pci-ids.ucw.cz/pci.ids database and if you take a look
this link you can find below part:
...
9710  MosChip Semiconductor Technology Ltd.
    9250  PCI-to-PCI bridge [MCS9250]
    9805  PCI 1 port parallel adapter
    9815  PCI 9815 Multi-I/O Controller
        1000 0020  2P0S (2 port parallel adaptor)
    9820  PCI 9820 Multi-I/O Controller
    9835  PCI 9835 Multi-I/O Controller
        1000 0002  2S (16C550 UART)
        1000 0012  1P2S
    9845  PCI 9845 Multi-I/O Controller
...
Or do you mean I need show you which chip is used for this device?

On Wed, Oct 19, 2016 at 12:20 PM, rishat <address@hidden> wrote:

Hi
lspci -nn
...
01:06.0 Serial controller [0700]: MosChip Semiconductor Technology Ltd.
PCI
9835 Multi-I/O Controller [9710:9835] (rev 01)
...

--
With best regards
Rishat

On 2016-10-19 06:40, Andrei Borzenkov wrote:


18.10.2016 23:05, Songatov Rishat пишет:


Hi

lspci -i in the grub environment shows me this:

01:06.0 9710:9835 [0700] Communication controller [PI 02]
IO space 0 at 0xac00
IO space 1 at 0xa880
IO space 2 at 0xa800
IO space 3 at 0xa480
IO space 4 at 0xa400
IO space 5 at 0xa080

The same when OS is loaded:

01:06.0 Serial controller: MosChip Semiconductor Technology Ltd. PCI
9835 Multi-I/O Controller (rev 01) (prog-if 02 [16550])
    Subsystem: LSI Logic / Symbios Logic 2S (16C550 UART)



Could you please show PCI IDs (lspci -nn ...)?

    Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr-
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
    Interrupt: pin A routed to IRQ 10
    Region 0: I/O ports at ac00 [size=8]
    Region 1: I/O ports at a880 [size=8]
    Region 2: I/O ports at a800 [size=8]
    Region 3: I/O ports at a480 [size=8]
    Region 4: I/O ports at a400 [size=8]
    Region 5: I/O ports at a080 [size=16]
    Kernel driver in use: serial

I think BIOS can't recognize this device as serial adapter. I will
try
to other one. Thank you to your support.


On 18.10.2016 16:10, rishat wrote:


Yes, I saw this serial card from lspci output. But I haven't found
how
to display detailed information for certain card. Sooner I'll give
you
output from lspci -i.

--
With best regards
Rishat

On 2016-10-18 14:05, Andrei Borzenkov wrote:


On Tue, Oct 18, 2016 at 12:48 PM, rishat <address@hidden>
wrote:


Hi Andrei
May I ask another question? How I can debug this behaviour? I
believe that
BIOS initializes this adapter. Need to say that "PnP OS" was
setted
to "Yes"
value. I've changed it to "No" and ... same silence in the
minicom.



Well, assuming BIOS did initialize this card it may use different
port
address. The one you see in setserial output is assigned by Linux driver. I do not know how flexible it is, but I presume they may
change.

Try lspci command in GRUB. Does it show your card at all? It also
displays some details of current card setup.

You may want to use "set pager=1" otherwise output will scroll too
fast.

If you see your card could you send screenshot of information GRUB
shows?

Then I
pulled out this adapter and inserted this pci serial adapter to
the
other PC
computer. It has already integrated COM port, this one is working
fine, I
have tried to do serial connection via pci adapter, but again I've
got
nothing. I just want to figure out is this something I can do with
motherboard or my pci adapter is not compatible. If I need to
change
this
card do you have list of pci, pci-e card that successfully can by
used? Is
it possible I've faced to situation when two motherboards can't
initialize
this hardware?

Thank you in advance.

--
Best regards
Rishat



On 2016-10-18 06:47, Andrei Borzenkov wrote:



17.10.2016 22:22, Songatov Rishat пишет:



Hi thank you for helping me!

Unfortunately I haven't got serial access to the grub after
adding
this
piece of configuration:

insmod pci
insmod serial
insmod terminal
insmod terminfo

###serial --speed=115200 --port=a880 --word=8 --parity=no
--stop=1
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1

terminal_input serial
terminal_output serial

May be I need some sleep time after inserting pci.mod. How I can
do this?


You can pause with "sleep NN" but as I already wrote this is not
likely
to work anyway - either GRUB needs code to initialize your PCI
card
or
BIOS should do it. Try BIOS settings, in the past it was common
to
have
something like "PnP OS" where "no" would cause BIOS to initialize
all
available hardware and "yes" would leave it to operating system.

--

Best regards

Rishat


On 17.10.2016 20:34, Andrei Borzenkov wrote:



17.10.2016 19:41, rishat пишет:



On 2016-10-17 19:16, Andrei Borzenkov wrote:



17.10.2016 16:16, rishat пишет:



setserial -g /dev/ttyS[0-4]
/dev/ttyS0, UART: 16550A, Port: 0xa880, IRQ: 21



...



When I tried to manually type a "serial --speed=115200
--unit=0
--word=8
--parity=no --stop=1" in the grub command line it complains
that COM1
port don't exist. I have played with unit and port
attributes
but
without any luck.

Does "serial --port=a880 ..." work? If not, what exactly
happens?

Note that you may need to load at least PCI bus driver
(insmod
pci)
for
this to work.



I've tried to use it that way but it didn't find com port
again.
I'll try to do insmod pci and write to you tomorrow.

Yes, please let us know, but on firther consideration it
probably
won't
help either. Card likely needs to be initialized first, and
this
requires driver that knows how to do it. serial driver in GRUB
presumes
hardware is in working state already. Someone would need to
implement
it.

By the way is it possible to share documentation about some
useful
modules in the grub? I havn't found any information using
google.

_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub







_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub






_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub



_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub



_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub




reply via email to

[Prev in Thread] Current Thread [Next in Thread]