aboutsummaryrefslogtreecommitdiff
path: root/src/include/lib.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2005-03-08 18:53:11 +0000
committerMichael Brown <mcb30@etherboot.org>2005-03-08 18:53:11 +0000
commit3d6123e69ab879c72ff489afc5bf93ef0b7a94ce (patch)
tree9f3277569153a550fa8d81ebd61bd88f266eb8da /src/include/lib.h
downloadipxe-3d6123e69ab879c72ff489afc5bf93ef0b7a94ce.zip
ipxe-3d6123e69ab879c72ff489afc5bf93ef0b7a94ce.tar.gz
ipxe-3d6123e69ab879c72ff489afc5bf93ef0b7a94ce.tar.bz2
Initial revision
Diffstat (limited to 'src/include/lib.h')
-rw-r--r--src/include/lib.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/include/lib.h b/src/include/lib.h
new file mode 100644
index 0000000..400ea46
--- /dev/null
+++ b/src/include/lib.h
@@ -0,0 +1,42 @@
+#ifndef LIB_H
+#define LIB_H
+
+#include <stdint.h>
+
+int getline(char *buf, int max);
+
+extern struct pci_device *dev_list;
+extern int n_devs;
+
+extern void pci_init(void);
+extern struct pci_device *pci_find_device(int vendor, int device, int devclass,
+int prog_if, int index);
+
+void *calloc(size_t nmemb, size_t size);
+void *realloc(void *ptr, size_t size);
+
+char *strdup(const char *s);
+
+int isspace(int c);
+
+unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base);
+unsigned long long strtoull_with_suffix(const char *cp,char **endp,unsigned int base);
+
+unsigned int get_le32(const unsigned char *);
+unsigned int get_le16(const unsigned char *);
+void hexdump(const void *p, unsigned int len);
+
+long long simple_strtoll(const char *cp,char **endp,unsigned int base);
+
+#define LOADER_NOT_SUPPORT 0xbadf11e
+
+struct sys_info;
+int elf_load(struct sys_info *, const char *filename, const char *cmdline);
+
+#if LINUX_LOADER
+int linux_load(struct sys_info *, const char *filename, const char *cmdline);
+#else
+#define linux_load(x,y,z) LOADER_NOT_SUPPORT /* nop */
+#endif
+
+#endif /* LIB_H */