Is here way to have 9600+ serial console and see boot0 message?

Jung-uk Kim jkim at FreeBSD.org
Thu Sep 6 20:01:39 UTC 2018


On 18. 9. 6., Craig Leres wrote:
> On 9/6/18 8:17 AM, Lev Serebryakov wrote:
>>    Nope. If BOOT_BOOT0_COMCONSOLE_SPEED defined, it is used as-is. If it
>> is not defined it is derived from BOOT_COMCONSOLE_SPEED. So, defining it
>> to "0" should work. And disassembling boot0sio confirms it.
>>
>> .if !defined(BOOT_BOOT0_COMCONSOLE_SPEED)
>> BOOT_COMCONSOLE_SPEED?=    9600
>> .if ${BOOT_COMCONSOLE_SPEED} == 9600
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "7 << 5 + 3"
>> .elif ${BOOT_COMCONSOLE_SPEED} == 4800
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "6 << 5 + 3"
>> .elif ${BOOT_COMCONSOLE_SPEED} == 2400
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "5 << 5 + 3"
>> .elif ${BOOT_COMCONSOLE_SPEED} == 1200
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "4 << 5 + 3"
>> .elif ${BOOT_COMCONSOLE_SPEED} == 600
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "3 << 5 + 3"
>> .elif ${BOOT_COMCONSOLE_SPEED} == 300
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "2 << 5 + 3"
>> .elif ${BOOT_COMCONSOLE_SPEED} == 150
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "1 << 5 + 3"
>> .elif ${BOOT_COMCONSOLE_SPEED} == 110
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "0 << 5 + 3"
>> .else
>> BOOT_BOOT0_COMCONSOLE_SPEED=    "7 << 5 + 3"
>> .endif
>> .endif
> 
> Maybe I don't understand what you're saying but I don't think defining
> to "0" is the same as not defining.

...

Defining BOOT_BOOT0_COMCONSOLE_SPEED to 0 is not the same as not
defining, of course.  However, setting it to 0 lets us add
"-DCOMSPEED=0" to CFLAGS[1] and we can skip port configuration[2].

Jung-uk Kim

1.
https://svnweb.freebsd.org/base/head/stand/i386/boot0/Makefile?revision=328769&view=markup#l75
2.
https://svnweb.freebsd.org/base/head/stand/i386/boot0/boot0.S?revision=325834&view=markup#l211

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20180906/1afc9bb7/attachment.sig>


More information about the freebsd-hackers mailing list