Hi Andrew,

Thanks for the reply.

Looking forward for your update on this.

Thanks,
Naresh

-----Original Message-----
From: [email protected]
[mailto:[email protected]] 
Sent: Saturday, July 21, 2012 3:23 AM
To: [email protected]
Subject: edk2-devel Digest, Vol 31, Issue 52

Send edk2-devel mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/edk2-devel
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of edk2-devel digest..."


Today's Topics:

   1. Reg: SMST->SmmRegisterProtocolNotify() (Naresh Kollu.)
   2. Reg : : GDB for ARM (Satheesh B R)
   3. Re: Reg : : GDB for ARM (Andrew Fish)
   4. Re: Reg: SMST->SmmRegisterProtocolNotify() (Andrew Fish)
   5. How to get PCI Slot number in UEI Driver. (Prakash, Sathya)


----------------------------------------------------------------------

Message: 1
Date: Fri, 20 Jul 2012 12:41:46 +0530
From: "Naresh Kollu." <[email protected]>
Subject: [edk2] Reg: SMST->SmmRegisterProtocolNotify()
To: <[email protected]>
Message-ID:
        
<[email protected]>
Content-Type: text/plain;       charset="US-ASCII"

Hi All,

I am writing a Library of DXE_SMM_DRIVER type. In Library constructor,
"SMST->SmmRegisterProtocolNotify()" is used to register notification
function for Protocol gEtiSmmguid(for example).

This library is included in one SMM driver. In entry point of driver,
some of the  condition checks are failing so ERROR status is returned
from Entry point. As ERROR status is returned from entry point, image is
getting unloaded from memory. 

When gEtiSmmguid is installed in some other SMM driver, system is
hanging as it is looking for Registered context and could not find it as
the driver has already been unloaded.

For DXE case, I use Library destructor to close the registered/created
event but I don't find any way for SMM case.

Is there any way to unregister the function which was registered with
SMST->SmmRegisterProtocolNotify() ?

Please give your suggestions.

Note: Returning EFI_SUCCESS from entry point of the driver where the
library is included resolves the issue but I am looking for a better
solution.

Thanks,
Naresh



------------------------------

Message: 2
Date: Fri, 20 Jul 2012 18:54:04 +0530
From: "Satheesh B R" <[email protected]>
Subject: [edk2] Reg : : GDB for ARM
To: <[email protected]>
Message-ID:
        
<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"


Hi Andrew,

         Even on using 'add-symbol-file' command I am just able to get
the values of global variables. What should be done for inserting
breakpoints, printing local variables etc .. Could you please guide me.

Thanks and Regards
Satheesh.B.R

>Message: 3
>Date: Thu, 19 Jul 2012 09:33:37 -0700
>From: Andrew Fish <[email protected]>
>Subject: Re: [edk2] Reg : : GDB for ARM
>To: [email protected]
>Message-ID: <[email protected]>
>Content-Type: text/plain; charset="us-ascii"

>I think you want to use the add-symbol-file command. This loads
symbols. The file command tries to load an executable and run it, I
don't >think that works across the remote connection. 

>Andrew Fish





>On Jul 18, 2012, at 11:42 PM, Satheesh B R wrote:

> Hi All
> 
>        I am trying to debug the DXE driver remotely. I use X-86 GDB of

> my host machine(Ubuntu) to debug the target(BeagleBoard Rev C4) 
> connected by serial port.
> 
> I have done the following :
> 
>     Connect the host and target using serial cable.
> 
>     Booting to the shell in the target machine(GdbStub has been added
in the boot file).
> 
>     In host establishing the connection by command "target remote
/dev/ttyUSB0" in gdb.
> 
>     "cd" to the directory where the 'dll' of DXE driver present.
> 
>      Adding symbol file using the command "file DRIVER_NAME.dll "
> 
>      Now on giving the "run" command I get
> 
>            <workroot>/DRIVER_NAME.dll : cannot execute binary file
>            <workroot>/DRIVER_NAME.dll : Success 
>             During startup program exited with code 126.
> 
>       Am I following the correct procedure.Please help me with the
same.
> 
> Thanks and Regards
> Satheesh.B.R


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3592 bytes
Desc: not available

------------------------------

Message: 3
Date: Fri, 20 Jul 2012 07:03:38 -0700
From: Andrew Fish <[email protected]>
Subject: Re: [edk2] Reg : : GDB for ARM
To: Satheesh B R <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Assuming you got the load address correct, and the data at the globals
look correct it should just work. 

Google/Bing gdb tutorial

You should be able to run the backtrace command and see the stack frame.
You can only see locals for the frame that your are currently in,
assuming the compiler has not optimized the value into a register. 

The only difference between remote and local debugging with gdb is you
don't use the file and run commands, and for EFI you use add-symbol-file
to get symbols loaded. Note you need to add-symbol-file for every module
to get full source level debug. 

Andrew Fish


On Jul 20, 2012, at 6:24 AM, Satheesh B R wrote:

> 
> Hi Andrew,
> 
>          Even on using 'add-symbol-file' command I am just able to get
the values of global variables. What should be done for inserting
breakpoints, printing local variables etc .. Could you please guide me.
> 
> Thanks and Regards
> Satheesh.B.R
> 
> >Message: 3
> >Date: Thu, 19 Jul 2012 09:33:37 -0700
> >From: Andrew Fish <[email protected]>
> >Subject: Re: [edk2] Reg : : GDB for ARM
> >To: [email protected]
> >Message-ID: <[email protected]>
> >Content-Type: text/plain; charset="us-ascii"
> 
> >I think you want to use the add-symbol-file command. This loads
symbols. The file command tries to load an executable and run it, I
don't >think that works across the remote connection.
> 
> >Andrew Fish
> 
> 
> 
> 
> 
> >On Jul 18, 2012, at 11:42 PM, Satheesh B R wrote:
> 
> > Hi All
> >
> >        I am trying to debug the DXE driver remotely. I use X-86 GDB 
> > of my host machine(Ubuntu) to debug the target(BeagleBoard Rev C4) 
> > connected by serial port.
> >
> > I have done the following :
> >
> >     Connect the host and target using serial cable.
> >
> >     Booting to the shell in the target machine(GdbStub has been
added in the boot file).
> >
> >     In host establishing the connection by command "target remote
/dev/ttyUSB0" in gdb.
> >
> >     "cd" to the directory where the 'dll' of DXE driver present.
> >
> >      Adding symbol file using the command "file DRIVER_NAME.dll "
> >
> >      Now on giving the "run" command I get
> >
> >            <workroot>/DRIVER_NAME.dll : cannot execute binary file
> >            <workroot>/DRIVER_NAME.dll : Success
> >             During startup program exited with code 126.
> >
> >       Am I following the correct procedure.Please help me with the
same.
> >
> > Thanks and Regards
> > Satheesh.B.R
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 4
Date: Fri, 20 Jul 2012 07:20:50 -0700
From: Andrew Fish <[email protected]>
Subject: Re: [edk2] Reg: SMST->SmmRegisterProtocolNotify()
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; CHARSET=US-ASCII


On Jul 20, 2012, at 12:11 AM, Naresh Kollu. wrote:

> Hi All,
> 
> I am writing a Library of DXE_SMM_DRIVER type. In Library constructor,

> "SMST->SmmRegisterProtocolNotify()" is used to register notification 
> function for Protocol gEtiSmmguid(for example).
> 
> This library is included in one SMM driver. In entry point of driver, 
> some of the  condition checks are failing so ERROR status is returned 
> from Entry point. As ERROR status is returned from entry point, image 
> is getting unloaded from memory.
> 
> When gEtiSmmguid is installed in some other SMM driver, system is 
> hanging as it is looking for Registered context and could not find it 
> as the driver has already been unloaded.
> 
> For DXE case, I use Library destructor to close the registered/created

> event but I don't find any way for SMM case.
> 
> Is there any way to unregister the function which was registered with
> SMST->SmmRegisterProtocolNotify() ?
> 
> Please give your suggestions.
> 
> Note: Returning EFI_SUCCESS from entry point of the driver where the 
> library is included resolves the issue but I am looking for a better 
> solution.
> 

I don't see a better way to do this? I'm at the UEFI summit in Redmond
today, so I'll ask around to see if there is a better solution. 

> Thanks,
> Naresh
> 
> ----------------------------------------------------------------------
> --------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. 
> Discussions will include endpoint security, mobile security and the 
> latest in malware threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel




------------------------------

Message: 5
Date: Fri, 20 Jul 2012 15:52:53 -0600
From: "Prakash, Sathya" <[email protected]>
Subject: [edk2] How to get PCI Slot number in UEI Driver.
To: "[email protected]"
        <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="us-ascii"

I need to get the information of the slot in which my controller is
connected and what I was trying is to use SMBIOS system configuration
table. But when my driver is loaded from OptionROM the table was not
populated, but If I load the driver from shell I am able to get the
information. Do any of you know another method to get PCI Slot
information from boot services driver?

Thanks
Sathya



------------------------------

------------------------------------------------------------------------
------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

------------------------------

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel


End of edk2-devel Digest, Vol 31, Issue 52
******************************************

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to