Re: [PATCH 5/6] x86/microcode/intel_staging: Support mailbox data transfer

From: Chang S. Bae
Date: Thu Mar 20 2025 - 19:43:39 EST


On 2/18/2025 12:54 PM, Dave Hansen wrote:

BTW, is this kind of read/write normal for MMIO reads? It looks really
goofy to me, but I don't deal with devices much.

Yeah, looking at some device code, functions like memcpy_toio() and __iowrite*_copy() seem to assume sufficient MMIO space to copy data from kernel memory. I also noticed that some other mailbox code calls back one of these functions.

So, I think your assessment is correct:

> To me, it's much more akin to talking over a serial port than how I
> think of devices attached via MMIO.

Certainly, this staging mailbox looks somewhat similar to a serial port. I suspect the staging portion is quite resource-limited. That appears to be one of key characteristics of this interface, which I should highlight more comprehensively.

Thanks,
Chang