On Mon, Jul 16, 2012 at 2:54 AM, Li, Elvin <[email protected]> wrote:
>
> Hi Mars:
>
>                 Could you check in the fix directly?

It looks like Jeff Fan is the package owner for
IntelFrameworkModulePkg, so should he commit it?

-Jordan

> From: Li, Elvin [mailto:[email protected]]
> Sent: Monday, July 16, 2012 12:32 PM
>
>
> To: [email protected]
> Subject: Re: [edk2] [Q] ACPI_ADR_DEVICE_PATH check in BiosThunk\VideoDxe
> driver
>
>
>
> Hi Mars:
>
>                 I agree with you. The current “!=” check does break UEFI
> spec. And UEFI spec says: At least one _ADR value is required, so I agree
> with your fix to check if the minimal length is met by requirement.
>
>
>
> Thanks
>
> Elvin
>
> From: Mars Lin [mailto:[email protected]]
> Sent: Monday, July 16, 2012 11:58 AM
> To: [email protected]
> Subject: Re: [edk2] [Q] ACPI_ADR_DEVICE_PATH check in BiosThunk\VideoDxe
> driver
>
>
>
> Here is the proposed patch file for the issue I reported on
> IntelFrameworkModulePkg.
>
>
>
> -Mars
>
> From: Mars Lin
> Sent: Thursday, June 28, 2012 2:11 PM
> To: '[email protected]'
> Subject: [Q] ACPI_ADR_DEVICE_PATH check in BiosThunk\VideoDxe driver
>
>
>
> Hi all,
>
> Current EDK2 VideoDxe driver check remaining device path in its binding
> supported function by:
>
>     if (RemainingDevicePath != NULL) {
>
>
>
>       //
>
>       // Check if RemainingDevicePath is the End of Device Path Node,
>
>       // if YES, return EFI_SUCCESS.
>
>       //
>
>
>
>       if (!IsDevicePathEnd (RemainingDevicePath)) {
>
>
>
>         //
>
>         // If RemainingDevicePath isn't the End of Device Path Node,
>
>         // it should be ACPI_ADR_DEVICE_PATH.
>
>         //
>
>
>
>         if (RemainingDevicePath->Type != ACPI_DEVICE_PATH ||
>
>           RemainingDevicePath->SubType != ACPI_ADR_DP ||
>
>           DevicePathNodeLength (RemainingDevicePath) != sizeof
> (ACPI_ADR_DEVICE_PATH)) {
>
>           Status = EFI_UNSUPPORTED;
>
>         }
>
>       }
>
>     }
>
>
>
> And here is what been defined from MdePkg for ACPI_ADR_DEVICE_PATH –
>
> typedef struct {
>
>   EFI_DEVICE_PATH_PROTOCOL        Header;
>
>   ///
>
>   /// _ADR value. For video output devices the value of this
>
>   /// field comes from Table B-2 of the ACPI 3.0 specification. At
>
>   /// least one _ADR value is required.
>
>   ///
>
>   UINT32                          ADR;
>
>   //
>
>   // This device path may optionally contain more than one _ADR entry.
>
>   //
>
> } ACPI_ADR_DEVICE_PATH;
>
>
>
> So, for the case we try to connect ConOut device created by GOP driver
> like:
>
>   PciRoot(0x0)/Pci(0x2,0x0)/AcpiAdr(0x80012450,0x80011140,0x0)
>
>
>
> The supported function returns EFI_NOT_SUPPORTED based on condition:
>
>   DevicePathNodeLength (RemainingDevicePath) != sizeof
> (ACPI_ADR_DEVICE_PATH)
>
>
>
> This condition check keeps followed Legacy VGA BIOS from been shadowed to
> service the legacy requests for displaying.
>
>
>
> Based on UEFI specification, ACPI ADR Device Path is defined as:
>
> that might contains additional _ADR field that its length is NOT equal to
> sizeof (ACPI_ADR_DEVICE_PATH).
>
>
>
> Suggest change this condition check as:
>
>   DevicePathNodeLength (RemainingDevicePath) < sizeof
> (ACPI_ADR_DEVICE_PATH)
>
> for more derived ACPI ADR device path coverage.
>
>
>
> Thanks,
>
> -Mars
>
>
>
>
>
> ------------------------------------------------------------------------------
> 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
>

------------------------------------------------------------------------------
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