* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <coreboot_tables.h>
#include "coreinfo.h"
+#include <coreboot_tables.h>
#ifdef CONFIG_MODULE_COREBOOT
/* FIXME: Check the checksum. */
- if (ipchksum((uint16_t *) header, sizeof(*header)))
+ if (cb_checksum(header, sizeof(*header)))
return -1;
- if (ipchksum((uint16_t *) (ptr + sizeof(*header)), header->table_bytes)
+ if (cb_checksum((ptr + sizeof(*header)), header->table_bytes)
!= header->table_checksum)
return -1;
return (((u64) val.hi) << 32) | val.lo;
}
+static inline u16 cb_checksum(const void *ptr, unsigned len)
+{
+ return ipchksum(ptr, len);
+}
+
/* Helpful macros */
#define MEM_RANGE_COUNT(_rec) \