@@ -266,20 +266,19 @@ StartAndConfigureDriver(
266
266
Print (L"[LOADER] StartImage failed: %llx (%r).\r\n" , Status , Status );
267
267
goto Exit ;
268
268
}
269
-
270
- Status = gBS -> LocateProtocol (& gEfiGuardDriverProtocolGuid ,
271
- NULL ,
272
- (VOID * * )& EfiGuardDriverProtocol );
273
- if (EFI_ERROR (Status ))
274
- {
275
- Print (L"[LOADER] LocateProtocol failed: %llx (%r).\r\n" , Status , Status );
276
- goto Exit ;
277
- }
278
269
}
279
270
else
280
271
{
272
+ ASSERT_EFI_ERROR (Status );
281
273
Print (L"[LOADER] The driver is already loaded.\r\n" );
282
- Status = EFI_ALREADY_STARTED ;
274
+ }
275
+
276
+ Status = gBS -> LocateProtocol (& gEfiGuardDriverProtocolGuid ,
277
+ NULL ,
278
+ (VOID * * )& EfiGuardDriverProtocol );
279
+ if (EFI_ERROR (Status ))
280
+ {
281
+ Print (L"[LOADER] LocateProtocol failed: %llx (%r).\r\n" , Status , Status );
283
282
goto Exit ;
284
283
}
285
284
@@ -424,7 +423,9 @@ TryBootOptionsInOrder(
424
423
// Print what we're booting
425
424
if (ConvertedPath != NULL )
426
425
{
427
- Print (L"Booting %Sdevice path %S...\r\n" , IsLegacy ? L"legacy " : L"" , ConvertedPath );
426
+ Print (L"Booting \"%S\"...\r\n -> %S = %S\r\n" ,
427
+ (BootOptions [Index ].Description != NULL ? BootOptions [Index ].Description : L"<null description>" ),
428
+ IsLegacy ? L"Legacy path" : L"Path" , ConvertedPath );
428
429
FreePool (ConvertedPath );
429
430
}
430
431
@@ -580,9 +581,6 @@ UefiMain(
580
581
// Locate, load, start and configure the driver
581
582
//
582
583
CONST EFI_STATUS DriverStatus = StartAndConfigureDriver (ImageHandle , SystemTable );
583
- if (DriverStatus == EFI_ALREADY_STARTED )
584
- return EFI_SUCCESS ;
585
-
586
584
if (EFI_ERROR (DriverStatus ))
587
585
{
588
586
Print (L"\r\nERROR: driver load failed with status %llx (%r).\r\n"
0 commit comments