+#define LITTLE_ENDIAN 1234
+#define BIG_ENDIAN 4321
+
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+
+#define RAND_MAX 0x7fffffff
+
+/* Payload information parameters - these are used to pass information
+ * to the entity loading the payload
+ * Usage: PAYLOAD_INFO(key, value)
+ * Example: PAYLOAD_INFO(name, "CoreInfo!")
+ */
+
+#define _pstruct(key) __pinfo_ ##key
+#define PAYLOAD_INFO(key, value) \
+static const char _pstruct(key)[] \
+ __attribute__((__used__)) \
+ __attribute__((section(".note.pinfo"),unused)) = #key "=" value
+
+/* Some NVRAM byte definitions */
+#define NVRAM_RTC_SECONDS 0
+#define NVRAM_RTC_MINUTES 2
+#define NVRAM_RTC_HOURS 4
+#define NVRAM_RTC_DAY 7
+#define NVRAM_RTC_MONTH 8
+#define NVRAM_RTC_YEAR 9
+#define NVRAM_RTC_FREQ_SELECT 10
+#define NVRAM_RTC_UIP 0x80
+
+struct tm {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+};
+
+/* drivers/nvram.c */
+u8 nvram_read(u8 addr);
+void nvram_write(u8 val, u8 addr);
+int nvram_updating(void);
+void rtc_read_clock(struct tm *tm);
+