ia64/xen-unstable

changeset 15581:c6491ed12f84

hvm: Re-introduce LPT1 device in ACPI tables.

Once the presence of LPT1 is baked into a Windows guest, it gets upset
if it is subsequently removed. Hence we add the 'LTP1' device object
back into the ACPI DSDT, and remove IRQ 7 from the list of IRQs usable
by the PCI-ISA links.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Jul 11 13:49:11 2007 +0100 (2007-07-11)
parents 29761c9b9105
children 24379dde8ac4
files tools/firmware/hvmloader/acpi/dsdt.asl tools/firmware/hvmloader/acpi/dsdt.c tools/firmware/hvmloader/config.h tools/firmware/hvmloader/hvmloader.c tools/firmware/rombios/rombios.c tools/ioemu/vl.c
line diff
     1.1 --- a/tools/firmware/hvmloader/acpi/dsdt.asl	Wed Jul 11 13:03:57 2007 +0100
     1.2 +++ b/tools/firmware/hvmloader/acpi/dsdt.asl	Wed Jul 11 13:49:11 2007 +0100
     1.3 @@ -123,11 +123,12 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
     1.4              }
     1.5  
     1.6              Name(BUFA, ResourceTemplate() {
     1.7 -                IRQ(Level, ActiveLow, Shared) { 5, 7, 10, 11 }
     1.8 +                IRQ(Level, ActiveLow, Shared) { 5, 10, 11 }
     1.9              })
    1.10  
    1.11              Name(BUFB, Buffer() {
    1.12 -                0x23, 0x00, 0x00, 0x18, 0x79, 0
    1.13 +                0x23, 0x00, 0x00, 0x18, /* IRQ descriptor */
    1.14 +                0x79, 0                 /* End tag, null checksum */
    1.15              })
    1.16  
    1.17              CreateWordField(BUFB, 0x01, IRQV)
    1.18 @@ -643,6 +644,22 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
    1.19                          IRQNoFlags () {4}
    1.20                      })
    1.21                  }
    1.22 +
    1.23 +                Device (LTP1)
    1.24 +                {
    1.25 +                    Name (_HID, EisaId ("PNP0400"))
    1.26 +                    Name (_UID, 0x02)
    1.27 +                    Method (_STA, 0, NotSerialized)
    1.28 +                    {
    1.29 +                        Return (0x0F)
    1.30 +                    }
    1.31 +
    1.32 +                    Name (_CRS, ResourceTemplate()
    1.33 +                    {
    1.34 +                        IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
    1.35 +                        IRQNoFlags () {7}
    1.36 +                    })
    1.37 +                } 
    1.38              }
    1.39          }
    1.40      }
     2.1 --- a/tools/firmware/hvmloader/acpi/dsdt.c	Wed Jul 11 13:03:57 2007 +0100
     2.2 +++ b/tools/firmware/hvmloader/acpi/dsdt.c	Wed Jul 11 13:49:11 2007 +0100
     2.3 @@ -1,19 +1,19 @@
     2.4  /*
     2.5   * 
     2.6   * Intel ACPI Component Architecture
     2.7 - * ASL Optimizing Compiler version 20060707 [Dec 30 2006]
     2.8 + * ASL Optimizing Compiler version 20060707 [Feb 16 2007]
     2.9   * Copyright (C) 2000 - 2006 Intel Corporation
    2.10   * Supports ACPI Specification Revision 3.0a
    2.11   * 
    2.12 - * Compilation of "dsdt.asl" - Sat May 12 16:13:55 2007
    2.13 + * Compilation of "dsdt.asl" - Wed Jul 11 13:34:30 2007
    2.14   * 
    2.15   * C source code output
    2.16   *
    2.17   */
    2.18  unsigned char AmlCode[] =
    2.19  {
    2.20 -    0x44,0x53,0x44,0x54,0x67,0x0D,0x00,0x00,  /* 00000000    "DSDTg..." */
    2.21 -    0x02,0xE0,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    "..Xen..." */
    2.22 +    0x44,0x53,0x44,0x54,0x9F,0x0D,0x00,0x00,  /* 00000000    "DSDT...." */
    2.23 +    0x02,0x2E,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    "..Xen..." */
    2.24      0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,  /* 00000010    "HVM....." */
    2.25      0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
    2.26      0x07,0x07,0x06,0x20,0x08,0x50,0x4D,0x42,  /* 00000020    "... .PMB" */
    2.27 @@ -27,7 +27,7 @@ unsigned char AmlCode[] =
    2.28      0x04,0x0A,0x07,0x0A,0x07,0x00,0x00,0x08,  /* 00000060    "........" */
    2.29      0x50,0x49,0x43,0x44,0x00,0x14,0x0C,0x5F,  /* 00000068    "PICD..._" */
    2.30      0x50,0x49,0x43,0x01,0x70,0x68,0x50,0x49,  /* 00000070    "PIC.phPI" */
    2.31 -    0x43,0x44,0x10,0x4C,0xCE,0x5F,0x53,0x42,  /* 00000078    "CD.L._SB" */
    2.32 +    0x43,0x44,0x10,0x44,0xD2,0x5F,0x53,0x42,  /* 00000078    "CD.D._SB" */
    2.33      0x5F,0x5B,0x82,0x49,0x04,0x4D,0x45,0x4D,  /* 00000080    "_[.I.MEM" */
    2.34      0x30,0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,  /* 00000088    "0._HID.A" */
    2.35      0xD0,0x0C,0x02,0x08,0x5F,0x43,0x52,0x53,  /* 00000090    "...._CRS" */
    2.36 @@ -37,7 +37,7 @@ unsigned char AmlCode[] =
    2.37      0x00,0x00,0xFF,0xFF,0x09,0x00,0x00,0x00,  /* 000000B0    "........" */
    2.38      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B8    "........" */
    2.39      0x00,0x00,0x00,0x00,0x0A,0x00,0x00,0x00,  /* 000000C0    "........" */
    2.40 -    0x00,0x00,0x79,0x00,0x5B,0x82,0x49,0xC9,  /* 000000C8    "..y.[.I." */
    2.41 +    0x00,0x00,0x79,0x00,0x5B,0x82,0x41,0xCD,  /* 000000C8    "..y.[.A." */
    2.42      0x50,0x43,0x49,0x30,0x08,0x5F,0x48,0x49,  /* 000000D0    "PCI0._HI" */
    2.43      0x44,0x0C,0x41,0xD0,0x0A,0x03,0x08,0x5F,  /* 000000D8    "D.A...._" */
    2.44      0x55,0x49,0x44,0x00,0x08,0x5F,0x41,0x44,  /* 000000E0    "UID.._AD" */
    2.45 @@ -59,7 +59,7 @@ unsigned char AmlCode[] =
    2.46      0x00,0xF0,0xFF,0xFF,0xFF,0xF4,0x00,0x00,  /* 00000160    "........" */
    2.47      0x00,0x00,0x00,0x00,0x00,0x05,0x79,0x00,  /* 00000168    "......y." */
    2.48      0xA4,0x50,0x52,0x54,0x30,0x08,0x42,0x55,  /* 00000170    ".PRT0.BU" */
    2.49 -    0x46,0x41,0x11,0x09,0x0A,0x06,0x23,0xA0,  /* 00000178    "FA....#." */
    2.50 +    0x46,0x41,0x11,0x09,0x0A,0x06,0x23,0x20,  /* 00000178    "FA....# " */
    2.51      0x0C,0x18,0x79,0x00,0x08,0x42,0x55,0x46,  /* 00000180    "..y..BUF" */
    2.52      0x42,0x11,0x09,0x0A,0x06,0x23,0x00,0x00,  /* 00000188    "B....#.." */
    2.53      0x18,0x79,0x00,0x8B,0x42,0x55,0x46,0x42,  /* 00000190    ".y..BUFB" */
    2.54 @@ -348,7 +348,7 @@ unsigned char AmlCode[] =
    2.55      0x0C,0x04,0x0C,0xFF,0xFF,0x0F,0x00,0x0A,  /* 00000A68    "........" */
    2.56      0x02,0x00,0x0A,0x2F,0x12,0x0C,0x04,0x0C,  /* 00000A70    ".../...." */
    2.57      0xFF,0xFF,0x0F,0x00,0x0A,0x03,0x00,0x0A,  /* 00000A78    "........" */
    2.58 -    0x10,0x5B,0x82,0x44,0x2E,0x49,0x53,0x41,  /* 00000A80    ".[.D.ISA" */
    2.59 +    0x10,0x5B,0x82,0x4C,0x31,0x49,0x53,0x41,  /* 00000A80    ".[.L1ISA" */
    2.60      0x5F,0x08,0x5F,0x41,0x44,0x52,0x0C,0x00,  /* 00000A88    "_._ADR.." */
    2.61      0x00,0x01,0x00,0x5B,0x80,0x50,0x49,0x52,  /* 00000A90    "...[.PIR" */
    2.62      0x51,0x02,0x0A,0x60,0x0A,0x04,0x10,0x2E,  /* 00000A98    "Q..`...." */
    2.63 @@ -440,6 +440,13 @@ unsigned char AmlCode[] =
    2.64      0x09,0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A,  /* 00000D48    "._STA..." */
    2.65      0x0F,0x08,0x5F,0x43,0x52,0x53,0x11,0x10,  /* 00000D50    ".._CRS.." */
    2.66      0x0A,0x0D,0x47,0x01,0xF8,0x03,0xF8,0x03,  /* 00000D58    "..G....." */
    2.67 -    0x01,0x08,0x22,0x10,0x00,0x79,0x00,
    2.68 +    0x01,0x08,0x22,0x10,0x00,0x79,0x00,0x5B,  /* 00000D60    ".."..y.[" */
    2.69 +    0x82,0x36,0x4C,0x54,0x50,0x31,0x08,0x5F,  /* 00000D68    ".6LTP1._" */
    2.70 +    0x48,0x49,0x44,0x0C,0x41,0xD0,0x04,0x00,  /* 00000D70    "HID.A..." */
    2.71 +    0x08,0x5F,0x55,0x49,0x44,0x0A,0x02,0x14,  /* 00000D78    "._UID..." */
    2.72 +    0x09,0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A,  /* 00000D80    "._STA..." */
    2.73 +    0x0F,0x08,0x5F,0x43,0x52,0x53,0x11,0x10,  /* 00000D88    ".._CRS.." */
    2.74 +    0x0A,0x0D,0x47,0x01,0x78,0x03,0x78,0x03,  /* 00000D90    "..G.x.x." */
    2.75 +    0x08,0x08,0x22,0x80,0x00,0x79,0x00,
    2.76  };
    2.77  int DsdtLen=sizeof(AmlCode);
     3.1 --- a/tools/firmware/hvmloader/config.h	Wed Jul 11 13:03:57 2007 +0100
     3.2 +++ b/tools/firmware/hvmloader/config.h	Wed Jul 11 13:49:11 2007 +0100
     3.3 @@ -9,7 +9,7 @@
     3.4  #define LAPIC_ID(vcpu_id)   ((vcpu_id) * 2)
     3.5  
     3.6  #define PCI_ISA_DEVFN       0x08    /* dev 1, fn 0 */
     3.7 -#define PCI_ISA_IRQ_MASK    0x0ca0U /* ISA IRQs 5,7,10,11 are PCI connected */
     3.8 +#define PCI_ISA_IRQ_MASK    0x0c20U /* ISA IRQs 5,10,11 are PCI connected */
     3.9  
    3.10  #define ROMBIOS_SEG            0xF000
    3.11  #define ROMBIOS_BEGIN          0x000F0000
     4.1 --- a/tools/firmware/hvmloader/hvmloader.c	Wed Jul 11 13:03:57 2007 +0100
     4.2 +++ b/tools/firmware/hvmloader/hvmloader.c	Wed Jul 11 13:49:11 2007 +0100
     4.3 @@ -180,15 +180,13 @@ static void pci_setup(void)
     4.4      unsigned int bar, pin, link, isa_irq;
     4.5  
     4.6      /* Program PCI-ISA bridge with appropriate link routes. */
     4.7 -    link = 0;
     4.8 -    for ( isa_irq = 0; isa_irq < 15; isa_irq++ )
     4.9 +    isa_irq = 0;
    4.10 +    for ( link = 0; link < 4; link++ )
    4.11      {
    4.12 -        if ( !(PCI_ISA_IRQ_MASK & (1U << isa_irq)) )
    4.13 -            continue;
    4.14 +        do { isa_irq = (isa_irq + 1) & 15;
    4.15 +        } while ( !(PCI_ISA_IRQ_MASK & (1U << isa_irq)) );
    4.16          pci_writeb(PCI_ISA_DEVFN, 0x60 + link, isa_irq);
    4.17          printf("PCI-ISA link %u routed to IRQ%u\n", link, isa_irq);
    4.18 -        if ( link++ == 4 )
    4.19 -            break;
    4.20      }
    4.21  
    4.22      /* Program ELCR to match PCI-wired IRQs. */
     5.1 --- a/tools/firmware/rombios/rombios.c	Wed Jul 11 13:03:57 2007 +0100
     5.2 +++ b/tools/firmware/rombios/rombios.c	Wed Jul 11 13:49:11 2007 +0100
     5.3 @@ -9146,78 +9146,78 @@ pci_routing_table_structure:
     5.4    db 0 ;; pci bus number
     5.5    db 0x08 ;; pci device number (bit 7-3)
     5.6    db 0x61 ;; link value INTA#: pointer into PCI2ISA config space
     5.7 -  dw 0x0ca0 ;; IRQ bitmap INTA# 
     5.8 +  dw 0x0c20 ;; IRQ bitmap INTA# 
     5.9    db 0x62 ;; link value INTB#
    5.10 -  dw 0x0ca0 ;; IRQ bitmap INTB# 
    5.11 +  dw 0x0c20 ;; IRQ bitmap INTB# 
    5.12    db 0x63 ;; link value INTC#
    5.13 -  dw 0x0ca0 ;; IRQ bitmap INTC# 
    5.14 +  dw 0x0c20 ;; IRQ bitmap INTC# 
    5.15    db 0x60 ;; link value INTD#
    5.16 -  dw 0x0ca0 ;; IRQ bitmap INTD#
    5.17 +  dw 0x0c20 ;; IRQ bitmap INTD#
    5.18    db 0 ;; physical slot (0 = embedded)
    5.19    db 0 ;; reserved
    5.20    ;; second slot entry: 1st PCI slot
    5.21    db 0 ;; pci bus number
    5.22    db 0x10 ;; pci device number (bit 7-3)
    5.23    db 0x62 ;; link value INTA#
    5.24 -  dw 0x0ca0 ;; IRQ bitmap INTA# 
    5.25 +  dw 0x0c20 ;; IRQ bitmap INTA# 
    5.26    db 0x63 ;; link value INTB#
    5.27 -  dw 0x0ca0 ;; IRQ bitmap INTB# 
    5.28 +  dw 0x0c20 ;; IRQ bitmap INTB# 
    5.29    db 0x60 ;; link value INTC#
    5.30 -  dw 0x0ca0 ;; IRQ bitmap INTC# 
    5.31 +  dw 0x0c20 ;; IRQ bitmap INTC# 
    5.32    db 0x61 ;; link value INTD#
    5.33 -  dw 0x0ca0 ;; IRQ bitmap INTD#
    5.34 +  dw 0x0c20 ;; IRQ bitmap INTD#
    5.35    db 1 ;; physical slot (0 = embedded)
    5.36    db 0 ;; reserved
    5.37    ;; third slot entry: 2nd PCI slot
    5.38    db 0 ;; pci bus number
    5.39    db 0x18 ;; pci device number (bit 7-3)
    5.40    db 0x63 ;; link value INTA#
    5.41 -  dw 0x0ca0 ;; IRQ bitmap INTA# 
    5.42 +  dw 0x0c20 ;; IRQ bitmap INTA# 
    5.43    db 0x60 ;; link value INTB#
    5.44 -  dw 0x0ca0 ;; IRQ bitmap INTB# 
    5.45 +  dw 0x0c20 ;; IRQ bitmap INTB# 
    5.46    db 0x61 ;; link value INTC#
    5.47 -  dw 0x0ca0 ;; IRQ bitmap INTC# 
    5.48 +  dw 0x0c20 ;; IRQ bitmap INTC# 
    5.49    db 0x62 ;; link value INTD#
    5.50 -  dw 0x0ca0 ;; IRQ bitmap INTD#
    5.51 +  dw 0x0c20 ;; IRQ bitmap INTD#
    5.52    db 2 ;; physical slot (0 = embedded)
    5.53    db 0 ;; reserved
    5.54    ;; 4th slot entry: 3rd PCI slot
    5.55    db 0 ;; pci bus number
    5.56    db 0x20 ;; pci device number (bit 7-3)
    5.57    db 0x60 ;; link value INTA#
    5.58 -  dw 0x0ca0 ;; IRQ bitmap INTA# 
    5.59 +  dw 0x0c20 ;; IRQ bitmap INTA# 
    5.60    db 0x61 ;; link value INTB#
    5.61 -  dw 0x0ca0 ;; IRQ bitmap INTB# 
    5.62 +  dw 0x0c20 ;; IRQ bitmap INTB# 
    5.63    db 0x62 ;; link value INTC#
    5.64 -  dw 0x0ca0 ;; IRQ bitmap INTC# 
    5.65 +  dw 0x0c20 ;; IRQ bitmap INTC# 
    5.66    db 0x63 ;; link value INTD#
    5.67 -  dw 0x0ca0 ;; IRQ bitmap INTD#
    5.68 +  dw 0x0c20 ;; IRQ bitmap INTD#
    5.69    db 3 ;; physical slot (0 = embedded)
    5.70    db 0 ;; reserved
    5.71    ;; 5th slot entry: 4rd PCI slot
    5.72    db 0 ;; pci bus number
    5.73    db 0x28 ;; pci device number (bit 7-3)
    5.74    db 0x61 ;; link value INTA#
    5.75 -  dw 0x0ca0 ;; IRQ bitmap INTA# 
    5.76 +  dw 0x0c20 ;; IRQ bitmap INTA# 
    5.77    db 0x62 ;; link value INTB#
    5.78 -  dw 0x0ca0 ;; IRQ bitmap INTB# 
    5.79 +  dw 0x0c20 ;; IRQ bitmap INTB# 
    5.80    db 0x63 ;; link value INTC#
    5.81 -  dw 0x0ca0 ;; IRQ bitmap INTC# 
    5.82 +  dw 0x0c20 ;; IRQ bitmap INTC# 
    5.83    db 0x60 ;; link value INTD#
    5.84 -  dw 0x0ca0 ;; IRQ bitmap INTD#
    5.85 +  dw 0x0c20 ;; IRQ bitmap INTD#
    5.86    db 4 ;; physical slot (0 = embedded)
    5.87    db 0 ;; reserved
    5.88    ;; 6th slot entry: 5rd PCI slot
    5.89    db 0 ;; pci bus number
    5.90    db 0x30 ;; pci device number (bit 7-3)
    5.91    db 0x62 ;; link value INTA#
    5.92 -  dw 0x0ca0 ;; IRQ bitmap INTA# 
    5.93 +  dw 0x0c20 ;; IRQ bitmap INTA# 
    5.94    db 0x63 ;; link value INTB#
    5.95 -  dw 0x0ca0 ;; IRQ bitmap INTB# 
    5.96 +  dw 0x0c20 ;; IRQ bitmap INTB# 
    5.97    db 0x60 ;; link value INTC#
    5.98 -  dw 0x0ca0 ;; IRQ bitmap INTC# 
    5.99 +  dw 0x0c20 ;; IRQ bitmap INTC# 
   5.100    db 0x61 ;; link value INTD#
   5.101 -  dw 0x0ca0 ;; IRQ bitmap INTD#
   5.102 +  dw 0x0c20 ;; IRQ bitmap INTD#
   5.103    db 5 ;; physical slot (0 = embedded)
   5.104    db 0 ;; reserved
   5.105  #endif // BX_PCIBIOS
     6.1 --- a/tools/ioemu/vl.c	Wed Jul 11 13:03:57 2007 +0100
     6.2 +++ b/tools/ioemu/vl.c	Wed Jul 11 13:49:11 2007 +0100
     6.3 @@ -7141,13 +7141,8 @@ int main(int argc, char **argv)
     6.4          serial_devices[i][0] = '\0';
     6.5      serial_device_index = 0;
     6.6  
     6.7 -#ifndef CONFIG_DM
     6.8      pstrcpy(parallel_devices[0], sizeof(parallel_devices[0]), "vc");
     6.9      for(i = 1; i < MAX_PARALLEL_PORTS; i++)
    6.10 -#else
    6.11 -    /* Xen steals IRQ7 for PCI. Disable LPT1 by default. */
    6.12 -    for(i = 0; i < MAX_PARALLEL_PORTS; i++)
    6.13 -#endif
    6.14          parallel_devices[i][0] = '\0';
    6.15      parallel_device_index = 0;
    6.16