Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>

#include "mailbox.h"

Expand All @@ -59,7 +60,7 @@ void *mapmem(unsigned base, unsigned size)
printf("base=0x%x, mem=%p\n", base, mem);
#endif
if (mem == MAP_FAILED) {
printf("mmap error %d\n", (int)mem);
printf("mmap error %p\n", mem);
exit (-1);
}
close(mem_fd);
Expand Down
4 changes: 2 additions & 2 deletions wspr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ void getRealMemPageFromPool(void ** vAddr, void **bAddr) {
ABORT(-1);
}
unsigned offset = mbox.pool_cnt*4096;
*vAddr = (void*)(((unsigned)mbox.virt_addr) + offset);
*bAddr = (void*)(((unsigned)mbox.bus_addr) + offset);
*vAddr = (void*)(((uintptr_t)mbox.virt_addr) + offset);
*bAddr = (void*)(((uintptr_t)mbox.bus_addr) + offset);
//printf("getRealMemoryPageFromPool bus_addr=%x virt_addr=%x\n", (unsigned)*pAddr,(unsigned)*vAddr);
mbox.pool_cnt++;
}
Expand Down