[coreboot-gerrit] Patch set updated for coreboot: FSP2.0: Add Notify Phase API

Andrey Petrov (andrey.petrov@intel.com) gerrit at coreboot.org
Mon Feb 29 21:49:30 CET 2016


Andrey Petrov (andrey.petrov at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13800

-gerrit

commit 5394f58d349279879fbf3803c6fbd3c84cd26047
Author: Andrey Petrov <andrey.petrov at intel.com>
Date:   Thu Feb 25 14:19:07 2016 -0800

    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 at intel.com>
---
 src/drivers/intel/fsp2_0/notify.c | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c
new file mode 100644
index 0000000..c5f06db
--- /dev/null
+++ b/src/drivers/intel/fsp2_0/notify.c
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Andrey Petrov <andrey.petrov at 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>
+
+typedef struct fsp_notify_params {
+	enum fsp_notify_phase phase;
+} NOTIFY_PHASE_PARAMS;
+
+typedef asmlinkage enum fsp_status (*fsp_notify_fn)
+				   (struct fsp_notify_params *);
+
+struct fsp_header *fsps_hdr = NULL;
+
+enum fsp_status fsp_notify(enum fsp_notify_phase phase)
+{
+	fsp_notify_fn fspnotify = NULL;
+
+	if (!fsps_hdr)
+		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((struct fsp_notify_params *) &phase);
+}



More information about the coreboot-gerrit mailing list