LASI and serial port initialization
A message that is not in the archive (sent off-list or not yet received): 99101821580101.00297@P100
Helge and I exchanged some e-mail on the topic of LASI vis a vie serial port initialization. Since then, I've come to the conclusion all (or most) parisc platforms will have a similar problem.
The problem is LASI is "discovered" and initialized well after several other drivers want to print things to the console. I see a few options on how to handle it:
1) For each platform, force the console to be the first device "discovered" and initialized. This is not a really good idea since console can be different depending on configuration. Rebuilding the kernel to use a different console doesn't seem reasonable to me. Having the user figure out which devices need to be initialized first and build an appropriate kernel so console works also seems unreasonable. We are headed down this path now though....
2) Use IODC until the console device is "owned" by the appropriate driver and can start taking input/output.
3) buffer the output instead of calling IODC. Size of the buffer will impose some sort of limit. I think this is what HP-UX does but don't really know and it shouldn't matter to us.
Either 2 or 3 requires some software layer behind printk to change behavior at some point. I don't know where that point is or how exactly to define it. I just thought going down path #1 is going to be a real pain to support on a broad set of platforms.
Any other thoughts?
BTW, I still don't know if Helge's changes to inventory.c are needed or not. I don't have the warm fuzzy feeling they are needed but can't prove they aren't either.
grant
Quoted 21 lines · Helge Deller
Am Mon, 18 Oct 1999 schrieben Sie:
Quoted 9 lines
Helge,
I never understood this chunk of very well. I was wondering why you moved code from the caseHPHW_BAto outside the switch statement indo_oldhw_inventory()? (inventory.c)If this is of general interest please post to parisc-linux...
thanks,
grantHi Grant.
I just wanted to get it working, so I moved stuff around until it worked. Wit
h
this I found, that the LASI-Controller should be added to the list before all other stuff underlying the lasi (same is also to the WAX(??)-controller with PS2/Keyboard/Mouse/RS232/HIL). This way it worked and I didn�t thought too muc
h
about it later.... :-)
Quoted 1 line
[Is this for global interrest ??]
Grant Grundler
Communications Infrastructure Computer Operations
+1.408.447.7253
Quoted 16 lines · Grant Grundler
Helge and I exchanged some e-mail on the topic of LASI vis a vie serial port initialization. Since then, I've come to the conclusion all (or most) parisc platforms will have a similar problem.
The problem is LASI is "discovered" and initialized well after several other drivers want to print things to the console. I see a few options on how to handle it:
1) For each platform, force the console to be the first device "discovered" and initialized. This is not a really good idea since console can be different depending on configuration. Rebuilding the kernel to use a different console doesn't seem reasonable to me. Having the user figure out which devices need to be initialized first and build an appropriate kernel so console works also seems unreasonable. We are headed down this path now though....
Quoted 7 lines
2) Use IODC until the console device is "owned" by the appropriate driver and can start taking input/output.
3) buffer the output instead of calling IODC. Size of the buffer will impose some sort of limit. I think this is what HP-UX does but don't really know and it shouldn't matter to us.
Yes, this is what HP-UX does. And in the case of a panic, the buffered messages are flushed to the console via IODC.
Quoted 6 lines
Either 2 or 3 requires some software layer behind printk to change behavior at some point. I don't know where that point is or how exactly to define it. I just thought going down path #1 is going to be a real pain to support on a broad set of platforms.
Any other thoughts?
Yes, 2 or 3 sound best.
Some pros & cons... (assume that the pros are the opposite of the cons for the other option)
2) con: - polled I/O
- may need to add infrastructure to do IODC I/O (but this should be in place for the panic and dump path anyway)
pro: - should work on all platforms, once it works on one
3) con: - when debugging new drivers and platforms, you won't get any debugging messages until the console driver works
-Frank
Quoted 2 lines
2) Use IODC until the console device is "owned" by the appropriate driver and can start taking input/output.
That is basically the sparc approach. It also works well for bootstrapping new hardware - nothing claims the console so you can see what happens until you fix it
Quoted 2 lines
Either 2 or 3 requires some software layer behind printk to change behavior at some point. I don't know where that point is or how
Not really. We have register_console() and unregister_console() already in existance.
Alan
Quoted 1 line
3) buffer the output instead of calling IODC.
This is what Linux does (have a look at kernel/printk.c)