On 05-08-15 12:05, Gene Cumm wrote:> > I recompiled with this in mk/devel.mk <http://devel.mk>: > > GCCWARN += -DDEBUG_PORT=0x2f8 -DCORE_DEBUG=1 > > 0x2f8 is a BIOSism.Is this a problem? The example in the comments said 0x3f8 which is COM1.
On Wed, Aug 5, 2015 at 8:06 AM, Oscar Roozen <oscar.roozen at brightcomputing.com> wrote:> On 05-08-15 12:05, Gene Cumm wrote: >> >> > I recompiled with this in mk/devel.mk <http://devel.mk>: >> > GCCWARN += -DDEBUG_PORT=0x2f8 -DCORE_DEBUG=1 >> >> 0x2f8 is a BIOSism.> Is this a problem? The example in the comments said 0x3f8 which is COM1.It means that a BIOS IO port for a UART won't work for EFI. No value for DEBUG_PORT will do anything unless someone's got some translation "glue" to take the attempts to open the UART and use an EFI handle instead. -- -Gene
On 05-08-15 15:28, Gene Cumm wrote:>>> 0x2f8 is a BIOSism. > >> Is this a problem? The example in the comments said 0x3f8 which is COM1. > > It means that a BIOS IO port for a UART won't work for EFI. No value > for DEBUG_PORT will do anything unless someone's got some translation > "glue" to take the attempts to open the UART and use an EFI handle > instead.That's weird, since enabling this finally got me some debugging output from dprintf(). I think I'm being lucky here! HP apparently provides the necessary glue. What would be the correct way to enable debugging under EFI? Normal printf output remains invisible, so DEBUG_STDIO doesn't work. If there is nothing yet, I think a wrapper around printf (and *prinf) is needed. This should [v]sprintf() to a buffer and then print the resulting buffer using APrint("%a", buffer) if EFI_BUILD is defined.
>>>> On 05-08-15 12:05, Gene Cumm wrote: >> >>? > I recompiled with this in mk/devel.mk <http://devel.mk>: >>? >? GCCWARN += -DDEBUG_PORT=0x2f8 -DCORE_DEBUG=1 >> >> 0x2f8 is a BIOSism. > Is this a problem? The example in the comments said 0x3f8 which is COM1. It means that a BIOS IO port for a UART won't work for EFI.? No value for DEBUG_PORT will do anything unless someone's got some translation "glue" to take the attempts to open the UART and use an EFI handle instead. -- -Gene <<< Weird as it sounds I was able to send debug info to COM2 (redirected to a pipe) on EFI64 VMware workstation clients. I got the debug messages on a terminal emulator pointing to the pipe. It does work. Best Patrick