Re: [edk2] [MdePkg Maintainer] .DEC questions

Subject: Re: [edk2] [MdePkg Maintainer] .DEC questions

From: "Kinney, Michael D" <michael.d.kinney@intel.com>

To: Andrew Fish <afish@apple.com>, "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>, "Kinney, Michael D" <michael.d.kinney@intel.com>

Date: 2013-06-26 08:07:07

Andrew,

Good questions.

1) I agree with your observations on the GUIDs associated with the Debug Port.  The UEFI Specification defines the GUID for the messaging device path and the UEFI Variable to be the same value as the Debug Port Protocol Guid.  We could remove the 2 GUIDs from the .DEC file with no side effects but I do not like that the developer has to know the GUIDs are the same and use the Debug Port Protocol GUID in the INF when the device path or UEFI Variable are needed.  I think I would prefer to see the following 2 #defines removed:

	#define gEfiDebugPortVariableGuid   gEfiDebugPortProtocolGuid
	#define gEfiDebugPortDevicePathGuid     gEfiDebugPortProtocolGuid

And instead, have a proper declaration of the externs for these 2 GUIDs.  This also means the INF files that only list the Debug Port Protocol Guid will have to be updated to list all of the Debug Port related guids the module uses or the build will break.

2) The GUID values for the SAL services are defined in ExtendedSalServiceClasses.h because those are the defines used to make ESAL calls.  We never use the &GuidCName when making an ESAL call.  Instead, the GUID HI and GUID LO values are used in two 64-bit parameters to pass the GUID by value instead of by reference to avoid the physical/virtual issues with pointers in ESAL calls Itanium.  Since the &GuidCName form should never be used in C code, it did not make sense to declare the GuidCName for these GUIDs in the .h file.  This breaks the build if a developer ever attempts to use &GuidCName form.

Best regards,

Mike

-----Original Message-----
From: Andrew Fish [mailto:afish@apple.com] 
Sent: Friday, June 21, 2013 10:41 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] [MdePkg Maintainer] .DEC questions

Mike,

I don't understand why gEfiDebugPortVariableGuid and gEfiDebugPortDevicePathGuid are in the .DEC file since they can not exist in linked code. If you use these GUIDs in the code you need to add gEfiDebugPortProtocolGuid to your INF file to get your code to compile. Adding gEfiDebugPortVariableGuid or gEfiDebugPortDevicePathGuid to an INF file does nothing?

//
// DEBUGPORT variable definitions...
//
#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
#define gEfiDebugPortVariableGuid   gEfiDebugPortProtocolGuid
//
// DebugPort device path definitions...
//
#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
#define gEfiDebugPortDevicePathGuid     gEfiDebugPortProtocolGuid

Also the following GUIDs only exist in the .dec and they are not define in Include/Protocol/ExtendedSalServiceClasses.h. 
     gEfiExtendedSalBaseIoServicesProtocolGuid 
     gEfiExtendedSalStallServicesProtocolGuid 
     gEfiExtendedSalRtcServicesProtocolGuid 
     gEfiExtendedSalVariableServicesProtocolGuid 
     gEfiExtendedSalMtcServicesProtocolGuid 
     gEfiExtendedSalResetServicesProtocolGuid 
     gEfiExtendedSalStatusCodeServicesProtocolGuid 
     gEfiExtendedSalFvBlockServicesProtocolGuid 
     gEfiExtendedSalMpServicesProtocolGuid 
     gEfiExtendedSalPalServicesProtocolGuid 
     gEfiExtendedSalBaseServicesProtocolGuid 
     gEfiExtendedSalMcaServicesProtocolGuid 
     gEfiExtendedSalPciServicesProtocolGuid 
     gEfiExtendedSalCacheServicesProtocolGuid 
     gEfiExtendedSalMcaLogServicesProtocolGuid 

Is there some reason for this? 


Thanks,

Andrew Fish






------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel