From owner-freebsd-amd64@FreeBSD.ORG Tue Feb 15 22:37:32 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECFA916A4CE for ; Tue, 15 Feb 2005 22:37:31 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 493FB43D2F for ; Tue, 15 Feb 2005 22:37:31 +0000 (GMT) (envelope-from zombyfork@gmail.com) Received: by rproxy.gmail.com with SMTP id a41so935579rng for ; Tue, 15 Feb 2005 14:37:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=FmpHuh4NmWxR8UVfXTrYG/wuS4yvHeBuzM5S7c8jwNorGWs5t4OUjL3I2nfy4eKebuKGATS24AbIXI+jj/dkTPmVaulktz38SCGtdyI42WxPe3cO0GsZDFISm34HbCLo1dZd5kMf00aqAXBMAv9t7Rpzy7DHzTlC3LWYlaYr1Aw= Received: by 10.38.59.3 with SMTP id h3mr167081rna; Tue, 15 Feb 2005 14:37:30 -0800 (PST) Received: by 10.38.22.22 with HTTP; Tue, 15 Feb 2005 14:37:30 -0800 (PST) Message-ID: <346a80220502151437627a9ef6@mail.gmail.com> Date: Tue, 15 Feb 2005 17:37:30 -0500 From: Coleman Kane To: Nicolas Blais In-Reply-To: <200502151659.42594.nb_root@videotron.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200502141722.10259.jhb@FreeBSD.org> <200502151659.42594.nb_root@videotron.ca> cc: freebsd-amd64@freebsd.org Subject: Re: [PATCH] Updated quirk-driven R3000Z patches X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: cokane@cokane.org List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 22:37:32 -0000 Hi, I tested the patch posted by John on a compaq R3000. Works great, except still requires device atpic (for the mixed_mode operation I think). Kim posted a patch in this email: http://lists.freebsd.org/pipermail/freebsd-amd64/2005-January/003376.html. I dunno if the patch is kosher or not, however. It does allow me to run without using atpic. -- coleman On Tue, 15 Feb 2005 16:59:41 -0500, Nicolas Blais wrote: > Hi, > > Thanks for the patch. Will this be MFC into -STABLE? > > Nicolas. > > On February 14, 2005 17:22, John Baldwin wrote: > > I've tweaked Jung-uk Kim's patches to be driven by a single ACPI quirk > > rather than multiple hints. I've included the patch below. If the quirk > > is not automatically detected on your laptop, you can manually set it from > > the loader via 'set debug.acpi.quirks=4'. If you have to manually set the > > quirk to get it to work, please let me know and include the FADT header > > from your acpidump in your reply, thanks. > > > > --- //depot/vendor/freebsd/src/sys/amd64/acpica/madt.c 2004/06/10 21:30:51 > > +++ //depot/user/jhb/acpipci/amd64/acpica/madt.c 2005/02/14 22:18:55 > > @@ -367,7 +367,7 @@ > > } > > > > /* First, we run through adding I/O APIC's. */ > > - if (madt->PCATCompat) > > + if (madt->PCATCompat && !(acpi_quirks & ACPI_Q_MADT_IRQ0)) > > ioapic_enable_mixed_mode(); > > madt_walk_table(madt_parse_apics, NULL); > > > > @@ -596,8 +596,14 @@ > > enum intr_polarity pol; > > char buf[64]; > > > > + if (acpi_quirks & ACPI_Q_MADT_IRQ0 && intr->Source == 0 && > > + intr->Interrupt == 2) { > > + if (bootverbose) > > + printf("MADT: Skipping timer override\n"); > > + return; > > + } > > if (bootverbose) > > - printf("MADT: intr override: source %u, irq %u\n", > > + printf("MADT: Interrupt override: source %u, irq %u\n", > > intr->Source, intr->Interrupt); > > KASSERT(intr->Bus == 0, ("bus for interrupt overrides must be zero")); > > if (madt_find_interrupt(intr->Interrupt, &new_ioapic, > > --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_quirks 2004/10/08 > > 18:00:57 +++ //depot/user/jhb/acpipci/dev/acpica/acpi_quirks 2005/02/14 > > 21:45:45 @@ -101,6 +101,13 @@ > > oem_rev: FADT <= 0x06040000 > > quirks: ACPI_Q_BROKEN > > > > +# Compaq R3000Z > > +name: Compaq_R3000Z > > +oem: FADT "NVIDIA" "CK8 " > > +oem_rev: FADT = 0x6040000 > > +creator: FADT "PTL_" > > +quirks: ACPI_Q_MADT_IRQ0 > > + > > # Compaq Thunder 05/18/99 > > # XXX Note creator rev should be "=", I think > > name: Compaq_Thunder > > --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_resource.c 2005/01/18 > > 20:25:37 +++ //depot/user/jhb/acpipci/dev/acpica/acpi_resource.c 2005/01/18 > > 23:04:51 @@ -77,6 +77,12 @@ > > req->counter++; > > break; > > } > > + if (irq != rman_get_start(req->res) && irq == 0) { > > + if (bootverbose) > > + printf("IRQ is %u, resource is %lu\n", irq, > > + rman_get_start(req->res)); > > + return (AE_CTRL_TERMINATE); > > + } > > req->found = 1; > > KASSERT(irq == rman_get_start(req->res), > > ("IRQ resources do not match")); > > --- //depot/vendor/freebsd/src/sys/dev/acpica/acpivar.h 2004/12/13 23:35:37 > > +++ //depot/user/jhb/acpipci/dev/acpica/acpivar.h 2005/02/11 19:51:51 > > @@ -160,11 +160,20 @@ > > #define ACPI_INTR_APIC 1 > > #define ACPI_INTR_SAPIC 2 > > > > -/* Quirk flags. */ > > +/* > > + * Quirk flags. > > + * > > + * ACPI_Q_BROKEN: Disables all ACPI support. > > + * ACPI_Q_TIMER: Disables support for the ACPI timer. > > + * ACPI_Q_MADT_IRQ0: Specifies that ISA IRQ 0 is wired up to pin 0 of the > > + * first APIC and that the MADT should force that by ignoring the PC-AT > > + * compatible flag and ignoring overrides that redirect IRQ 0 to pin 2. > > + */ > > extern int acpi_quirks; > > #define ACPI_Q_OK 0 > > -#define ACPI_Q_BROKEN (1 << 0) /* Disable ACPI completely. */ > > -#define ACPI_Q_TIMER (1 << 1) /* Disable ACPI timer. */ > > +#define ACPI_Q_BROKEN (1 << 0) > > +#define ACPI_Q_TIMER (1 << 1) > > +#define ACPI_Q_MADT_IRQ0 (1 << 2) > > > > /* > > * Note that the low ivar values are reserved to provide > > --- //depot/vendor/freebsd/src/sys/i386/acpica/madt.c 2004/06/10 20:05:33 > > +++ //depot/user/jhb/acpipci/i386/acpica/madt.c 2005/02/14 22:18:55 > > @@ -367,7 +367,7 @@ > > } > > > > /* First, we run through adding I/O APIC's. */ > > - if (madt->PCATCompat) > > + if (madt->PCATCompat && !(acpi_quirks & ACPI_Q_MADT_IRQ0)) > > ioapic_enable_mixed_mode(); > > madt_walk_table(madt_parse_apics, NULL); > > > > @@ -595,8 +595,14 @@ > > enum intr_polarity pol; > > char buf[64]; > > > > + if (acpi_quirks & ACPI_Q_MADT_IRQ0 && intr->Source == 0 && > > + intr->Interrupt == 2) { > > + if (bootverbose) > > + printf("MADT: Skipping timer override\n"); > > + return; > > + } > > if (bootverbose) > > - printf("MADT: intr override: source %u, irq %u\n", > > + printf("MADT: Interrupt override: source %u, irq %u\n", > > intr->Source, intr->Interrupt); > > KASSERT(intr->Bus == 0, ("bus for interrupt overrides must be zero")); > > if (madt_find_interrupt(intr->Interrupt, &new_ioapic, > > --- //depot/vendor/freebsd/src/sys/i386/i386/io_apic.c 2005/01/18 20:30:33 > > +++ //depot/user/jhb/acpipci/i386/i386/io_apic.c 2005/02/08 19:07:03 > > @@ -547,10 +547,11 @@ > > > > /* > > * Assume that pin 0 on the first I/O APIC is an ExtINT pin > > - * and that pins 1-15 are ISA interrupts. Assume that all > > + * if mixed mode is enabled and an ISA interrupt if not. > > + * Assume that pins 1-15 are ISA interrupts and that all > > * other pins are PCI interrupts. > > */ > > - if (intpin->io_vector == 0) > > + if (intpin->io_vector == 0 && mixed_mode_enabled) > > ioapic_set_extint(io, i); > > else if (intpin->io_vector < IOAPIC_ISA_INTS) { > > intpin->io_bus = APIC_BUS_ISA; > _______________________________________________ > freebsd-amd64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-amd64 > To unsubscribe, send any mail to "freebsd-amd64-unsubscribe@freebsd.org" >