#ifndef _XEN_IA64_BUNDLE_H #define _XEN_IA64_BUNDLE_H typedef unsigned long IA64_INST; typedef union U_IA64_BUNDLE { unsigned long i64[2]; struct { unsigned long template:5,slot0:41,slot1a:18,slot1b:23,slot2:41; }; // NOTE: following doesn't work because bitfields can't cross natural // size boundaries //struct { unsigned long template:5, slot0:41, slot1:41, slot2:41; }; } IA64_BUNDLE; typedef enum E_IA64_SLOT_TYPE { I, M, F, B, L, ILLEGAL } IA64_SLOT_TYPE; typedef union U_INST64_A5 { IA64_INST inst; struct { unsigned long qp:6, r1:7, imm7b:7, r3:2, imm5c:5, imm9d:9, s:1, major:4; }; } INST64_A5; typedef union U_INST64_B4 { IA64_INST inst; struct { unsigned long qp:6, btype:3, un3:3, p:1, b2:3, un11:11, x6:6, wh:2, d:1, un1:1, major:4; }; } INST64_B4; typedef union U_INST64_B8 { IA64_INST inst; struct { unsigned long qp:6, un21:21, x6:6, un4:4, major:4; }; } INST64_B8; typedef union U_INST64_B9 { IA64_INST inst; struct { unsigned long qp:6, imm20:20, :1, x6:6, :3, i:1, major:4; }; } INST64_B9; typedef union U_INST64_I18 { IA64_INST inst; struct { unsigned long qp:6, imm20:20, y:1, x6:6, x3:3, i:1, major:4; }; } INST64_I18; typedef union U_INST64_I19 { IA64_INST inst; struct { unsigned long qp:6, imm20:20, :1, x6:6, x3:3, i:1, major:4; }; } INST64_I19; typedef union U_INST64_I26 { IA64_INST inst; struct { unsigned long qp:6, :7, r2:7, ar3:7, x6:6, x3:3, :1, major:4;}; } INST64_I26; typedef union U_INST64_I27 { IA64_INST inst; struct { unsigned long qp:6, :7, imm:7, ar3:7, x6:6, x3:3, s:1, major:4;}; } INST64_I27; typedef union U_INST64_I28 { // not privileged (mov from AR) IA64_INST inst; struct { unsigned long qp:6, r1:7, :7, ar3:7, x6:6, x3:3, :1, major:4;}; } INST64_I28; typedef union U_INST64_M28 { IA64_INST inst; struct { unsigned long qp:6, :14, r3:7, x6:6, x3:3, x:1, major:4;}; } INST64_M28; typedef union U_INST64_M29 { IA64_INST inst; struct { unsigned long qp:6, :7, r2:7, ar3:7, x6:6, x3:3, :1, major:4;}; } INST64_M29; typedef union U_INST64_M30 { IA64_INST inst; struct { unsigned long qp:6, :7, imm:7, ar3:7,x4:4,x2:2,x3:3,s:1,major:4;}; } INST64_M30; typedef union U_INST64_M31 { IA64_INST inst; struct { unsigned long qp:6, r1:7, :7, ar3:7, x6:6, x3:3, :1, major:4;}; } INST64_M31; typedef union U_INST64_M32 { IA64_INST inst; struct { unsigned long qp:6, :7, r2:7, cr3:7, x6:6, x3:3, :1, major:4;}; } INST64_M32; typedef union U_INST64_M33 { IA64_INST inst; struct { unsigned long qp:6, r1:7, :7, cr3:7, x6:6, x3:3, :1, major:4; }; } INST64_M33; typedef union U_INST64_M35 { IA64_INST inst; struct { unsigned long qp:6, :7, r2:7, :7, x6:6, x3:3, :1, major:4; }; } INST64_M35; typedef union U_INST64_M36 { IA64_INST inst; struct { unsigned long qp:6, r1:7, :14, x6:6, x3:3, :1, major:4; }; } INST64_M36; typedef union U_INST64_M37 { IA64_INST inst; struct { unsigned long qp:6, imm20a:20,:1, x4:4,x2:2,x3:3, i:1, major:4; }; } INST64_M37; typedef union U_INST64_M41 { IA64_INST inst; struct { unsigned long qp:6, :7, r2:7, :7, x6:6, x3:3, :1, major:4; }; } INST64_M41; typedef union U_INST64_M42 { IA64_INST inst; struct { unsigned long qp:6, :7, r2:7, r3:7, x6:6, x3:3, :1, major:4; }; } INST64_M42; typedef union U_INST64_M43 { IA64_INST inst; struct { unsigned long qp:6, r1:7, :7, r3:7, x6:6, x3:3, :1, major:4; }; } INST64_M43; typedef union U_INST64_M44 { IA64_INST inst; struct { unsigned long qp:6, imm:21, x4:4, i2:2, x3:3, i:1, major:4; }; } INST64_M44; typedef union U_INST64_M45 { IA64_INST inst; struct { unsigned long qp:6, :7, r2:7, r3:7, x6:6, x3:3, :1, major:4; }; } INST64_M45; typedef union U_INST64_M46 { IA64_INST inst; struct { unsigned long qp:6, r1:7, un7:7, r3:7, x6:6, x3:3, un1:1, major:4; }; } INST64_M46; typedef union U_INST64_M47 { IA64_INST inst; struct { unsigned long qp:6, un14:14, r3:7, x6:6, x3:3, un1:1, major:4; }; } INST64_M47; typedef union U_INST64_M1{ IA64_INST inst; struct { unsigned long qp:6, r1:7, un7:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; }; } INST64_M1; typedef union U_INST64_M2{ IA64_INST inst; struct { unsigned long qp:6, r1:7, r2:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; }; } INST64_M2; typedef union U_INST64_M3{ IA64_INST inst; struct { unsigned long qp:6, r1:7, imm7:7, r3:7, i:1, hint:2, x6:6, s:1, major:4; }; } INST64_M3; typedef union U_INST64_M4 { IA64_INST inst; struct { unsigned long qp:6, un7:7, r2:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; }; } INST64_M4; typedef union U_INST64_M5 { IA64_INST inst; struct { unsigned long qp:6, imm7:7, r2:7, r3:7, i:1, hint:2, x6:6, s:1, major:4;
# Use the default kernel version if the Makefile doesn't override it
LINUX_RELEASE?=1
ifeq ($(LINUX_VERSION),3.3.8)
LINUX_KERNEL_MD5SUM:=f1058f64eed085deb44f10cee8541d50
endif
ifeq ($(LINUX_VERSION),3.6.11)
LINUX_KERNEL_MD5SUM:=3d602ad7f7984509c3e923a5ae90bc54
endif
ifeq ($(LINUX_VERSION),3.8.13)
LINUX_KERNEL_MD5SUM:=2af19d06cd47ec459519159cdd10542d
endif
ifeq ($(LINUX_VERSION),3.9.11)
LINUX_KERNEL_MD5SUM:=edbf88eb7f7d34dbd5d3887726790755
endif
ifeq ($(LINUX_VERSION),3.10.44)
LINUX_KERNEL_MD5SUM:=8a4006eff3bbd8aff58fe4b443223e7a
endif
ifeq ($(LINUX_VERSION),3.13.7)
LINUX_KERNEL_MD5SUM:=370adced5e5c1cb1d0d621c2dae2723f
endif
ifeq ($(LINUX_VERSION),3.14.12)
LINUX_KERNEL_MD5SUM:=7e76da2910683fe4dfbcec6ebfdd9a32
endif
# disable the md5sum check for unknown kernel versions
LINUX_KERNEL_MD5SUM?=x
split_version=$(subst ., ,$(1))
merge_version=$(subst $(space),.,$(1))
KERNEL_BASE=$(firstword $(subst -, ,$(LINUX_VERSION)))
KERNEL=$(call merge_version,$(wordlist 1,2,$(call split_version,$(KERNEL_BASE))))
ifeq ($(firstword $(call split_version,$(KERNEL_BASE))),2)
KERNEL_PATCHVER=$(call merge_version,$(wordlist 1,3,$(call split_version,$(KERNEL_BASE))))
else
KERNEL_PATCHVER=$(KERNEL)
endif