Allocated kernel memory not page aligned??...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm building a PCI driver and I'm in a fight with memory
functions...maybe you can help me win?

Here's the idea/problem:

---
pciaddr = pci_resource_start(pcidev, 2);
pcilen = pci_resource_len(pcidev, 2);
---

That will, from BAR 2, give me the start address and length of my pci
device memory.

Now let's map this memory into kernel space (nocache):

---
kernaddr = ioremap_nocache(pciaddr, pcilen);
---

This should give me a _page aligned_ address in kernel virtual memory right?

Still, I get kernaddr to be 0xF9282800, which is *half way* a 4K sized
page! How can this be? I t should be page aligned shouldn't it?

Can somebody help me? Thanks.

-Kris

PS. Extra information:

pciaddr = 0xFEAFF800
pcilen = 0x00000400

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux