Because you are using SerialDxe (see
'VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)'), ensure you have the
following drivers in your DSC and FDF files:
- MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
- MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
- MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

ConSplitterDxe is the driver that will set gST->ConOut in this scenario.

Olivier


> -----Original Message-----
> From: Bhupesh Sharma [mailto:bhupesh.sha...@freescale.com]
> Sent: 02 December 2013 11:09
> To: Olivier Martin; 'Andrew Fish'; 'edk2-devel@lists.sourceforge.net'
> Subject: gST->ConOut is NULL and Timer issues (Was: RE: SerialPrint not
> working in DxeServicesLib.c)
> 
> Hi,
> 
> I managed to trace down the issues with my UEFI ported code for a
> Cortex-A9 MP core based SoC.
> 
> I see two issues (after solving a few on the way) on which I cannot
> seem to make any headway.
> 
> 1. gST->ConOut is NULL causing the Print routines inside
> StartDefaultBootOnTimeout
> 
> (https://github.com/tianocore/edk2/blob/master/ArmPlatformPkg/Bds/Bds.c
> #L327), to not print
>   anything on the UART console.
> 
>   - At first, I suspected this to be an issue with my .dsc file as I
> don't have a LCD available on my SoC
>     and I had serial port as well as (a left over) LCD configured as
> SIMPLE TEXT protocols for ConOut.
>     I have hence changed my .dsc to something like:
> 
>   # Use the serial console for both ConIn & ConOut
>   gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-
> 971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi();"
>   gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-
> 971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi()"
> 
>   However, still I see that gST->ConOut is NULL (via the DS-5 source
> debugger).
> 
> 2. Timer support in UEFI:
> 
>  - For every BoardPkg (e.g. ArmPlatformPkg/SP804, BeagleBoardPkg and
> Samsung etc), I can see that there are two Timer helper layers:
> 
>       # [1] Timer Dxe Driver:
> 
>       https://github.com/tianocore/edk2/tree/master/ArmPlatformPkg/Driv
> ers/SP804TimerDxe
> 
>       # [2] Timer Lib:
> 
>       https://github.com/tianocore/edk2/tree/master/ArmPlatformPkg/Libr
> ary/SP804TimerLib
> 
> 
>       When I start to look at this code it seems that the UEFI code
> requires support for atleast 2 timers: Performance Timer (used in [1])
>       and another free SoC timer which is used to provide delays ([2]).
> 
>       Is this understanding correct? Does UEFI require atleast 2 timers
> to be supported by the SoC and are these timers used in parallel
>       by the UEFI framework?
> 
> Thanks for any pointers on the above two aspects.
> 
> Regards,
> Bhupesh
> 
> 
> > -----Original Message-----
> > From: Sharma Bhupesh-B45370
> > Sent: Tuesday, November 26, 2013 5:02 PM
> > To: Olivier Martin; 'Andrew Fish'; edk2-devel@lists.sourceforge.net
> > Cc: Kushwaha Prabhakar-B32579
> > Subject: RE: SerialPrint not working in DxeServicesLib.c
> >
> > Hi Olivier,
> >
> > Thanks for your mail.
> >
> > I have a SerialPortLib which tries to configure Serial controller
> > specific to my board (so *no* 'SerialPortLib' pointing to
> > 'MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf'
> > in my DSC).
> >
> > I am getting the UEFI firmware .. banner at the very start.
> >
> > I will now try to add some SerialPortWrite() before calling
> > GetSectionFromAnyFv().
> >
> > Regards,
> > Bhupesh
> >
> >
> > > -----Original Message-----
> > > From: Olivier Martin [mailto:olivier.mar...@arm.com]
> > > Sent: Tuesday, November 26, 2013 4:27 PM
> > > To: Sharma Bhupesh-B45370; 'Andrew Fish'; edk2-
> > > de...@lists.sourceforge.net
> > > Cc: Kushwaha Prabhakar-B32579
> > > Subject: RE: SerialPrint not working in DxeServicesLib.c
> > >
> > > Sorry to not reply earlier, I was on holiday in the last two weeks.
> > >
> > > If you do not see any output from the serial, ensure your are using
> > > the appropriate 'SerialPortLib'.
> > > Check in your DSC file, there is no 'SerialPortLib' pointing to
> > > 'MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf'.
> > > Example:
> > >
> > > [LibraryClasses.common]
> > >   (...)
> > >
> > >
> SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNu
> > > SerialPortLib|ll
> > > SerialPortLib|.inf
> > >   (...)
> > >
> > > SerialPortLib should use the implementation for your Serial
> controller.
> > >
> > > Try also to add some SerialPortWrite() before calling
> > > GetSectionFromAnyFv().
> > > I would not be surprised if the crash happens much earlier than the
> > > DXE phase.
> > >
> > >
> > > > -----Original Message-----
> > > > From: Bhupesh Sharma [mailto:bhupesh.sha...@freescale.com]
> > > > Sent: 20 November 2013 11:50
> > > > To: 'Andrew Fish'; 'edk2-devel@lists.sourceforge.net'; Olivier
> > > > Martin
> > > > Cc: Prabhakar Kushwaha
> > > > Subject: RE: SerialPrint not working in DxeServicesLib.c
> > > >
> > > > I don't know why but I didn't get any mail from the mail list
> server
> > > > for my original mail below, though I can see same in the mail
> list
> > > > archives.
> > > >
> > > > Adding Andrew..
> > > >
> > > > Can you guys please help me with the issue mentioned below.
> > > >
> > > > Regards,
> > > > Bhupesh
> > > >
> > > > > -----Original Message-----
> > > > > From: Sharma Bhupesh-B45370
> > > > > Sent: Tuesday, November 19, 2013 4:25 PM
> > > > > To: 'edk2-devel@lists.sourceforge.net'; 'Olivier Martin'
> > > > > Cc: 'boot-architect...@lists.linaro.org'; Kushwaha
> > > > > Prabhakar-B32579
> > > > > Subject: SerialPrint not working in DxeServicesLib.c
> > > > >
> > > > > Hi List,
> > > > >
> > > > > I am experiencing a Data Abort inside function
> > 'GetSectionFromAnyFv'
> > > > in
> > > > > file 'DxeServicesLib.c'
> > > > > on my ARMv7 UEFI platform.
> > > > >
> > > > > To debug the same I added some print messages like:
> > > > >
> > > > > /* Added for debugging */
> > > > >   CHAR8                         Buffer1[100];
> > > > >   UINTN                         CharCount;
> > > > >   CharCount = AsciiSPrint (Buffer1,sizeof (Buffer1),"Inside
> > > > Func\n\r");
> > > > >   SerialPortWrite ((UINT8 *) Buffer1, CharCount);
> > > > >
> > > > >
> > > > > And also something like:
> > > > >   SerialPrint ("Inside Func\n\r");
> > > > >
> > > > > I have included:
> > > > > #include <Library/PrintLib.h>
> > > > > #include <Library/SerialPortLib.h>
> > > > >
> > > > > and defined:
> > > > >
> > > > > #define SerialPrint(txt)  SerialPortWrite ((UINT8*)(txt),
> > > > > AsciiStrLen(txt)+1);
> > > > >
> > > > > I still cannot see any debug prints on the UART (placed right
> > > > > after
> > > > the
> > > > > entry point of 'GetSectionFromAnyFv' function).
> > > > > Debugger (DS-5) suggests that the crash is inside
> > > > 'GetSectionFromAnyFv'
> > > > > itself.
> > > > >
> > > > > I get the UEFI firmware <version xx built at xx on xx) and Data
> > > > > Abort Exception PC at xx prints on the console, but no prints
> from
> > > > > 'DxeServicesLib.c'
> > > > >
> > > > > Any pointers to what I may be missing here.
> > > > >
> > > > > Regards,
> > > > > Bhupesh
> > > >
> > > >
> > >
> > >
> > >
> > >
> 
> 





------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to