Posts

Showing posts from September, 2019

Device Memory, MMIO and SSE instruction set

Introduction - This blogpost is going to summarized my recent research and idea between PCI Device, MMIO, SSE instruction set. Recently, I have a research topic that require to access and copy the device memory (BAR memory). For my previous knowledge , BAR memory is actually as same as the physical memory, but somehow it is mapped to the devices. However, I changed my thought after I met a problem when coping device memory by kernel optimized memcpy. I used memcpy for memory-mapped space, it all return 0xFF, however, it works great I copy it by normal pointer, it stimulate me to dig inside, what's happening. PCI Device A device that meet PCI specification, in PCI device spec, there's one great point that enable you could easier communicate with the device, it called Mapped Memory I/O, MMIO.  PCI device has it's own device memory and register inside the hardware, for the register is always responsible for communication from external device , like the device driv