-/* libc/string.c */
-size_t strnlen(const char *str, size_t maxlen);
-size_t strlen(const char *str);
-int strcmp(const char *s1, const char *s2);
-int strncmp(const char *s1, const char *s2, int maxlen);
-char *strncpy(char *d, const char *s, int n);
-char *strcpy(char *d, const char *s);
-char *strncat(char *d, const char *s, int n);
-char *strchr(const char *s, int c);
-char *strdup(const char *s);
-char *strstr(const char *h, const char *n);
-
-/* i386/coreboot.c */
+#ifdef CONFIG_LAR
+/**
+ * @defgroup lar LAR functions
+ * @{
+ */
+
+/** LAR file header */
+struct LAR {
+ void *start; /**< Location of the LAR in memory */
+ int cindex; /**< Next file to return in readlar() */
+ int count; /**< Number of entries in the header cache */
+ int alloc; /**< Number of slots in the header cache */
+ int eof; /**< Last entry in the header cache */
+ void **headers; /**< Pointer to the header cache */
+};
+
+/** A structure representing the next LAR entry */
+struct larent {
+ u8 name[LAR_MAX_PATHLEN]; /**< The name of the next LAR entry */
+};
+
+/** A structure containing information about a LAR file */
+struct larstat {
+ u32 len; /**< Length of the file in the LAR */
+ u32 reallen; /**< Length of the uncompressed file */
+ u32 checksum; /**< Checksum of the uncompressed file */
+ u32 compchecksum; /**< Checksum of the compressed file in the LAR */
+ u32 offset; /**< Offset of the file in the LAR */
+ u32 compression; /**< Compression type of the file */
+ u64 entry; /**< Entry point of the file for executables */
+ u64 loadaddress; /**< Address in memory to put the uncompressed file */
+};
+
+/** A structure representing a LAR file */
+struct LFILE {
+ struct LAR *lar; /**< Pointer to the LAR struct */
+ struct lar_header *header; /**< Pointer to the header struct */
+ u32 size; /**< Size of the file */
+ void *start; /**< Start of the file in memory */
+ u32 offset; /**< Offset of the file in the LAR */
+};
+
+struct LAR *openlar(void *addr);
+int closelar(struct LAR *lar);
+struct larent *readlar(struct LAR *lar);
+void rewindlar(struct LAR *lar);
+int larstat(struct LAR *lar, const char *path, struct larstat *buf);
+void *larfptr(struct LAR *lar, const char *filename);
+int lfverify(struct LAR *lar, const char *filename);
+struct LFILE *lfopen(struct LAR *lar, const char *filename);
+int lfread(void *ptr, size_t size, size_t nmemb, struct LFILE *stream);
+
+int lfseek(struct LFILE *stream, long offset, int whence);
+int lfclose(struct LFILE *file);
+/** @} */
+#endif
+
+/**
+ * @defgroup info System information functions
+ * This module contains functions that return information about the system
+ * @{
+ */
+
+int sysinfo_have_multiboot(unsigned long *addr);
+/** @} */
+
+/**
+ * @defgroup arch Architecture specific functions
+ * This module contains global architecture specific functions.
+ * All architectures are expected to define these functions.
+ * @{
+ */