-/**\r
- Notify function for event group EFI_EVENT_GROUP_READY_TO_BOOT. This is used to\r
- install the Firmware Performance Data Table.\r
-\r
- @param[in] Event The Event that is being processed.\r
- @param[in] Context The Event Context.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-FpdtReadyToBootEventNotify (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- )\r
-{\r
- if (mAcpiBootPerformanceTable == NULL) {\r
- //\r
- // ACPI Firmware Performance Data Table not installed yet, install it now.\r
- //\r
- InstallFirmwarePerformanceDataTable ();\r
- }\r
-}\r
-\r
-/**\r
- Notify function for event group EFI_EVENT_LEGACY_BOOT_GUID. This is used to\r
- record performance data for OsLoaderLoadImageStart in FPDT for legacy boot.\r
-\r
- @param[in] Event The Event that is being processed.\r
- @param[in] Context The Event Context.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-FpdtLegacyBootEventNotify (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- )\r
-{\r
- if (mAcpiBootPerformanceTable == NULL) {\r
- //\r
- // Firmware Performance Data Table not installed, do nothing.\r
- //\r
- return ;\r
- }\r
-\r
- //\r
- // Update Firmware Basic Boot Performance Record for legacy boot.\r
- //\r
- mAcpiBootPerformanceTable->BasicBoot.OsLoaderLoadImageStart = 0;\r
- mAcpiBootPerformanceTable->BasicBoot.OsLoaderStartImageStart = GetTimeInNanoSecond (GetPerformanceCounter ());\r
- mAcpiBootPerformanceTable->BasicBoot.ExitBootServicesEntry = 0;\r
- mAcpiBootPerformanceTable->BasicBoot.ExitBootServicesExit = 0;\r
-\r
- //\r
- // Dump FPDT Boot Performance record.\r
- //\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ResetEnd = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ResetEnd));\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderLoadImageStart = 0\n"));\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderStartImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderStartImageStart));\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ExitBootServicesEntry = 0\n"));\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ExitBootServicesExit = 0\n"));\r
-}\r
-\r
-/**\r
- Notify function for event EVT_SIGNAL_EXIT_BOOT_SERVICES. This is used to record\r
- performance data for ExitBootServicesEntry in FPDT.\r
-\r
- @param[in] Event The Event that is being processed.\r
- @param[in] Context The Event Context.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-FpdtExitBootServicesEventNotify (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- )\r
-{\r
- if (mAcpiBootPerformanceTable == NULL) {\r
- //\r
- // Firmware Performance Data Table not installed, do nothing.\r
- //\r
- return ;\r
- }\r
-\r
- //\r
- // Update Firmware Basic Boot Performance Record for UEFI boot.\r
- //\r
- mAcpiBootPerformanceTable->BasicBoot.ExitBootServicesEntry = GetTimeInNanoSecond (GetPerformanceCounter ());\r
-\r
- //\r
- // Dump FPDT Boot Performance record.\r
- //\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ResetEnd = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ResetEnd));\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderLoadImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderLoadImageStart));\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - OsLoaderStartImageStart = %ld\n", mAcpiBootPerformanceTable->BasicBoot.OsLoaderStartImageStart));\r
- DEBUG ((EFI_D_INFO, "FPDT: Boot Performance - ExitBootServicesEntry = %ld\n", mAcpiBootPerformanceTable->BasicBoot.ExitBootServicesEntry));\r
- //\r
- // ExitBootServicesExit will be updated later, so don't dump it here.\r
- //\r
-}\r
-\r