public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew de Quincey <adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
To: thunder7-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Located the problem with the VIA KT400 board
Date: Mon, 14 Jul 2003 02:08:07 +0100	[thread overview]
Message-ID: <200307140208.07975.adq_dvb@lidskialf.net> (raw)
In-Reply-To: <200307140051.29231.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>

Hi, I think I've just spotted the problem, and unfortunately, I think it is an 
AML problem.

When your board boots, several devices are configured without IRQs set (i.e. 
the IRQ returned by _CRS is 0) (I think this is called "boot disabled 
devices"). They have a list of possible IRQs (all of them > 15) in _PRS.

The linux code for setting an IRQ is in 
drivers/acpi/pci_link.c/acpi_pci_link_set().
Theres a wee fix to make in here for my patch for the polarity etc, but your 
problem is when it creates the resource entry to send to the _SRS method.

It does something like:
if (irq <= 15) {
  ... create an IRQ resource
} else {
  ... create an extended IRQ resource
}

However, the _SRS code in your BIOS has the following for the relevant 
devices:

            Method(_SRS, 1) {
                CreateByteField(Arg0, 0x1, IRD1)
                CreateByteField(Arg0, 0x2, IRD2)
                ShiftLeft(IRD2, 0x8, Local0)
                Or(Local0, IRD1, Local0)
                Store(0x0, Local1)
                ShiftRight(Local0, 0x1, Local0)
                While(LGreater(Local0, 0x0)) {
                    Increment(Local1)
                    ShiftRight(Local0, 0x1, Local0)
                }
                And(PIRD, 0xf, PIRD)
                ShiftLeft(Local1, 0x4, Local1)
                Or(PIRD, Local1, PIRD)
            }

This assumes the resource passed to it is a normal IRQ resource, and cannot 
cope with extended ones. It only checks bytes 1&2 of the argument. For an 
extended argument, it would have to check bytes 5,6,7,8.

In linux, the call to acpi_pci_link_set() from acpi_pci_link_check() does not 
check the return status of the call. Otherwise this error would be detected.



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1

  parent reply	other threads:[~2003-07-14  1:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200307122352.45704.adq_dvb@lidskialf.net>
     [not found] ` <200307122352.45704.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
2003-07-13  1:18   ` Possible quick fix for ACPI routing problem on Nforce2 Andrew de Quincey
     [not found]     ` <200307130218.44398.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
2003-07-13  5:39       ` Jurriaan
     [not found]         ` <20030713053913.GB1284-4cpIIuwL6H0O5nXqB3HebLNAH6kLmebB@public.gmane.org>
2003-07-13 16:52           ` Andrew de Quincey
2003-07-13 19:35           ` Andrew de Quincey
2003-07-13 23:51           ` Andrew de Quincey
     [not found]             ` <200307140051.29231.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
2003-07-14  1:08               ` Andrew de Quincey [this message]
     [not found]                 ` <200307140208.07975.adq_dvb-fmPXVN3awWJAJAzL26g0SA@public.gmane.org>
2003-07-14 15:32                   ` Located the problem with the VIA KT400 board hgfelger-9nAOAgdJVo4b1SvskN2V4Q
     [not found]                     ` <Pine.LNX.4.33.0307141730001.1166-100000-KnfdeQs3A3X/9pzu0YdTqQ@public.gmane.org>
2003-07-14 15:53                       ` Andrew de Quincey
2003-07-13  9:19       ` Re: Possible quick fix for ACPI routing problem on Nforce2 liste-9nAOAgdJVo4b1SvskN2V4Q
     [not found]         ` <Pine.LNX.4.33.0307131118210.561-100000-KnfdeQs3A3X/9pzu0YdTqQ@public.gmane.org>
2003-07-13 13:11           ` Andrew de Quincey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200307140208.07975.adq_dvb@lidskialf.net \
    --to=adq_dvb-fmpxvn3awwjajazl26g0sa@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=thunder7-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox