mmap() with an offset > 32 bits on a 32-bit CPU

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

 



Hi Folks,

    I am trying to bring Xorg 7.x on PowerPC 440EPx Sequoia board, X is
configured to use sisfb for video and the sisfb is loaded properly in
kernel and registered as fb0, running X causes a machine check exception
/ BUS error by kernel.

     The reason for that is in :-

xorg/xorg-server/hw/xfree86/os-support/linux/lnx_video.c:558

X is doing the following :-

----
ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
fd = open("/dev/mem", O_RDWR);
          if (ioBase == NULL) {
                  ioBase = (volatile unsigned char *)mmap(0, 0x20000,
                                  PROT_READ | PROT_WRITE, MAP_SHARED,
                                 ioBase_phys);
----

the pci I/O memory in my case is 36-bits but the CPU is 32-bits so the
ioBase_phys is getting truncated as long is 32-bits and when later X try
to write to this address causes a BUS error.

Since i know the ioBase_phys address which is 0x1E8000000, I could hard
code it but the mmap(..) offset size is 32-bits as well, so I could not
pass it as an offset.

How would i pass a large offset to mmap on PPC32? is there any other way
to do it?

any help is highly appreciated.

thanks,
~basit




--
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