From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in5.apple.com (mail-out5.apple.com [17.151.62.27]) (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 5979482124 for ; Wed, 8 Feb 2017 17:04:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1486602279; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jdSDs4PdHsRfqJk5C8DLklYyYPj0+72Xd1qv38goIdw=; b=rsbsVRoon7QWnT2ZLpmbTwIWTddokWDe9Zq6fr7fRStY3m2yap64cjke1DFJyW+C ZluLwOWebJE+525M1XtUDNy1puc3P0mxZZNYnYVGyozfE85/VU5znVOIggbew7XH 9oz0B0R2nBF0Erx/oXoMz84jURqULSkt8Y6q2PN1RVPwKhPmDbWhZrR3LVGCNhWA UyiYuIIYAR7dVIluWGeSiq0mbkDhkGXIUeWORy8aMt45neYoKaIZ049z8Guo9J3q pgGS4SuCBM15Pxcxt5gdq0n0b0MKnCPUnDXUVmIWys6NilkPtTQP0uPNdapgqU5V 1bSTrNC6/tPaUQo9kDcktQ==; Received: from relay6.apple.com (relay6.apple.com [17.128.113.90]) by mail-in5.apple.com (Apple Secure Mail Relay) with SMTP id DD.7F.21821.620CB985; Wed, 8 Feb 2017 17:04:39 -0800 (PST) X-AuditID: 11973e13-695109a00000553d-14-589bc0270554 Received: from nwk-mmpp-sz11.apple.com (nwk-mmpp-sz11.apple.com [17.128.115.155]) by relay6.apple.com (Apple SCV relay) with SMTP id 81.62.00867.620CB985; Wed, 8 Feb 2017 17:04:38 -0800 (PST) MIME-version: 1.0 Received: from [17.114.152.165] (unknown [17.114.152.165]) by nwk-mmpp-sz11.apple.com (Oracle Communications Messaging Server 8.0.1.2.0 64bit (built Dec 14 2016)) with ESMTPSA id <0OL3004AV1MVX070@nwk-mmpp-sz11.apple.com>; Wed, 08 Feb 2017 17:04:38 -0800 (PST) Sender: afish@apple.com From: Andrew Fish Message-id: <765376CE-F36F-4A4F-9FB5-DDA7EC6B9975@apple.com> Date: Wed, 08 Feb 2017 17:04:38 -0800 In-reply-to: <18d9b9ba-f95d-1445-0842-9915c72be92a@cmlab.biz> Cc: "edk2-devel@ml01.01.org" To: "David A. Van Arnem" References: <4a3de604-5e60-7ed2-e520-29ab6b551c33@cmlab.biz> <18d9b9ba-f95d-1445-0842-9915c72be92a@cmlab.biz> X-Mailer: Apple Mail (2.3226) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCLMWRmVeSWpSXmKPExsUi2FAYpat+YHaEwaSbTBaL1khZrNvzjd2B yePE1wCPSRceMwcwRXHZpKTmZJalFunbJXBlnJp5lqVg9yrGii+/VzI1MP6dwtjFyMkhIWAi se7vcdYuRi4OIYG9jBLPHixjh0n83z8DKnGIUeLOq5dgCV4BQYkfk++xgNjMAmESc1dcZoYo 6mGS+HH/HNhYYQFxiXdnNjGD2GwCyhIr5n+AaraROL1iDRtEjabE2gN3mUBsFgFVidbb/8Bq OAVsJVb8+8MOscBU4vTnPWAzRQT0JJYseQu1bBGjxJurq4GaOYBOlZWY/csLJC4hcIZNYtvU iSwTGIVmITl2FpJjIWwtie+PWoHiHEC2vMTB87IQYU2JZ/c+sUPY2hJP3l1gXcDItopRKDcx M0c3M89UL7GgICdVLzk/dxMjKBqm2wnvYDy9yuoQowAHoxIP7wXr2RFCrIllxZW5hxilOViU xHn5TWZGCAmkJ5akZqemFqQWxReV5qQWH2Jk4uCUamDcbPNTx3F5UM/ZxXd8Jlr8cH/vlHh/ zdE7RdW//xomTGhQEJV8NG9Z4hPHfWt6otQlnm696K8gZ2j1UDrbVPG4/64XXW84jeev9nXe 7yTsuUmmuup3L6sFp4FWwc8pzrucj++eq8A3YVUB69Eaw/1l57IVtMw5MkLYLdJNL99bk+E/ WTx/pb0SS3FGoqEWc1FxIgCG7oR1ZwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFIsWRmVeSWpSXmKPExsUi2FA8W1ftwOwIg8MzzS0WrZGyWLfnG7sD k8eJrwEeky48Zg5giuKySUnNySxLLdK3S+DKODXzLEvB7lWMFV9+r2RqYPw7hbGLkZNDQsBE 4v/+GawQtpjEhXvr2boYuTiEBA4xStx59ZIdJMErICjxY/I9FhCbWSBMYu6Ky8wQRT1MEj/u nwObJCwgLvHuzCZmEJtNQFlixfwPUM02EqdXrGGDqNGUWHvgLhOIzSKgKtF6+x9YDaeArcSK f3/YIRaYSpz+vAdspoiAnsSSJW+hli1ilHhzdTVQMwfQqbISs395TWAUmIXkvllI7oOwtSS+ P2oFinMA2fISB8/LQoQ1JZ7d+8QOYWtLPHl3gXUBI9sqRoGi1JzESjO9xIKCnFS95PzcTYzg oC6M2sHYsNzqEKMAB6MSD+8F69kRQqyJZcWVucBA4mBWEuEt3QQU4k1JrKxKLcqPLyrNSS0+ xDiREejJicxSosn5wJjLK4k3NDExMDE2NjM2Njcxp6Wwkjiv5/4ZEUIC6YklqdmpqQWpRTBH MXFwSjUwlinorVse9vvA6aka922mf398a+NFhY9PUjU+2Tfu/6rDZFGx1EsycH8T0723Es1+ T9d+ZZr0qn1jv11swj+t4EcTQ7IvSwh4H41wd7F6/HW96Kc7IW6XD/h0la66YPO5/ttlXt9/ bIF9MVyhFz93CHM3MHldTX7gaLRqJruy3w/W6S/niVg8UGIpzkg01GIuKk4EALm12DndAgAA X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: Print from DXE_DRIVER X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2017 01:04:39 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Feb 8, 2017, at 4:49 PM, David A. Van Arnem wrote: > > > > On 02/08/2017 05:43 PM, Andrew Fish wrote: >> >>> On Feb 8, 2017, at 2:10 PM, David A. Van Arnem > wrote: >>> > > > >>> When I load the driver from the shell (load .efi), I get a >>> message indicating it loaded successfully, but no output from the >>> Print() messages. >> >> You should be able to use shell commands to see if you driver is connected. > > dh output does show my .efi at the end which I think > indicates it is connected. > dh is just showing handles and protocols not what happened with Driver Binding. So likely you are seeing that your driver got loaded. Run `drivers` or `devtree` to see the results of the connect. >> >>> The documentation for the shell says load should test >>> both the Supported() and Start() functions, so I would expect to see the >>> output, but I am not sure I am using the correct library instances to >>> accomplish this. Is it possible to use Print() from a DXE_DRIVER, and >>> which library instance should I use in the UefiCpuPkg.dsc file? >> >> Print() is part of the UefiLib. The PrintLib vends sprintf kinds of things. >> >>> If not, >>> would changing it to a UEFI_DRIVER help? Any other recommendations? >>> >> >> If you are publishing driver binding protocol you should be UEFI_DRIVER, if possible. >> >>> If there is an example in edk2 that does this that you could point me >>> to, that would be sufficient as well. Thanks! >>> >> >> If you want to write directly to the UEFI Console you can try this. Place it in the entry point of your driver in case you have some bug that is preventing your from registering the Driver Binding Protocol. >> >> gST->ConOut->OutputString (gST->ConOut, L"Hello World\n\r"); >> >> Make sure you use L"" vs "" as Print takes a CHAR16 and %s also default to CHAR16 (not ASCII) > Here is a write up on how Print is different than printf. https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/PrintLib.h#L26 Thanks, Andrew Fish > I will try that, thank you! > > Regards, > David > >> >> >> >> Thanks, >> >> Andrew Fish >> >> >>> -- >>> Regards, >>> David Van Arnem >>> Development Engineer IV >>> Computer Measurement Laboratory, LLC >>> >>> _______________________________________________ >>> 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 >> > > -- > Regards, > David Van Arnem > Development Engineer IV > Computer Measurement Laboratory, LLC