From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=68.65.120.143; helo=server175-2.web-hosting.com; envelope-from=rob@taglang.io; receiver=edk2-devel@lists.01.org Received: from server175-2.web-hosting.com (server175-2.web-hosting.com [68.65.120.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F1AE5226C7C56 for ; Tue, 3 Apr 2018 09:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=taglang.io; s=default; h=Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Cc: To:Subject:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DsbdUS+KCu2J8AQPjzGj8kLEkh98l6qcaAlEEqbh6UI=; b=Apdx2qMvbyeR+ev8DEoc5Tp5tl 88WSXEhS8rBIEOratsIIlHiCuyIJS63W6Lt6o3qCB8QAK4L5d/+hT9QnKJKT4d/kvjqMkiiYiGFqD NAUbw/AkXzSb0JNiM36hOF8atoadBgB+Gut92bdfdwuQvruHmJedIryAjGOgX0RJQ3dSKwCNdsCUc ofGip+IfbxKkPf6tjY5YBSrsfQBGSAWlCCpvySzd3RTH1ZiWej5OyJ5QQSCUWQloZpSKPj7u3jzkO UBZEqNP0rzBOmqcISofNJudI+CFYC1BmxdxLdBTKb0yzk1TiZMk8VfAf6oCo8YF4TZc716VwQu5k2 z3/22IJQ==; Received: from [38.125.194.115] (port=54438 helo=[10.2.0.136]) by server175.web-hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1f3P7C-002PHr-03; Tue, 03 Apr 2018 12:49:04 -0400 Date: Tue, 03 Apr 2018 12:48:49 -0400 From: Rob Taglang To: Laszlo Ersek Cc: Ruiyu Ni , edk2-devel@lists.01.org, Ming Huang , Star Zeng Message-Id: <1522774129.6404.2@server175.web-hosting.com> In-Reply-To: <1522770594.6404.1@server175.web-hosting.com> References: <1522707137.3698.1@server175.web-hosting.com> <1522768252.6404.0@server175.web-hosting.com> <1522770594.6404.1@server175.web-hosting.com> X-Mailer: pantheon-mail/1.0.6 MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server175.web-hosting.com X-AntiAbuse: Original Domain - lists.01.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - taglang.io X-Get-Message-Sender-Via: server175.web-hosting.com: authenticated_id: rob@taglang.io X-Authenticated-Sender: server175.web-hosting.com: rob@taglang.io X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Content-Filtered-By: Mailman/MimeDel 2.1.26 Subject: Re: OVMF UsbBulkTransfer returns EFI_OUT_OF_RESOURCES X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2018 16:49:48 -0000 Content-Type: text/plain; charset=us-ascii; format=flowed Hello, Thanks for you help, I got to the bottom of it. I was passing a pointer to an unsigned int (note, not UINTN) as the length. Some garbage in the top bits was getting shifted in and causing the calculated number of pages to be very large in RootBridgeIoMap, hence the OUT_OF_RESOURCES. Copying the length to a UINTN and passing a pointer to that variable works correctly. I must have just been getting lucky with the top bits being zeroed out when running on real hardware. Again thank you, -Rob On Tue, Apr 3, 2018 at 11:49 AM, Rob Taglang wrote: > My apologies, it looks like the first link got messed up: > https://sourceforge.net/projects/edk2/files/OVMF/OVMF-X64-r15214.zip/download > > -Rob > > On Tue, Apr 3, 2018 at 11:10 AM, Rob Taglang wrote: >> Hi Lazlo, >> >> I have tried this with both the very old OVMF-X64-r15214.zip hosted >> on SourceForge: >> edk2.git-ovmf-x64-0-20180226.b3485.gb1956b5d42.noarch.rpm >> >> And what I believe is the most recent OVMF hosted in the kraxel >> repo: edk2.git-ovmf-x64-0-20180226.b3485.gb1956b5d42.noarch.rpm >> >> And I see the same behavior in both. >> >> The USB device is a proprietary CDC_ACM device. I have tested on >> this motherboard: >> http://www.supermicro.com/products/motherboard/atom/x10/a1sri-2758f.cfm >> whose UEFI firmware does appear to be based on EDK and everything >> works as expected. >> >> Thanks, >> Rob >> >> On Tue, Apr 3, 2018 at 7:49 AM, Laszlo Ersek >> wrote: >>> Hi Rob, >>> >>> On 04/03/18 00:12, Rob Taglang wrote: >>>> Hello, >>>> >>>> I can pass a host USB device to QEMU boot with OVMF, and it shows >>>> up as >>>> a EFI_USB_IO_PROTOCOL device and the interface descriptors and >>>> endpoints >>>> are detected correctly. A UsbControlTransfer operation succeeds. >>>> However, UsbBulkTransfer returns EFI_OUT_OF_RESOURCES regardless >>>> of how >>>> much memory I allocate for QEMU. >>>> >>>> This application does work correctly on real hardware. Is this >>>> expected >>>> behavior in OVMF? >>> >>> I seem to recall recent patches for the core USB drivers in edk2 >>> that >>> modified various timeouts and transfer block sizes. For example: >>> >>> [edk2] [MdeModulePkg/Usb v2 0/1] Calculating the count of blocks >>> to >>> transfer >>> >>> Committed at >>> . >>> >>> Can you try a fresh edk2 build, and/or state git commit hashes at >>> which >>> the tree does or does not work for you? >>> >>> It would also be interesting to know the exact USB device (vendor, >>> model >>> etc) that produces this issue for you. Chances are the edk2 USB >>> drivers >>> would have the same issue if they encountered your device on the >>> bare >>> metal (i.e. with edk2 running as physical platform firmware). >>> >>> Thanks! >>> Laszlo >> >> >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > > > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel