aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2016-09-09 21:52:01 +0200
committerAlexey Kardashevskiy <aik@ozlabs.ru>2016-09-14 17:50:40 +1000
commitf4b44f501e220b15ad63873b885c9d150a77b52d (patch)
tree802c385b775e605c3104230fc454440361790b0e
parent9cb2fb0cd9adcd48162175029f3efa96e6b17c54 (diff)
downloadSLOF-f4b44f501e220b15ad63873b885c9d150a77b52d.zip
SLOF-f4b44f501e220b15ad63873b885c9d150a77b52d.tar.gz
SLOF-f4b44f501e220b15ad63873b885c9d150a77b52d.tar.bz2
paflof: Add a write_mm_log helper function
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@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r--include/helpers.h1
-rw-r--r--slof/helpers.c9
2 files changed, 10 insertions, 0 deletions
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 b049141..86fd2b6 100644
--- a/slof/helpers.c
+++ b/slof/helpers.c
@@ -153,3 +153,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");
+}