public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Fw: [PATCH]: Correctly locate RSDP in EBDA
@ 2005-07-25 22:13 Andrew Morton
       [not found] ` <20050725151313.730257bd.akpm-3NddpPZAyC0@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-07-25 22:13 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Udo A. Steinberg

[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]



Begin forwarded message:

Date: Wed, 20 Jul 2005 17:42:07 +0200
From: "Udo A. Steinberg" <us15-IG//nw+yl+iQIjdd1DhZXWfrygkm6VTR@public.gmane.org>
To: Linux Kernel Mailing List <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH]: Correctly locate RSDP in EBDA



ACPI spec. states that the location of the RSDP structure is found by searching
* The first 1 KB of the Extended BIOS Data Area (EBDA).
* The BIOS read-only memory space between 0E0000h and 0FFFFFh

The EBDA scan looks wrong. The patch below against 2.6.12 should correct this.

-Udo.

---

Calculate correct EBDA address for ACPI RSDP scan. The word at BIOS Data Area
40:0E is the segment address of the EBDA.

Signed-off-by: Udo A. Steinberg <us15-IG//nw+yl+iQIjdd1DhZXWfrygkm6VTR@public.gmane.org>

--- linux-2.6.12/arch/i386/kernel/acpi/boot.c.old       2005-07-20 17:28:32.000000000 +0200
+++ linux-2.6.12/arch/i386/kernel/acpi/boot.c   2005-07-20 17:31:15.000000000 +0200
@@ -648,7 +648,7 @@
         * Scan memory looking for the RSDP signature. First search EBDA (low
         * memory) paragraphs and then search upper memory (E0000-FFFFF).
         */
-       rsdp_phys = acpi_scan_rsdp (0, 0x400);
+       rsdp_phys = acpi_scan_rsdp (*(u16*) 0x40E << 4, 0x400);
        if (!rsdp_phys)
                rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000);
 


[-- Attachment #2: 00000000.mimetmp --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Fw: [PATCH]: Correctly locate RSDP in EBDA
@ 2005-07-25 22:19 Moore, Robert
  0 siblings, 0 replies; 3+ messages in thread
From: Moore, Robert @ 2005-07-25 22:19 UTC (permalink / raw)
  To: Andrew Morton, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Udo A. Steinberg, Alexey Starikovskiy, Brown, Len

There are two versions of this code in Linux, the ACPICA version and the
version in boot.c. It is very cumbersome to maintain two versions of
this sensitive code, and the version in boot.c should be removed.  The
ACPICA version (in tbxfroot.c) already handles EBDA and bad checksums
correctly.

Bob Moore


> -----Original Message-----
> From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Andrew Morton
> Sent: Monday, July 25, 2005 3:13 PM
> To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Cc: Udo A. Steinberg
> Subject: [ACPI] Fw: [PATCH]: Correctly locate RSDP in EBDA
> 
> 
> 
> Begin forwarded message:
> 
> Date: Wed, 20 Jul 2005 17:42:07 +0200
> From: "Udo A. Steinberg" <us15-IG//nw+yl+iQIjdd1DhZXWfrygkm6VTR@public.gmane.org>
> To: Linux Kernel Mailing List <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
> Subject: [PATCH]: Correctly locate RSDP in EBDA
> 
> 
> 
> ACPI spec. states that the location of the RSDP structure is found by
> searching
> * The first 1 KB of the Extended BIOS Data Area (EBDA).
> * The BIOS read-only memory space between 0E0000h and 0FFFFFh
> 
> The EBDA scan looks wrong. The patch below against 2.6.12 should
correct
> this.
> 
> -Udo.
> 
> ---
> 
> Calculate correct EBDA address for ACPI RSDP scan. The word at BIOS
Data
> Area
> 40:0E is the segment address of the EBDA.
> 
> Signed-off-by: Udo A. Steinberg <us15-IG//nw+yl+iQIjdd1DhZXWfrygkm6VTR@public.gmane.org>
> 
> --- linux-2.6.12/arch/i386/kernel/acpi/boot.c.old       2005-07-20
> 17:28:32.000000000 +0200
> +++ linux-2.6.12/arch/i386/kernel/acpi/boot.c   2005-07-20
> 17:31:15.000000000 +0200
> @@ -648,7 +648,7 @@
>          * Scan memory looking for the RSDP signature. First search
EBDA
> (low
>          * memory) paragraphs and then search upper memory
(E0000-FFFFF).
>          */
> -       rsdp_phys = acpi_scan_rsdp (0, 0x400);
> +       rsdp_phys = acpi_scan_rsdp (*(u16*) 0x40E << 4, 0x400);
>         if (!rsdp_phys)
>                 rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000);
> 



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: [PATCH]: Correctly locate RSDP in EBDA
       [not found] ` <20050725151313.730257bd.akpm-3NddpPZAyC0@public.gmane.org>
@ 2005-07-26  9:53   ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2005-07-26  9:53 UTC (permalink / raw)
  To: Andrew Morton
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Udo A. Steinberg

On Llu, 2005-07-25 at 15:13 -0700, Andrew Morton wrote:
>          * Scan memory looking for the RSDP signature. First search EBDA (low
>          * memory) paragraphs and then search upper memory (E0000-FFFFF).
>          */
> -       rsdp_phys = acpi_scan_rsdp (0, 0x400);
> +       rsdp_phys = acpi_scan_rsdp (*(u16*) 0x40E << 4, 0x400);

Close but no cookie. You need to read 0x40E from physical memory not
kernel virtual address space. It may also be zero which indicates that
there isn't an EBDA, sometimes interpreted as an EBDA in the top 1K or
so.




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-26  9:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-25 22:13 Fw: [PATCH]: Correctly locate RSDP in EBDA Andrew Morton
     [not found] ` <20050725151313.730257bd.akpm-3NddpPZAyC0@public.gmane.org>
2005-07-26  9:53   ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2005-07-25 22:19 Moore, Robert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox