Message ID | 20210802094522.761676-3-bmeng.cn@gmail.com |
---|---|
State | Accepted |
Commit | 33e4ab31a9647b0bacd44b579199eaae239d69e3 |
Delegated to: | Bin Meng |
Headers | show |
Series | x86: Various fixes to MTRR and FSP codes | expand |
On Mon, 2 Aug 2021 at 03:45, Bin Meng <bmeng.cn@gmail.com> wrote: > > For FSP1, there is no such INIT_PHASE_END_FIRMWARE. > > Move board_final_cleanup() to fsp2 directory. > > Fixes: 7c73cea44290 ("x86: Notify the FSP of the 'end firmware' event") > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > > --- > > Changes in v3: > - Add the missing header file include > > Changes in v2: > - Move board_final_cleanup() to fsp2 directory > > arch/x86/lib/fsp/fsp_common.c | 16 ---------------- > arch/x86/lib/fsp2/fsp_common.c | 17 +++++++++++++++++ > 2 files changed, 17 insertions(+), 16 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <sjg@chromium.org>
On Mon, Aug 2, 2021 at 10:45 PM Simon Glass <sjg@chromium.org> wrote: > > On Mon, 2 Aug 2021 at 03:45, Bin Meng <bmeng.cn@gmail.com> wrote: > > > > For FSP1, there is no such INIT_PHASE_END_FIRMWARE. > > > > Move board_final_cleanup() to fsp2 directory. > > > > Fixes: 7c73cea44290 ("x86: Notify the FSP of the 'end firmware' event") > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com> > > > > --- > > > > Changes in v3: > > - Add the missing header file include > > > > Changes in v2: > > - Move board_final_cleanup() to fsp2 directory > > > > arch/x86/lib/fsp/fsp_common.c | 16 ---------------- > > arch/x86/lib/fsp2/fsp_common.c | 17 +++++++++++++++++ > > 2 files changed, 17 insertions(+), 16 deletions(-) > > Reviewed-by: Simon Glass <sjg@chromium.org> > Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax > Tested-by: Simon Glass <sjg@chromium.org> applied to u-boot-x86, thanks!
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c index 6365b0a50a..82f7d3ab5f 100644 --- a/arch/x86/lib/fsp/fsp_common.c +++ b/arch/x86/lib/fsp/fsp_common.c @@ -61,22 +61,6 @@ void board_final_init(void) debug("OK\n"); } -void board_final_cleanup(void) -{ - u32 status; - - /* TODO(sjg@chromium.org): This causes Linux to crash */ - return; - - /* call into FspNotify */ - debug("Calling into FSP (notify phase INIT_PHASE_END_FIRMWARE): "); - status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE); - if (status) - debug("fail, error code %x\n", status); - else - debug("OK\n"); -} - int fsp_save_s3_stack(void) { struct udevice *dev; diff --git a/arch/x86/lib/fsp2/fsp_common.c b/arch/x86/lib/fsp2/fsp_common.c index f69456e43a..20c3f6406a 100644 --- a/arch/x86/lib/fsp2/fsp_common.c +++ b/arch/x86/lib/fsp2/fsp_common.c @@ -6,8 +6,25 @@ #include <common.h> #include <init.h> +#include <asm/fsp/fsp_support.h> int arch_fsp_init(void) { return 0; } + +void board_final_cleanup(void) +{ + u32 status; + + /* TODO(sjg@chromium.org): This causes Linux to crash */ + return; + + /* call into FspNotify */ + debug("Calling into FSP (notify phase INIT_PHASE_END_FIRMWARE): "); + status = fsp_notify(NULL, INIT_PHASE_END_FIRMWARE); + if (status) + debug("fail, error code %x\n", status); + else + debug("OK\n"); +}
For FSP1, there is no such INIT_PHASE_END_FIRMWARE. Move board_final_cleanup() to fsp2 directory. Fixes: 7c73cea44290 ("x86: Notify the FSP of the 'end firmware' event") Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- Changes in v3: - Add the missing header file include Changes in v2: - Move board_final_cleanup() to fsp2 directory arch/x86/lib/fsp/fsp_common.c | 16 ---------------- arch/x86/lib/fsp2/fsp_common.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 16 deletions(-)