Hi Eugene, you are right. I will take your comments in account and fix TemplateSerialPortLib. Thanks, Olivier
________________________________________ From: Eugene Khoruzhenko [[email protected]] Sent: 26 October 2012 20:00 To: [email protected] Subject: Re: [edk2] Serial Protocol Implementation in BeagleBoardPkg I think there are also the following cosmetic issues in TemplateSerialPortLib.c: 1. The type of SerialPortGetControl is RETURN_STATUS, but it returns EFI_SUCCESS, it should return RETURN_SUCCESS. 2. The type of SerialPortPoll is BOOLEAN, so it should return TRUE/FALSE, not 0. Regards, Eugene Khoruzhenko Principal Software Architect Phoenix Technologies Ltd. (425) 443-3883 From: Eugene Khoruzhenko Sent: Friday, October 26, 2012 11:45 AM To: [email protected] Subject: RE: [edk2] Serial Protocol Implementation in BeagleBoardPkg Hi Olivier, It looks like there is a bug in this commit (13773). The SerialPortGetControl (OUT *Control) function must return something in its Control argument. As is, the function just returns SUCCESS and Control has garbage, which causes ConIn to intermittently fail. I think the SerialPortExtLib routines should be cloned from TemplateSerialPortLib, so that SerialPortPoll() would actually be used: RETURN_STATUS EFIAPI SerialPortGetControl ( OUT UINT32 *Control ) { if (SerialPortPoll ()) { // If a character is pending don't set EFI_SERIAL_INPUT_BUFFER_EMPTY. *Control = EFI_SERIAL_OUTPUT_BUFFER_EMPTY; } else { *Control = EFI_SERIAL_INPUT_BUFFER_EMPTY | EFI_SERIAL_OUTPUT_BUFFER_EMPTY; } return RETURN_SUCCESS; } Also, I think SerialPortSetControl () should return UNSUPPORTED: RETURN_STATUS EFIAPI SerialPortSetControl ( IN UINT32 Control ) { return RETURN_UNSUPPORTED; } Regards, Eugene Khoruzhenko Principal Software Architect Phoenix Technologies Ltd. (425) 443-3883 From: Hutcheson, Alex M. [mailto:[email protected]] Sent: Friday, August 10, 2012 9:47 AM To: [email protected]<mailto:[email protected]> Subject: Re: [edk2] Serial Protocol Implementation in BeagleBoardPkg Olivier, Thanks, didn’t realize a fix was already in the works. Will the new code also add support for UART2 and UART3 on the BeagleBoard? Thanks, Alex From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Olivier Martin Sent: Friday, August 10, 2012 11:56 AM To: [email protected]<mailto:[email protected]> Subject: Re: [edk2] Serial Protocol Implementation in BeagleBoardPkg Hello Alex, I am planning to push some code (probably next week) to add support for SerialSetAttributes()/SerialSetControl()/SerialGetControl() in EmbeddedPkg/SerialDxe through a new library (probably ‘SerialPortExtLib’). I have this change in our internal repository for a while, I just need to port it to the BeagleBoard and push it. Otherwise as temporary workaround you could change the Omap35xxPkg/Library/SerialPortLib to set your needed baud rate in the function SerialPortInitialize(). Thanks, Olivier From: Hutcheson, Alex M. [mailto:[email protected]]<mailto:[mailto:[email protected]]> Sent: 08 August 2012 19:55 To: [email protected]<mailto:[email protected]> Subject: [edk2] Serial Protocol Implementation in BeagleBoardPkg Hello, I am running the UEFI build from the BeagleBoardPkg on my BeagleBoard, and I am trying to use the EFI_SERIAL_IO_PROTOCOL to communicate via the RS-232 connection on the board. I am connecting to a device with a lower baud rate than the 115200 baud default, so I am calling the SERIAL_IO_PROTOCOL->SetAttributes function to alter the baud rate. However, this function fails with the EFI_UNSUPPORTED error code, which I assume means it is not implemented. Currently, I am making due with some low-level hacking (setting the UART register bits from within my application), but I would be interested in using my solution to implement SetAttributes so other people can benefit. However, I am not that familiar with the overall architecture of TianoCore, and I can’t figure out how I would go about doing this. What files would I need to edit in order to allow the UART devices to support this function from the SERIAL_IO_PROTOCOL? Thanks, Alex Alex Hutcheson | SAIC ------------------------------------------------------------------------------ The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
