VirtualBox

Changeset 33115 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Oct 13, 2010 8:13:45 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66647
Message:

LsiLogic: Implement enough of the FW Upload/Download requests to make OS X work

Location:
trunk/src/VBox/Devices/Storage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp

    r33031 r33115  
    923923            rc = lsilogicProcessConfigurationRequest(pLsiLogic, pConfigurationReq, &pReply->Configuration);
    924924            AssertRC(rc);
     925            break;
     926        }
     927        case MPT_MESSAGE_HDR_FUNCTION_FW_UPLOAD:
     928        {
     929            PMptFWUploadRequest pFWUploadReq = (PMptFWUploadRequest)pMessageHdr;
     930
     931            pReply->FWUpload.u8ImageType        = pFWUploadReq->u8ImageType;
     932            pReply->FWUpload.u8MessageLength    = 6;
     933            pReply->FWUpload.u32ActualImageSize = 0;
     934            break;
     935        }
     936        case MPT_MESSAGE_HDR_FUNCTION_FW_DOWNLOAD:
     937        {
     938            //PMptFWDownloadRequest pFWDownloadReq = (PMptFWDownloadRequest)pMessageHdr;
     939
     940            pReply->FWDownload.u8MessageLength    = 5;
    925941            break;
    926942        }
     
    35653581                break;
    35663582            case MPT_MESSAGE_HDR_FUNCTION_FW_DOWNLOAD:
    3567                 AssertMsgFailed(("todo\n"));
     3583                cbRequest = sizeof(MptFWDownloadRequest);
     3584                break;
     3585            case MPT_MESSAGE_HDR_FUNCTION_FW_UPLOAD:
     3586                cbRequest = sizeof(MptFWUploadRequest);
    35683587                break;
    35693588            default:
     
    36863705
    36873706            rc = pTaskState->pTargetDevice->pDrvSCSIConnector->pfnSCSIRequestSend(pTaskState->pTargetDevice->pDrvSCSIConnector,
    3688                                                                                     &pTaskState->PDMScsiRequest);
     3707                                                                                  &pTaskState->PDMScsiRequest);
    36893708            AssertMsgRCReturn(rc, ("Sending request to SCSI layer failed rc=%Rrc\n", rc), rc);
    36903709            return VINF_SUCCESS;
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.h

    r29588 r33115  
    226226#define MPT_MESSAGE_HDR_FUNCTION_TARGET_STATUS_SEND     (0x0C)
    227227#define MPT_MESSAGE_HDR_FUNCTION_TARGET_MODE_ABORT      (0x0D)
     228#define MPT_MESSAGE_HDR_FUNCTION_FW_UPLOAD              (0x12)
    228229
    229230#ifdef DEBUG
     
    627628
    628629/**
     630 * FW download request.
     631 */
     632#pragma pack(1)
     633typedef struct MptFWDownloadRequest
     634{
     635    /** Switch - Turns event notification on and off. */
     636    uint8_t     u8ImageType;
     637    /** Reserved. */
     638    uint8_t     u8Reserved1;
     639    /** Chain offset. */
     640    uint8_t     u8ChainOffset;
     641    /** Function number. */
     642    uint8_t     u8Function;
     643    /** Reserved. */
     644    uint8_t     u8Reserved2[3];
     645    /** Message flags. */
     646    uint8_t     u8MessageFlags;
     647    /** Message context ID. */
     648    uint32_t    u32MessageContext;
     649} MptFWDownloadRequest, *PMptFWDownloadRequest;
     650#pragma pack()
     651AssertCompileSize(MptFWDownloadRequest, 12);
     652
     653#define MPT_FW_DOWNLOAD_REQUEST_IMAGE_TYPE_RESERVED 0
     654#define MPT_FW_DOWNLOAD_REQUEST_IMAGE_TYPE_FIRMWARE 1
     655#define MPT_FW_DOWNLOAD_REQUEST_IMAGE_TYPE_MPI_BIOS 2
     656#define MPT_FW_DOWNLOAD_REQUEST_IMAGE_TYPE_NVDATA   3
     657
     658/**
     659 * FW download reply.
     660 */
     661#pragma pack(1)
     662typedef struct MptFWDownloadReply
     663{
     664    /** Reserved. */
     665    uint16_t    u16Reserved1;
     666    /** Message length. */
     667    uint8_t     u8MessageLength;
     668    /** Function number. */
     669    uint8_t     u8Function;
     670    /** Reserved. */
     671    uint8_t     u8Reserved2[3];
     672    /** Message flags. */
     673    uint8_t     u8MessageFlags;
     674    /** Message context ID. */
     675    uint32_t    u32MessageContext;
     676    /** Reserved. */
     677    uint16_t    u16Reserved2;
     678    /** IO controller status. */
     679    uint16_t    u16IOCStatus;
     680    /** IO controller log information. */
     681    uint32_t    u32IOCLogInfo;
     682} MptFWDownloadReply, *PMptFWDownloadReply;
     683#pragma pack()
     684AssertCompileSize(MptFWDownloadReply, 20);
     685
     686/**
     687 * FW upload request.
     688 */
     689#pragma pack(1)
     690typedef struct MptFWUploadRequest
     691{
     692    /** Requested image type. */
     693    uint8_t     u8ImageType;
     694    /** Reserved. */
     695    uint8_t     u8Reserved1;
     696    /** Chain offset. */
     697    uint8_t     u8ChainOffset;
     698    /** Function number. */
     699    uint8_t     u8Function;
     700    /** Reserved. */
     701    uint8_t     u8Reserved2[3];
     702    /** Message flags. */
     703    uint8_t     u8MessageFlags;
     704    /** Message context ID. */
     705    uint32_t    u32MessageContext;
     706} MptFWUploadRequest, *PMptFWUploadRequest;
     707#pragma pack()
     708AssertCompileSize(MptFWUploadRequest, 12);
     709
     710/**
     711 * FW upload reply.
     712 */
     713#pragma pack(1)
     714typedef struct MptFWUploadReply
     715{
     716    /** Image type. */
     717    uint8_t     u8ImageType;
     718    /** Reserved. */
     719    uint8_t     u8Reserved1;
     720    /** Message length. */
     721    uint8_t     u8MessageLength;
     722    /** Function number. */
     723    uint8_t     u8Function;
     724    /** Reserved. */
     725    uint8_t     u8Reserved2[3];
     726    /** Message flags. */
     727    uint8_t     u8MessageFlags;
     728    /** Message context ID. */
     729    uint32_t    u32MessageContext;
     730    /** Reserved. */
     731    uint16_t    u16Reserved2;
     732    /** IO controller status. */
     733    uint16_t    u16IOCStatus;
     734    /** IO controller log information. */
     735    uint32_t    u32IOCLogInfo;
     736    /** Uploaded image size. */
     737    uint32_t    u32ActualImageSize;
     738} MptFWUploadReply, *PMptFWUploadReply;
     739#pragma pack()
     740AssertCompileSize(MptFWUploadReply, 24);
     741
     742/**
    629743 * SCSI IO Request
    630744 */
     
    10131127    MptSCSITaskManagementRequest SCSITaskManagement;
    10141128    MptConfigurationRequest      Configuration;
     1129    MptFWDownloadRequest         FWDownload;
     1130    MptFWUploadRequest           FWUpload;
    10151131} MptRequestUnion, *PMptRequestUnion;
    10161132
     
    10311147    MptSCSITaskManagementReply SCSITaskManagement;
    10321148    MptConfigurationReply      Configuration;
     1149    MptFWDownloadReply         FWDownload;
     1150    MptFWUploadReply           FWUpload;
    10331151} MptReplyUnion, *PMptReplyUnion;
    10341152
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette