Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562492 > unrolled thread

Re: [PATCH v5 0/4] usb: early: add support for early printk through USB3 debug port

Started byIngo Molnar <mingo@kernel.org>
First post2017-01-19 10:20 +0100
Last post2017-01-20 04:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 0/4] usb: early: add support for early printk through  USB3 debug port Ingo Molnar <mingo@kernel.org> - 2017-01-19 10:20 +0100
    Re: [PATCH v5 0/4] usb: early: add support for early printk through  USB3 debug port Lu Baolu <baolu.lu@linux.intel.com> - 2017-01-20 04:10 +0100

#1562492 — Re: [PATCH v5 0/4] usb: early: add support for early printk through USB3 debug port

FromIngo Molnar <mingo@kernel.org>
Date2017-01-19 10:20 +0100
SubjectRe: [PATCH v5 0/4] usb: early: add support for early printk through USB3 debug port
Message-ID<t1h2W-83w-17@gated-at.bofh.it>
* Lu Baolu <baolu.lu@linux.intel.com> wrote:

> xHCI debug capability (DbC) is an optional but standalone
> functionality provided by an xHCI host controller. With DbC
> hardware initialized, the system will present a debug device
> through the USB3 debug port (normally the first USB3 port).
> The debug device is fully compliant with the USB framework
> and provides the equivalent of a very high performance (USB3)
> full-duplex serial link between the debug host and target.
> The DbC functionality is independent of xHCI host. There
> isn't any precondition from xHCI host side for DbC to work.
> 
> This patch set adds support for early printk functionality
> through a USB3 debug port by 1) initializing and enabling
> the DbC hardware during early boot; 2) registering a boot
> console to the system so that early printk messages can go
> through the USB3 debug port. It also includes some lines
> of changes in usb_debug driver so that it can be bound when
> a USB3 debug device is enumerated.
> 
> This code is designed to be used only for kernel debugging
> when machine crashes very early before the console code is
> initialized. It makes the life of kernel debugging easier
> when people work with a modern machine without any legacy
> serial ports.

BTW., just a side note, some kernel developers (like PeterZ - and I do it 
sometimes too) remap early_printk to printk permanently and use it as their main 
printk facility - because printk() reliability has suffered over the last couple 
of years.

So it's more than just early boot debugging - it's a very simple state-less 
logging facility to an external computer.


Thanks,

	ngo

[toc] | [next] | [standalone]


#1563261

FromLu Baolu <baolu.lu@linux.intel.com>
Date2017-01-20 04:10 +0100
Message-ID<t1xKq-1Iz-7@gated-at.bofh.it>
In reply to#1562492
Hi Ingo,

On 01/19/2017 05:12 PM, Ingo Molnar wrote:
> * Lu Baolu <baolu.lu@linux.intel.com> wrote:
>
>> xHCI debug capability (DbC) is an optional but standalone
>> functionality provided by an xHCI host controller. With DbC
>> hardware initialized, the system will present a debug device
>> through the USB3 debug port (normally the first USB3 port).
>> The debug device is fully compliant with the USB framework
>> and provides the equivalent of a very high performance (USB3)
>> full-duplex serial link between the debug host and target.
>> The DbC functionality is independent of xHCI host. There
>> isn't any precondition from xHCI host side for DbC to work.
>>
>> This patch set adds support for early printk functionality
>> through a USB3 debug port by 1) initializing and enabling
>> the DbC hardware during early boot; 2) registering a boot
>> console to the system so that early printk messages can go
>> through the USB3 debug port. It also includes some lines
>> of changes in usb_debug driver so that it can be bound when
>> a USB3 debug device is enumerated.
>>
>> This code is designed to be used only for kernel debugging
>> when machine crashes very early before the console code is
>> initialized. It makes the life of kernel debugging easier
>> when people work with a modern machine without any legacy
>> serial ports.
> BTW., just a side note, some kernel developers (like PeterZ - and I do it 
> sometimes too) remap early_printk to printk permanently and use it as their main 
> printk facility - because printk() reliability has suffered over the last couple 
> of years.
>
> So it's more than just early boot debugging - it's a very simple state-less 
> logging facility to an external computer.

Thanks for the information. I will rework this message.

Best regards,
Lu Baolu

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web