This patch allows runtime autoconfiguration of the serial console. Right now on PowerPC, we''re configuring the serial port by appending "com1=..." to cmdline, which is inflexible and inefficient. Also, we''re using a couple systems whose firmware use different baud rates for the serial console (115200 and 19200). It is annoying or impossible to set environment variables in these firmwares right now, which makes autoconfiguration important. This patch does a few things: - It allows us to automatically enable the serial console ("console=com1"). - It gives the ns16550 parameters reasonable defaults (8n1). - If baud is unspecified, do not reconfigure the ns16550 baud rate (use whatever firmware was using). - It allows us to automatically configure ns16550 parameters ("com1=baud,..."). All parameters are optional (so you can selectively override the defaults). I''ve included the PowerPC code so you could see an example of a user. (Side note: Open Firmware systems provide the system''s hardware configuration in a data structure called the "device tree". In particular, the ISA IO base, used to emulate ISA IO on systems that only have MMIO, is at an arbitrary physical address; we only know where that is at runtime, when the device tree tells us.) If there are no objections, please apply. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> -- Hollis Blanchard IBM Linux Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 13 Jul 2005, at 23:36, Hollis Blanchard wrote:> - It allows us to automatically enable the serial console > ("console=com1").That''s what OPT_CONSOLE_STR is for.> - It gives the ns16550 parameters reasonable defaults (8n1). > - If baud is unspecified, do not reconfigure the ns16550 baud rate (use > whatever firmware was using).Okay.> - It allows us to automatically configure ns16550 parameters > ("com1=baud,..."). All parameters are optional (so you can selectively > override the defaults).I''ll give you a run-time method to specify override strings for opt_com1 and opt_com2. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hollis Blanchard
2005-Jul-25 17:50 UTC
Re: [Xen-devel] [patch] auto serial port configuration
On Jul 14, 2005, at 3:51 AM, Keir Fraser wrote:> >> - It allows us to automatically configure ns16550 parameters >> ("com1=baud,..."). All parameters are optional (so you can selectively >> override the defaults). > > I''ll give you a run-time method to specify override strings for > opt_com1 and opt_com2.Thanks Keir, this working perfectly. -- Hollis Blanchard IBM Linux Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel