[SLOF] [PATCH 03/11] paflof: Add a write_mm_log helper function
Thomas Huth
thuth at redhat.com
Sat Sep 10 05:52:01 AEST 2016
The code in lib/libnet/netload.c uses write_mm_log() to write
error messages to the management module log, thus we need to
provide this function in Paflof, too, when we want to link
the netload code to Paflof later.
Signed-off-by: Thomas Huth <thuth at redhat.com>
---
include/helpers.h | 1 +
slof/helpers.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/include/helpers.h b/include/helpers.h
index 5b3d711..c86c468 100644
--- a/include/helpers.h
+++ b/include/helpers.h
@@ -35,6 +35,7 @@ extern void SLOF_pci_config_write32(long offset, long value);
extern void SLOF_pci_config_write16(long offset, long value);
extern void SLOF_pci_config_write8(long offset, long value);
extern void *SLOF_translate_my_address(void *addr);
+extern int write_mm_log(char *data, unsigned int len, unsigned short type);
#define offset_of(type, member) ((long) &((type *)0)->member)
#define container_of(ptr, type, member) ({ \
diff --git a/slof/helpers.c b/slof/helpers.c
index 48c34a6..3f411b9 100644
--- a/slof/helpers.c
+++ b/slof/helpers.c
@@ -148,3 +148,12 @@ void *SLOF_translate_my_address(void *addr)
forth_eval("translate-my-address");
return (void *)forth_pop();
}
+
+int write_mm_log(char *data, unsigned int len, unsigned short type)
+{
+ forth_push((unsigned long)data);
+ forth_push(len);
+ forth_push(type);
+
+ return forth_eval_pop("write-mm-log");
+}
--
1.8.3.1
More information about the SLOF
mailing list