Skip to contentSkip to conversation

Addressing PCI memory

DISCUSSION Amelia De Vivo 1 participant 1 message May 16, 2001

lore
Share & tools
lore
#0 lore raw

----- Original Message -----
From: ashish anand <[email protected]>
To: Amelia De Vivo <[email protected]>; <[email protected]>
Sent: Wednesday, May 16, 2001 6:40 PM
Subject: Re: Addressing PCI memory

Quoted 3 lines
Quoted 2 lines · Amelia De Vivo

Hi all, I'm trying to write a driver for a 64 bit PCI device. Something

like

Quoted 11 lines
Quoted 9 lines

this works well under i386 Linux, but it doesn't work at all for Linux 2.2.15 by Yellow Dog:

    struct pci_dev *dev = NULL;
    dev = pci_find_device(vendor, device, dev);
    pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &cards[0].addr0);
    cards[0].vaddr = (void *) ioremap((cards[0].addr0 &
PCI_BASE_ADDRESS_MEM_MASK), cards[0].size);
    writeb('A',(cards[0].vaddr)+0x1000);

READ PCI STATUS REGISTER TO CHECK FOR ANY MASTER/TARGET ABORT.

Thanks for your reply.
I read the pci status register and there wasn't any master/target abort

Quoted 1 line

LASTLY WHAT IS THE VALUE OF cards[0].size ?

This is 0x2000000

Quoted 4 lines
Quoted 2 lines

I have a kernel panic on writeb. Has someone some suggestion?

LET ME KNOW THE PANIC MESSAGE....

kernel panic: machine check

Quoted 4 lines
Quoted 4 lines

Thanks in advance

Amelia

Bye Amelia

Quoted 2 lines
Quoted 1 line

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/