2 * util.h: Useful utility functions.
4 * Leendert van Doorn, leendert@watson.ibm.com
5 * Copyright (c) 2005, International Business Machines Corporation.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 * Place - Suite 330, Boston, MA 02111-1307 USA.
27 #define E820_MAP_NR ((unsigned char *)E820_MAP_PAGE + E820_MAP_NR_OFFSET)
28 #define E820_MAP ((struct e820entry *)(E820_MAP_PAGE + E820_MAP_OFFSET))
30 #define offsetof(type, member) ((unsigned) &((type *)0)->member)
32 struct vmx_assist_context;
34 extern void hexdump(unsigned char *, int);
35 extern void dump_regs(struct regs *);
36 extern void dump_vmx_context(struct vmx_assist_context *);
37 extern void print_e820_map(struct e820entry *, int);
38 extern void dump_dtr(unsigned long, unsigned long);
39 extern void *memcpy(void *, const void *, unsigned);
40 extern void *memset(void *, int, unsigned);
41 extern int printf(const char *fmt, ...);
42 extern int vprintf(const char *fmt, va_list ap);
43 extern void panic(const char *format, ...);
44 extern void halt(void);
46 #endif /* __UTIL_H__ */