Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43078
b: refs/heads/master
c: bd472c7
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Andi Kleen committed Dec 7, 2006
1 parent 87ad24c commit 312a50d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da181a8b3916aa7f2e3c5775d2bd2fe3454cf82d
refs/heads/master: bd472c794bbf6771c3fc1c58f188bc16c393d2fe
10 changes: 9 additions & 1 deletion trunk/arch/i386/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/mm.h>
#include <linux/efi.h>
#include <linux/pfn.h>
#include <linux/uaccess.h>

#include <asm/pgtable.h>
#include <asm/page.h>
Expand Down Expand Up @@ -155,7 +156,14 @@ static struct resource standard_io_resources[] = { {
.flags = IORESOURCE_BUSY | IORESOURCE_IO
} };

#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
static int romsignature(const unsigned char *x)
{
unsigned short sig;
int ret = 0;
if (probe_kernel_address((const unsigned short *)x, sig) == 0)
ret = (sig == 0xaa55);
return ret;
}

static int __init romchecksum(unsigned char *rom, unsigned long length)
{
Expand Down
11 changes: 9 additions & 2 deletions trunk/arch/i386/pci/pcbios.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include "pci.h"
#include "pci-functions.h"

Expand Down Expand Up @@ -314,6 +315,10 @@ static struct pci_raw_ops * __devinit pci_find_bios(void)
for (check = (union bios32 *) __va(0xe0000);
check <= (union bios32 *) __va(0xffff0);
++check) {
long sig;
if (probe_kernel_address(&check->fields.signature, sig))
continue;

if (check->fields.signature != BIOS32_SIGNATURE)
continue;
length = check->fields.length * 16;
Expand All @@ -331,11 +336,13 @@ static struct pci_raw_ops * __devinit pci_find_bios(void)
}
DBG("PCI: BIOS32 Service Directory structure at 0x%p\n", check);
if (check->fields.entry >= 0x100000) {
printk("PCI: BIOS32 entry (0x%p) in high memory, cannot use.\n", check);
printk("PCI: BIOS32 entry (0x%p) in high memory, "
"cannot use.\n", check);
return NULL;
} else {
unsigned long bios32_entry = check->fields.entry;
DBG("PCI: BIOS32 Service Directory entry at 0x%lx\n", bios32_entry);
DBG("PCI: BIOS32 Service Directory entry at 0x%lx\n",
bios32_entry);
bios32_indirect.address = bios32_entry + PAGE_OFFSET;
if (check_pcibios())
return &pci_bios_access;
Expand Down

0 comments on commit 312a50d

Please sign in to comment.