Could you detail why `pgoff = phys_addr >> PAGE_SHIFT`? Is that because each page has an ID which is stored in the first PAGE_SIZE bits of each page (and that the allocated data "begins" only after - this is how I understand it)? Or a similar reason? What if you do `pgoff = phys_addr` instead of `pgoff = phys_addr >> PAGE_SHIFT`?
HI Johannes, At 4:34, it's called a page table entry, right? 20 bits for the "page frame nr" that specific position for 12 bits "data" is locating at the physical ram, correct?
Can you give me some advice? I made a custom peripheral using a FPGA which is a soc. The peripheral is memory mapped. The peripheral also uses a BRAM peripheral which is close to the custom peripheral. I have to write a driver so i can easily control it. I was thinking to use this mmap method(the method in your video) to write to the BRAM and to use ioctl to set some status or control bits. Do i understand the application of this video well?
Thank you so much for this great tutorial
Could you detail why `pgoff = phys_addr >> PAGE_SHIFT`?
Is that because each page has an ID which is stored in the first PAGE_SIZE bits of each page (and that the allocated data "begins" only after - this is how I understand it)? Or a similar reason?
What if you do `pgoff = phys_addr` instead of `pgoff = phys_addr >> PAGE_SHIFT`?
HI Johannes,
At 4:34, it's called a page table entry, right? 20 bits for the "page frame nr" that specific position for 12 bits "data" is locating at the physical ram, correct?
Yes
hi at 6:11 what will be the problem ? if physically not contiguous memory ptr shared with user space.
Can you give me some advice? I made a custom peripheral using a FPGA which is a soc. The peripheral is memory mapped. The peripheral also uses a BRAM peripheral which is close to the custom peripheral. I have to write a driver so i can easily control it. I was thinking to use this mmap method(the method in your video) to write to the BRAM and to use ioctl to set some status or control bits. Do i understand the application of this video well?
Yes, this sounds like a good plan.
nice 8:00