-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
running on 64-bit raspbian #114
Comments
My first guess was that The structures are properly defined as 32bits and this should work on 32 and 64 bits. typedef struct {
uint32_t info, src, dst, length,
stride, next, pad[2];
} dma_cb_t;
struct ctl {
uint32_t sample[NUM_SAMPLES];
dma_cb_t cb[NUM_CBS];
}; Maybe you are running into some memory alignment issue. What is the exact error you are getting? When you said you traced it down, how did you do this? GDB? |
Combination of gdb and adding print statements.
|
Next step I think would be to enable debug and compare the output on 32bit and 64 bit: I am specifically curious to see if this worked and what the output looks like on 64bits compared to 32bits: /* Use the mailbox interface to the VC to ask for physical memory */
mbox.mem_ref = mem_alloc(mbox.handle, NUM_PAGES * PAGE_SIZE, PAGE_SIZE, mem_flag);
/* TODO: How do we know that succeeded? */
dprintf("mem_ref %u\n", mbox.mem_ref);
mbox.bus_addr = mem_lock(mbox.handle, mbox.mem_ref);
dprintf("bus_addr = %#x\n", mbox.bus_addr);
mbox.virt_addr = mapmem(BUS_TO_PHYS(mbox.bus_addr), NUM_PAGES * PAGE_SIZE);
dprintf("virt_addr %p\n", mbox.virt_addr); I also wonder how having the kernel in 64 bits affects the DMA controller and whether the DMA controller supports 64bits. If it does, we will need to also change the definition of |
I have DEBUG on as well, here's the output:
|
Thanks for sharing this. This looks good and the One possible next step is to look at other projects which use the DMA controller to PWM the pins. Looks like the guys over at pigpiod even have a label for 64bits issues. The two most interesting comments I see are:
Based on that you could try to reboot with |
There is a lot of time gone... What about a fix or anything in this direction? |
pi-blaster is crashing on 64-bit raspbian.
I've traced it down to to this line:
memset(ctl->sample, 0, sizeof(ctl->sample));
in
init_ctrl_data
Wondering if anyone is looking at 64-bit, or if not, any hints as to where I might go hunt for docs to figure out how to make it work.
Thanks.
The text was updated successfully, but these errors were encountered: