Lines 35-40
Link Here
|
35 |
#include <asm/irq.h> |
35 |
#include <asm/irq.h> |
36 |
#include <asm/mpspec.h> |
36 |
#include <asm/mpspec.h> |
37 |
|
37 |
|
|
|
38 |
#include <linux/acpi.h> |
39 |
|
38 |
#ifdef CONFIG_X86_64 |
40 |
#ifdef CONFIG_X86_64 |
39 |
|
41 |
|
40 |
static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { } |
42 |
static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) { } |
Lines 438-464
Link Here
|
438 |
return 0; |
440 |
return 0; |
439 |
} |
441 |
} |
440 |
|
442 |
|
441 |
static unsigned long __init |
|
|
442 |
acpi_scan_rsdp ( |
443 |
unsigned long start, |
444 |
unsigned long length) |
445 |
{ |
446 |
unsigned long offset = 0; |
447 |
unsigned long sig_len = sizeof("RSD PTR ") - 1; |
448 |
|
449 |
/* |
450 |
* Scan all 16-byte boundaries of the physical memory region for the |
451 |
* RSDP signature. |
452 |
*/ |
453 |
for (offset = 0; offset < length; offset += 16) { |
454 |
if (strncmp((char *) (start + offset), "RSD PTR ", sig_len)) |
455 |
continue; |
456 |
return (start + offset); |
457 |
} |
458 |
|
459 |
return 0; |
460 |
} |
461 |
|
462 |
static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size) |
443 |
static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size) |
463 |
{ |
444 |
{ |
464 |
struct acpi_table_sbf *sb; |
445 |
struct acpi_table_sbf *sb; |
Lines 563-584
Link Here
|
563 |
acpi_find_rsdp (void) |
544 |
acpi_find_rsdp (void) |
564 |
{ |
545 |
{ |
565 |
unsigned long rsdp_phys = 0; |
546 |
unsigned long rsdp_phys = 0; |
566 |
|
547 |
struct acpi_pointer rsdp_address; |
567 |
if (efi_enabled) { |
548 |
acpi_status result; |
568 |
if (efi.acpi20) |
549 |
|
569 |
return __pa(efi.acpi20); |
550 |
result = acpi_os_get_root_pointer(ACPI_PHYSICAL_ADDRESSING,&rsdp_address); |
570 |
else if (efi.acpi) |
551 |
if (ACPI_FAILURE(result)){ |
571 |
return __pa(efi.acpi); |
552 |
return result; |
572 |
} |
553 |
} |
573 |
/* |
|
|
574 |
* Scan memory looking for the RSDP signature. First search EBDA (low |
575 |
* memory) paragraphs and then search upper memory (E0000-FFFFF). |
576 |
*/ |
577 |
rsdp_phys = acpi_scan_rsdp (0, 0x400); |
578 |
if (!rsdp_phys) |
579 |
rsdp_phys = acpi_scan_rsdp (0xE0000, 0xFFFFF); |
580 |
|
554 |
|
|
|
555 |
rsdp_phys = (unsigned long)rsdp_address.pointer.physical; |
556 |
if (!rsdp_phys) |
557 |
return 0; |
581 |
return rsdp_phys; |
558 |
return rsdp_phys; |
|
|
559 |
|
582 |
} |
560 |
} |
583 |
|
561 |
|
584 |
#ifdef CONFIG_X86_LOCAL_APIC |
562 |
#ifdef CONFIG_X86_LOCAL_APIC |