diff options
author | Andrey Petrov <andrey.petrov@intel.com> | 2016-02-25 14:19:07 -0800 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-03-08 13:45:40 +0100 |
commit | 9de55cce55082d08ed7720aa9c314b63e49d0bf7 (patch) | |
tree | f090e6ef1b0e9f5a7fd7837934eb9de0be056897 /src | |
parent | 42c4e886c8c9fe35d38f20e3df7e912a538c4f0f (diff) |
drivers/intel/fsp2_0: Add Notify Phase API
This adds Notify Phase API. This is an important call that is used
to inform FSP runtimes of different stages of SoC initializations
by the coreboot.
Change-Id: Icec770d0c1c4d239adb2ef342bf6cc9c35666e4d
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/13800
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/intel/fsp2_0/notify.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c new file mode 100644 index 0000000000..820bd4540e --- /dev/null +++ b/src/drivers/intel/fsp2_0/notify.c @@ -0,0 +1,40 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2015 Intel Corp. + * (Written by Andrey Petrov <andrey.petrov@intel.com> for Intel Corp.) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include <arch/cpu.h> +#include <console/console.h> +#include <fsp/api.h> +#include <fsp/util.h> +#include <string.h> + +struct fsp_notify_params { + enum fsp_notify_phase phase; +}; + +typedef asmlinkage enum fsp_status (*fsp_notify_fn) + (struct fsp_notify_params *); + +enum fsp_status fsp_notify(enum fsp_notify_phase phase) +{ + fsp_notify_fn fspnotify; + struct fsp_notify_params notify_params = { .phase = phase }; + + if (!fsps_hdr.silicon_init_entry_offset) + return FSP_NOT_FOUND; + + fspnotify = (void*) (fsps_hdr.image_base + + fsps_hdr.notify_phase_entry_offset); + + printk(BIOS_DEBUG, "FspNotify %x\n", (uint32_t) phase); + + return fspnotify(¬ify_params); +} |