WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] Only one serial console on Tiger2

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: [Xen-ia64-devel] [PATCH] Only one serial console on Tiger2
From: Horms <horms@xxxxxxxxxxxx>
Date: Thu, 15 Feb 2007 19:30:34 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 15 Feb 2007 02:38:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: mutt-ng/devel-r804 (Debian)
Hi Alex,

I did a bit of research and it seems that the Tiger2, like the Tiger4,
only has one serial port. So we can use common code for both of them,
having com1=0x2f8.

Tested on a Tiger 2 with the following command line, which is only
needed for the linux dom0 console -- xen and linux dom0 boot messages
come over serial anyway:

"-- console=ttyS0"

I strongly doubt it will break Tiger 4, but testing can never hurt.

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

 xen/arch/ia64/linux-xen/.setup.c.swp |binary
 xen/arch/ia64/linux-xen/setup.c      |   33 ++++++++++-----------------------
 2 files changed, 10 insertions(+), 23 deletions(-)

--- 0001/xen/arch/ia64/linux-xen/setup.c
+++ work/xen/arch/ia64/linux-xen/setup.c        2007-02-15 19:08:52.000000000 
+0900
@@ -353,32 +353,19 @@ intel_tiger_console_setup(void)
        if (strncmp(hdr->signature, XSDT_SIG, sizeof(XSDT_SIG) - 1))
                return -ENODEV;
 
-       /* Only looking for Intel systems */
-       if (strncmp(hdr->oem_id, "INTEL", 5))
+       /* Only looking for Intel Tiger systems
+        * Tiger 2: SR870BH
+        * Tiger 4: SR870BN4 */
+       if (strncmp(hdr->oem_id, "INTEL", 5) ||
+           (!strncmp(hdr->oem_table_id, "SR870BH2", 8) &&
+            !strncmp(hdr->oem_table_id, "SR870BN4", 8)))
                return -ENODEV;
 
-       if (!strncmp(hdr->oem_table_id, "SR870BH2", 8)) {
-               /* Tiger 2 */
-               ns16550_com1.baud = BAUD_AUTO;
-               ns16550_com1.io_base = 0x3f8;
-               ns16550_com1.irq = 4;
-
-               ns16550_com2.baud = BAUD_AUTO;
-               ns16550_com2.io_base = 0x2f8;
-               ns16550_com2.irq = 3;
-
-               return 0;
-
-       } else if (!strncmp(hdr->oem_table_id, "SR870BN4", 8)) {
-               /* Tiger 4 */
-               ns16550_com1.baud = BAUD_AUTO;
-               ns16550_com1.io_base = 0x2f8;
-               ns16550_com1.irq = 3;
-               
-               return 0;
-       }
+       ns16550_com1.baud = BAUD_AUTO;
+       ns16550_com1.io_base = 0x2f8;
+       ns16550_com1.irq = 3;
 
-       return -ENODEV;
+       return 0;
 }
 #endif
 

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel