On 09/07/17 06:34, Yao, Jiewen wrote:
> Thanks.
> It seems the discussion becomes too long. I try to make it short.
> 
> 
> 1)       As long as we use same mechanism to handle both common buffer and 
> read/write buffer. I have no concern at all. :)
> 
> 
> 2)       I am sorry that I do not have an immediate answer for your question 
> on event handling in ExitBootServices.
> Although it seems tricky, I believe it works. Can you have a try?
> 
> 
> 3)       Looking at the code (DxeMain.c), I have another idea for your 
> consideration only.
> 
>   //
>   // Notify other drivers that we are exiting boot services.
>   //
>   CoreNotifySignalList (&gEfiEventExitBootServicesGuid);
> 
>   //
>   // Report that ExitBootServices() has been called
>   //
>   REPORT_STATUS_CODE (
>     EFI_PROGRESS_CODE,
>     (EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_BS_PC_EXIT_BOOT_SERVICES)
>     );
> 
> The cleanup driver may register a report status code handle to do the 
> cleanup. :)
> 
> We already have such example in 
> MdeModulePkg\Universal\Acpi\FirmwarePerformanceDataTableDxe\ 
> FirmwarePerformanceDxe.c.
> FpdtStatusCodeListenerDxe()
> 
>   } else if (Value == (EFI_SOFTWARE_EFI_BOOT_SERVICE | 
> EFI_SW_BS_PC_EXIT_BOOT_SERVICES)) {
> ......
> 
> The requirement will become: If a platform wants to add cleanup, it must use 
> a real report status code library.

I think I prefer option #2; it presents fewer requirements for the platform.

In addition: I've just realized that we don't need the UEFI spec to
promise us that option #2 works. We only have to care whether it works
in edk2.

The reason is that EDKII_IOMMU_PROTOCOL is *already* edk2-specific; it
is a platform (DXE) driver, not a UEFI driver. In other words, we would
use option #2 only inside edk2.

So, I'll try option #2.

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to