From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [62.140.7.102]) by mx.groups.io with SMTP id smtpd.web10.5996.1594966315009214279 for ; Thu, 16 Jul 2020 23:11:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=jvn6fDqz; spf=pass (domain: suse.com, ip: 62.140.7.102, mailfrom: glin@suse.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1594966312; 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=CWDUsIp2uI0EFZ/0jcCFxWlzoRfOF8AnCWjFlnzjw8M=; b=jvn6fDqzNE7FeB/ch/V7GEmrBnzxUC2gsJBe+MCM933g7ZSCWVtOGJQB/qE/ygwvTDcXjg enf9p71BR3s4AaZlND79SygLLElB8hT4C6ZfbvsyZDIbULohT4aOpBk5qM+zRcxRIUTfDC o+PeoWU7hS1YseUtTV7BSzwW/RyGcA8= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2111.outbound.protection.outlook.com [104.47.17.111]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-8-K1i2D26cNzu-h1mqIQ8nTQ-1; Fri, 17 Jul 2020 08:11:50 +0200 X-MC-Unique: K1i2D26cNzu-h1mqIQ8nTQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l/Oh8fqPKC0WHqXLNDu4WVMVtITGDRY55ywXL0GzqcStGkTDbevL1I9LpvreGCY9DEhEbeRreWyrhn2KKnUt8z18JEXy80yGzkcQhU4GR5UY7uPaDilZxdSP0HBWP7jzLjf0tlbohSSCkLmNuduzJnnZgkGIahkEdzJsRSuBm59oB2G+SS8ouLyJMNR4DK/kGyG13M/+srjhqFMEv5c4OwsTmpRYOk0hNZjG17Zn8IItP7wuFp05vB2SotgJ6Sl/TXS2axhMXe93205lo/qcgqP+HXFCa+tWLxtP6XtJEA+1HZIpX8oGPdDHVkZtR7PnnDdhxVahHiOmWW6czLv4TA== 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=jdg+vKyLGh8noiq1+b/Dwa7XlyRXjRLDEF9i/BYJ5dc=; b=PAihWddf+AuxxhK7On+0t42eE+2Z4oXHYPe/IEuGT5R+RtHEgX64KUpQHtxDPR+COZq2FE8Msv4EY3BQ/jniVVdommHLE5Urh4EmxVoT1RXijyhTeaU3QYPl1YYKDzd+c53d8e2b7kxZuiiwOMxbJCwwq7M8EFwGFJPw4BggUgNzIa+nOPlZ9tjNimbdN7Lfrxtex/jq3IICXFtjfHpUe7nQvzR54qb+vtOcmGVK1GlHvX62P7Cz5vdI6ehsnoSm3XMwJVFSA5C+/ZPoMCIFF18vl2HGcu5rFofEVNPetxVgP7K9m76ZI5tPQgty/rwkl1ZwAUczhfnsKMnLuTmhag== 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 AM0PR04MB4740.eurprd04.prod.outlook.com (2603:10a6:208:c8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17; Fri, 17 Jul 2020 06:11:49 +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; Fri, 17 Jul 2020 06:11:48 +0000 From: "Gary Lin" To: devel@edk2.groups.io CC: Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [PATCH v3 00/11] Introduce LsiScsi driver to OvmfPkg Date: Fri, 17 Jul 2020 14:11:19 +0800 Message-ID: <20200717061130.8881-1-glin@suse.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: AM0PR04CA0138.eurprd04.prod.outlook.com (2603:10a6:208:55::43) 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 AM0PR04CA0138.eurprd04.prod.outlook.com (2603:10a6:208:55::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.18 via Frontend Transport; Fri, 17 Jul 2020 06:11:47 +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: 50e29107-3248-4b87-8ae0-08d82a184a23 X-MS-TrafficTypeDiagnostic: AM0PR04MB4740: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RpZCkrM1RTrn12cYmh7hbBOw3trCnqJgzImRy/c5e4kd6QRCKJMz2w4tOrDSceGs/kImjm7Fw360IvjNZlxmEPhC7+Ie5uVl2O2jEBsGZvcQXzv7yFVZnAxs6sl2idqVzTbxA7dL7OBmBQjf9dziQkszEXiahKkhbTVkUxvd9U0JMqCOPQ3G8GHux+9pki5dPvb/WENQYyHg0PSinzGEr/mR5pFoLsf7/qo3Ll0lIDCu+1uDHhlFWipJJkSJ/JQt61gr/t9sbQ8WUHDUzPUBrjjbmn8MwG4f+dqNfcb0BXhP3tmBdLdkhdncJJLRvAa3/RL1brYUbNHkPTsMukyO+9Rf3xVIIPaqqY+HAlBqhKr2doeJdkbavey1zCtSWDyeH14duFeKa3YSzkB/cLj9Ej0l6MaBj7v5viH3IeShOWBVV4SeD7T/6OIwgW9xZRX0kPU2zlU0Ongoq1BbTQOzyA== 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:(39860400002)(136003)(396003)(376002)(346002)(366004)(55236004)(2906002)(186003)(1076003)(16526019)(66556008)(6506007)(66946007)(6486002)(8936002)(19627235002)(66476007)(54906003)(86362001)(6916009)(8676002)(26005)(83380400001)(5660300002)(6512007)(316002)(6666004)(52116002)(478600001)(956004)(36756003)(966005)(2616005)(4326008)(156123004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 90EYkNdu9FrPfS3K1vvwyzMEGzRx3g3ITbKtN8CBbQm28MZgQ/GzpTE6uZgdMqpvhTA8bHj4TWfAJAu3Q9S2l87iKjef3OobqnhJ8UBK0rNEWpVlsMV4VfZFr82fhKPvl5haAtPlHIecp63ZW9jO2ygaZ/iHwaRWAgH8W7dZKT0tk0RtZHTcLl2cgj+b50SlJdIzyxSFiLbJ3eil8XBfvhU5pa+3kb1HmGoZWdWonebRQZ0k8Kq55ainEamJV/8awdHiYinWqgQLg3NwND+ngpyuwCrqPPZ678p19BSkx78EoPJxR4XhsRDMmc3iGvuzQqqwBxl/SyouYK3C8JEt79U4zZ7jOFVeTv2TpPANTQg926Ia+nSGrZue17DYX36sM8wz23uXTc4YH0aCI81YU119h2SMkBaWHcRhCgBcMjvwnLTjtQoByHh2nsQjEnwb0TrzZU9f9RVJQWLb0vscySYSbsJYdBvkebBFrjfG7t2Pg218neWB/AGxm3mdY4JN X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50e29107-3248-4b87-8ae0-08d82a184a23 X-MS-Exchange-CrossTenant-AuthSource: AM0PR0402MB3809.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2020 06:11:48.8127 (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: 80UJnToxTrdHJSfi1cKSoKRksimT9+zcK7EwDKs00XzXc5y/LNbdfho7AqRUCdRD X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4740 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-v3 Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel v3: - Set DStat, SIst0, and SIst1 to 0 before using them - Amend the if statements for the DMA data instruction and add the assertions for the data direction - Also set SenseDataLength to 0 on the error path - Fix typos and amend comments - Squash "Calculate the transferred bytes" into "Process the SCSI Request Packet" - Amend the error handling of the calculation of transferred bytes - Squash the spurious newline 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 (11): 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 Maintainers.txt: Add Gary Lin as the reviewer for LsiScsi driver Maintainers.txt | 4 + OvmfPkg/Include/IndustryStandard/LsiScsi.h | 105 ++ OvmfPkg/LsiScsiDxe/LsiScsi.c | 1210 ++++++++++++++++++++ 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, 1596 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