2017-01-11 20:16 GMT+03:00 Andrei Borzenkov <arvidj...@gmail.com>:
> 11.01.2017 19:55, Matwey V. Kornilov пишет:
>> 2017-01-11 19:45 GMT+03:00 Andrei Borzenkov <arvidj...@gmail.com>:
>>> 11.01.2017 16:27, Matwey V. Kornilov пишет:
>>>> What is the proper way to output GRUB2 menu to serial rs232 console when
>>>> UEFI boot is used? I've copy-pasted GRUB_SERIAL_COMMAND="serial --unit=0
>>>> --speed=115200" from Google because I didn't find anything else. It
>>>> doesn't work.
>>>> Now, reading grub sources, I see that the proper way should probably be
>>>> something like GRUB_SERIAL_COMMAND="serial efi0".
>>> This is platform dependent. --unit=0 refers to COM1 on PC BIOS platform.
>>> On EFI grub is using EFI Serial I/O Protocol and enumerates all handles
>>> with this protocol using efiXX names. Then there is USB serial driver,
>>> ARC and IEEE1275 where names are provided by firmware etc.
>> I just can't understand, term/serial.c: grub_cmd_serial() sets name to
>> "com%ld" using --unit=value on any platform.
>> if (state[OPTION_UNIT].set)
>> grub_snprintf (pname, sizeof (pname), "com%ld",
>> grub_strtoul (state.arg, 0, 0));
>> name = pname;
>> Then this "com0" is put to grub_serial_find(name) call. The question
>> is how this is going to match with "efi0"?
> It is not.
>> Please correct me, if I am wrong.
> Again - "--unit=0" is simply alias for "com0". Whether device with name
> "com0" actually exists depends on platform and loaded drivers.
> This alias makes no sense on platform that does not include ns8250
> driver that provides access to device with name "com0". You can check
> grub-core/Makefile.core.def which platforms include this driver.
> So on EFI you are not going to use --unit=0 (or you need to add some
> platform-dependent magic to translate --unit=0 into platform device).
> And yes, this could use better documentation, both for "serial" command
> and "Serial terminal" section.
"serial --speed=115200 efi0" also doesn't work.
It seems that there is no Serial IO protocol in my Insyde UEFI.
>>>> Could you please point me to proper documentation?
>>> You are welcome to contribute to it. Adding template section for
>>> platform dependent serial information and filling it with information
>>> known so far will be excellent - then other may extend it.
With best regards,
Matwey V. Kornilov
Help-grub mailing list