/** @file\r
Sample to provide FSP wrapper hob process related function.\r
\r
- Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
IN VOID *FspHobList\r
)\r
{\r
- ProcessFspHobList (FspHobList);\r
-\r
+ //\r
+ // PostFspsHobProcess () will be called in both FSP API and Dispatch modes to\r
+ // align the same behavior and support a variety of boot loader implementations.\r
+ // Boot loader provided library function is recommended to support both API and\r
+ // Dispatch modes by checking PcdFspModeSelection.\r
+ //\r
+ if (PcdGet8 (PcdFspModeSelection) == 1) {\r
+ //\r
+ // Only in FSP API mode the wrapper has to build hobs basing on FSP output data.\r
+ // In this case FspHobList cannot be NULL.\r
+ //\r
+ ASSERT (FspHobList != NULL);\r
+ ProcessFspHobList (FspHobList);\r
+ }\r
return EFI_SUCCESS;\r
}\r