[SeaBIOS] [PATCH] mpt-scsi: Align MPT request to 8 bytes

Kevin O'Connor kevin at koconnor.net
Fri Nov 30 20:20:07 CET 2018

On Wed, Nov 28, 2018 at 05:50:01PM +0200, Liran Alon wrote:
> From: Nikita Leshchenko <nikita.leshchenko at oracle.com>
> When mpt-scsi receives a SCSI message, it wraps it in a MPT request
> message and writes it's address to an IO port to be added to the
> request queue.
> This MPT request is allocated on the stack. Previous to this commit,
> the request is aligned to 4 bytes. However, VirtualBox LSI53c1030
> device emulation aligns the request address to 8 bytes.
> Therefore, this commit change alignment of request to 8 bytes.
> VirtualBox source code which handles this is at
> Devices/Storage/DevLsiLogicSCSI.cpp. lsilogicRegisterWrite()
> LSILOGIC_REG_REQUEST_QUEUE handler adds the request to the
> queue (pRequestQueueBase). lsilogicR3Worker() reads request from
> pRequestQueueBase and aligns it to 8 bytes
> (u32RequestMessageFrameDesc & ~0x07).

Thanks.  Is this change done to match virtualbox, or because it fixes
some type of problem?


More information about the SeaBIOS mailing list