From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [51.163.158.102]) by mx.groups.io with SMTP id smtpd.web11.10935.1594885590717221164 for ; Thu, 16 Jul 2020 00:46:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=LIeygiuT; spf=pass (domain: suse.com, ip: 51.163.158.102, mailfrom: glin@suse.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1594885589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aaqAwxptlAReQmsS5OdEATanDMJd5gZR7Kxygx5b2mc=; b=LIeygiuTB9svDWIf9/rx2xfYVJJkOC8qVhshPY29GZc2xFidpuFJno7/t1up2haWFQAKr/ /VZZkyCe7vpzQBu2s1YAiMg2KX/9vQl25+44m5FLbTh8fNaFC0A9Wma7QWM9kHTy6f217k +DJ6S8RIPuvd6KkjHjGKOet4Jbiqmzo= Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2057.outbound.protection.outlook.com [104.47.14.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-25-A3fLVxNRMG2ri88MxGBO1Q-1; Thu, 16 Jul 2020 09:46:27 +0200 X-MC-Unique: A3fLVxNRMG2ri88MxGBO1Q-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X7eDdeYlBYpTAM+rvZhsbwsI72MsYUr2UmBkuBqJgu0wGBZHi4V7TgbQNOiHWrZm2Zlfyrw5W1CB8PTXV5LhUPzD8+gHl7/8y92DTeRoikVCaEHRshmNyvDdDtpeFo3KumuqZPFse+lznCnui8u8vVM+rF+y6KAwT0dqKXDCF4ZWxMmNypqNt2XGqPj+gX6i+blINfWdVP/1Z/L27C4rUUoCvVlRLI0pSO/iiEsHK3bjHyqfvV92sy4ohwzmMai9cuFkGhfPB0hsAufzDiHCXnlwwHObTNndUbLy9kLCMMueAVupgcEMX8CHgZxosZlOPYnFRMeMzVE/LOIQi5+tNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ShMW8xc6AuiLMQNV3UCUoS5N6SSA78MBDWpmx7klRRo=; b=Ie1oSqzL8W4XlJwuyMJGqq25ixA4Mx6H2wLkp6gIrWFHRWFC2HxmNysL6ElInh3zGoIdCHqGPY2JpgzZ/cZR8LQTp9RltiNhF3C4mZkOTOIU1RWfupxYFgrHPnCp9pyo13MuHpWMFEfEcccbwufl7klMv3xZ6cvXa8vrbt1pUiMwoqe1+dPM8aKx56HRt8Gf7x70VUykugUus7rRowSUmJSvWfqJ7k3WBgrf4fVfz78gRkaZc0V5i6LtvYdJBogEXLlNJY5ukXn6M/qu3PD7xZx7o7Ojm8qmcSmuaegXK8yPnG5cY47bTV8j9TQ6kZrdK88oyZcoAUeCv301ZpUcBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=suse.com; Received: from AM0PR0402MB3809.eurprd04.prod.outlook.com (2603:10a6:208:10::30) by AM0PR04MB5122.eurprd04.prod.outlook.com (2603:10a6:208:ca::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.25; Thu, 16 Jul 2020 07:46:25 +0000 Received: from AM0PR0402MB3809.eurprd04.prod.outlook.com ([fe80::a14c:d441:c8a9:77ba]) by AM0PR0402MB3809.eurprd04.prod.outlook.com ([fe80::a14c:d441:c8a9:77ba%6]) with mapi id 15.20.3174.026; Thu, 16 Jul 2020 07:46:25 +0000 From: "Gary Lin" To: devel@edk2.groups.io CC: Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [PATCH v2 00/12] Introduce LsiScsi driver to OvmfPkg Date: Thu, 16 Jul 2020 15:45:55 +0800 Message-ID: <20200716074607.18048-1-glin@suse.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: AM3PR07CA0118.eurprd07.prod.outlook.com (2603:10a6:207:7::28) To AM0PR0402MB3809.eurprd04.prod.outlook.com (2603:10a6:208:10::30) Return-Path: glin@suse.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from GaryWorkstation.suse.cz (60.251.47.115) by AM3PR07CA0118.eurprd07.prod.outlook.com (2603:10a6:207:7::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17 via Frontend Transport; Thu, 16 Jul 2020 07:46:23 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [60.251.47.115] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5d3b0e1-cfb5-4a9e-f820-08d8295c5715 X-MS-TrafficTypeDiagnostic: AM0PR04MB5122: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7hlz3tWJoxvWn6yQBElm5G2tOvT740i5HfPKpShqN7vLmNx16MZv+duwQy72Pd0F67uIRllliK8hhPps60b+R02ZpjP1abXUFLCrtdlqLNcpmKZtOnWNLIetsTfcEtdKMt4TQQ4nVQhNTBCA8eHSP2gzs7T5e/3WV+OnnpOpMCKiHLeKgdmHl9tkGNx+o3y2ekNDHZoHVMdJJlyZzHYaxcfZcs0H2eiq1PEt54mV3ty5H1EBorBe4NNmd/ru5bF0EZxDhSMDXMJhruNBAwQYhiw9ub4THhWk65qzbJt2GxfbulbdOUEVAb7EJ1gTUHBYuYDXDFh0RfBxS2WaBgTy6TFj5m4dP1i3vJP25F9doXpe7KrH7KH5ZIR+mEFczK6UABjDPSSxC52Azcw1Tu1g68BPkL7QAXP1Bnu7hFGhFHFKHMF05a817pzOaZw0c/HC+pa2mb+kgLH6UjDe7sHPWg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR0402MB3809.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(396003)(366004)(39860400002)(346002)(136003)(19627235002)(55236004)(6506007)(4326008)(8936002)(6512007)(86362001)(83380400001)(8676002)(6486002)(1076003)(52116002)(6916009)(36756003)(66946007)(66556008)(956004)(966005)(478600001)(5660300002)(6666004)(26005)(2616005)(316002)(54906003)(66476007)(16526019)(2906002)(186003)(156123004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: eCaEoZD8Er9xWhrAHgtF74SYT88guw/NubuAjyxueYpmVcaekCWtr5fCaZU+VUiYXgxEKRDg9pqYfEqQwZPg/UmpuyomOkEfVYFg8g9n1eJjLc9q48XftsKT47SIctpqoc2vaoHoxLJZktN07s/e3+0z6gzM/3Bz7HV1utsNg4FpkVRLAELCHdkpn+uI48/MDZka8p4B+cClHLVSHwLxy/aAXrSzLeB04B7Fy5Tr22cfhA4tq0DnKR/iqqvod0GKHMtCzrkpdDnhDH7vmnRRlVgW1+6njDbAsCCwoEd8fTudENFhr4J2YDxzLDWTxRcEuNlqK2QTCizD6gib6V5cX5JRFu8tDBhus7BmAkTtm3B0HRGwWPvvqTC5W+IIsVtCqorcupQzGl71B8Ru0P5lhIicByUovBt5DCCPcXhHfliMgixw/nHhfLFiYzF72fBrBL//IQscyaJx2MckzpkMIZnnTj7xeEqHWGGHnFZmSks= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5d3b0e1-cfb5-4a9e-f820-08d8295c5715 X-MS-Exchange-CrossTenant-AuthSource: AM0PR0402MB3809.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2020 07:46:25.3079 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TTZ04tbk9KiEWIw4FDHZS1ack6WqkQbOpLc1L/YjLedRY/0QOXYKCdWbWatSiJor X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5122 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This patch series implement the driver for LSI 53C895A SCSI controller for OVMF so that the user can access the storage devices connected to QEMU "lsi" controller. The driver is disabled by default since LSI 53C895A is considered as a legacy device. To enable the driver, please add "-D LSI_SCSI_ENABLE" when building OvmfPkg. The patch series is also available in my git branch: https://github.com/lcp/edk2/tree/ovmf-lsi-v2 Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel v2: - Fix the mixed-case GUID string - Remove "STATIC" from LsiScsiControllerSupported() - Move the closing of PciIo protocol to the right patch - Add asserts for PcdLsiScsiMaxTargetLimit and PcdLsiScsiMaxLunLimit - Handle the "Target" array correctly - Use BITx macros for the bit constants - Replace 0x10000 with SIZE_64KB macro for the DMA buffer data array - Remove DUAL_ADDRESS_CYCLE from PciIo since we don't really need 64-bit DMA address - Fix a typo - Fix the coding style of the instructions for the script. - Improve the error handling in LsiScsiProcessRequest() - Calculate the transferred bytes after the execution of the script Gary Lin (12): OvmfPkg/LsiScsiDxe: Create the empty driver OvmfPkg/LsiScsiDxe: Install the skeleton of driver binding OvmfPkg/LsiScsiDxe: Report the name of the driver OvmfPkg/LsiScsiDxe: Probe PCI devices and look for LsiScsi OvmfPkg/LsiScsiDxe: Install stubbed EXT_SCSI_PASS_THRU OvmfPkg/LsiScsiDxe: Report Targets and LUNs OvmfPkg/LsiScsiDxe: Open PciIo protocol and initialize the device OvmfPkg/LsiScsiDxe: Map DMA buffer OvmfPkg/LsiScsiDxe: Examine the incoming SCSI Request Packet OvmfPkg/LsiScsiDxe: Process the SCSI Request Packet OvmfPkg/LsiScsiDxe: Calculate the transferred bytes Maintainers.txt: Add Gary Lin as the reviewer for LsiScsi driver Maintainers.txt | 4 + OvmfPkg/Include/IndustryStandard/LsiScsi.h | 105 ++ OvmfPkg/LsiScsiDxe/LsiScsi.c | 1188 ++++++++++++++++++++ OvmfPkg/LsiScsiDxe/LsiScsi.h | 202 ++++ OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf | 46 + OvmfPkg/OvmfPkg.dec | 8 + OvmfPkg/OvmfPkgIa32.dsc | 4 + OvmfPkg/OvmfPkgIa32.fdf | 3 + OvmfPkg/OvmfPkgIa32X64.dsc | 4 + OvmfPkg/OvmfPkgIa32X64.fdf | 3 + OvmfPkg/OvmfPkgX64.dsc | 4 + OvmfPkg/OvmfPkgX64.fdf | 3 + 12 files changed, 1574 insertions(+) create mode 100644 OvmfPkg/Include/IndustryStandard/LsiScsi.h create mode 100644 OvmfPkg/LsiScsiDxe/LsiScsi.c create mode 100644 OvmfPkg/LsiScsiDxe/LsiScsi.h create mode 100644 OvmfPkg/LsiScsiDxe/LsiScsiDxe.inf --=20 2.25.1