All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: linux-acpi@vger.kernel.org, "Len Brown" <lenb@kernel.org>,
	"Heinz Diehl" <htd@fritha.org>,
	"Martin Peres" <martin.peres@labri.fr>,
	"Heinz Diehl" <htd@fancy-poultry.org>,
	"David Airlie" <airlied@linux.ie>,
	"Ben Skeggs" <bskeggs@redhat.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Paweł Sikora" <pawel.sikora@agmk.net>
Subject: Re: Linux 3.7-rc1 (nouveau_bios_score oops).
Date: Sun, 21 Oct 2012 07:38:58 -0700	[thread overview]
Message-ID: <CA+55aFzYDY0FLGhVevqv9Gk0bnJnM4r13=JzWDO9hdySi8zFoA@mail.gmail.com> (raw)
In-Reply-To: <20121021120901.GA22587@joi.lan>

On Sun, Oct 21, 2012 at 5:09 AM, Marcin Slusarz
<marcin.slusarz@gmail.com> wrote:
>
> This looks like ACPI bug...

I'm _shocked_ to hear that firmware would be fragile.

Anyway, here's the #1 thing to keep in mind about firmware:

 - firmware is *always* buggy.

It's that simple. Don't expect anything else. Firmware is written by
people who have lost the will to live (why? Because they do firmware
development for a living), and the only thing keeping them going is
the drugs. And they're not the "fun" kind of drugs. The end result is
predictable. In their drug-induced haze, they make a mess.

So saying "ACPI is buggy" is like saying "water is wet". Deal with it.

> Nouveau calls this method: [...]
>
> with Arg0 == 0, Arg1 == 3 and gets:
>
> ACPI Error: Field [ROMI] Base+Offset+Width 0+24+1 is beyond end of region [VROM] (length 24) (20120913/exfldio-210)
> ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEGR.GFX0._ROM] (Node ffff88033e47fe88), AE_AML_REGION_LIMIT (20120913/psparse-536)
>
> We can workaround it by aligning Arg1 to 4096 (I'm wondering what is the minimal
> value), but do we really have to?

Yes, you really have to. You need to understand that ACPI has been
tested with one thing, and one thing only: Windows. Clearly windows
doesn't ask for some three-byte region. So it doesn't work. Big
surprise. Untested code written by monkeys on crack - what did you
expect?

So don't do "clever" things. When it comes to firmware, you need to
expect it to be buggy, and try to access it the way Windows accesses
it.

Now, whether Windows realy always does things with a 4kB-aligned
access, or whether you just need to make sure that you're (say)
4-byte-aligned, I don't know. Maybe doing things four (or eight, or
sixteen) bytes at a time will work. You can try. But if we know from
past experience that a 4kB block-size will work, I'd suggest just
saying

  "It's stupid, but stupid is good - we're working with firmware"

Think of firmware the way you think of hardware: it's buggy and needs
workarounds.

                Linus

  parent reply	other threads:[~2012-10-21 14:39 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  7:32 Linux 3.7-rc1 (nouveau_bios_score oops) Paweł Sikora
2012-10-19 21:25 ` Linus Torvalds
2012-10-19 22:41   ` Martin Peres
2012-10-19 22:52     ` Linus Torvalds
2012-10-20  9:26   ` Heinz Diehl
2012-10-20  9:40     ` Martin Peres
2012-10-20 10:42       ` Heinz Diehl
2012-10-20 20:28         ` Marcin Slusarz
2012-10-20 20:28           ` Marcin Slusarz
2012-10-20 20:35           ` Marcin Slusarz
2012-10-20 21:20           ` Heinz Diehl
2012-10-20 21:42             ` Marcin Slusarz
2012-10-20 21:45               ` Marcin Slusarz
2012-10-21  8:54               ` Heinz Diehl
2012-10-20 22:19             ` Marcin Slusarz
2012-10-21  6:58               ` Paweł Sikora
2012-10-21  9:26                 ` Heinz Diehl
2012-10-21 12:09                 ` Marcin Slusarz
2012-10-21 12:09                   ` Marcin Slusarz
2012-10-21 13:31                   ` Heinz Diehl
2012-10-21 14:38                   ` Linus Torvalds [this message]
2012-10-21 14:49                     ` Marcin Slusarz
2012-10-21 17:13                       ` Linus Torvalds
2012-10-21 20:07                       ` Lekensteyn
2012-10-22  0:07               ` Ben Skeggs
2012-10-22  0:07                 ` Ben Skeggs
2012-10-25 17:53       ` Paweł Sikora
2012-10-25 18:06         ` Heinz Diehl
2012-10-26 19:51           ` Paweł Sikora
     [not found] ` <1437818.9jlLBUTXHL@al>
     [not found]   ` <20121021090310.GB2403@fritha.org>
     [not found]     ` <20121021090310.GB2403-iEI8Y0CNJBYdnm+yROfE0A@public.gmane.org>
2012-10-21 10:33       ` Lekensteyn

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='CA+55aFzYDY0FLGhVevqv9Gk0bnJnM4r13=JzWDO9hdySi8zFoA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=htd@fancy-poultry.org \
    --cc=htd@fritha.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=martin.peres@labri.fr \
    --cc=pawel.sikora@agmk.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.