Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45262 )
Change subject: sb/intel/bd82x6x/me_8.x.c: Improve ME MBP entry decoding ......................................................................
sb/intel/bd82x6x/me_8.x.c: Improve ME MBP entry decoding
Backport the MBP macros from Lynx Point, adjusting the definitions as required. Keep the original math for now, to preserve reproducibility.
Note that HWP Request isn't being handled in the current code.
Tested with BUILD_TIMELESS=1, Asus P8Z77-V LX2 does not change.
Change-Id: I36736bd03ca24ac3b319bf8e3d6eeb82a4104c86 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/bd82x6x/me.h M src/southbridge/intel/bd82x6x/me_8.x.c 2 files changed, 38 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/45262/1
diff --git a/src/southbridge/intel/bd82x6x/me.h b/src/southbridge/intel/bd82x6x/me.h index ce1817f0..dc1fa48 100644 --- a/src/southbridge/intel/bd82x6x/me.h +++ b/src/southbridge/intel/bd82x6x/me.h @@ -259,6 +259,35 @@ int intel_me7_send_eop(void); int intel_me8_send_eop(void);
+/* + * ME to BIOS Payload definitions + */ +#define MBP_APPID_KERNEL 1 +#define MBP_APPID_ICC 2 +#define MBP_APPID_INTEL_AT 3 +#define MBP_APPID_HWA 4 + +/* Kernel items */ +#define MBP_KERNEL_FW_VER_ITEM 1 +#define MBP_KERNEL_FW_CAP_ITEM 2 +#define MBP_KERNEL_ROM_BIST_ITEM 3 +#define MBP_KERNEL_PLAT_KEY_ITEM 4 +#define MBP_KERNEL_FW_TYPE_ITEM 5 +#define MBP_KERNEL_MFS_FAILURE_ITEM 6 + +/* ICC Items */ +#define MBP_ICC_PROFILE_ITEM 1 + +/* Intel AT items */ +#define MBP_INTEL_AT_STATE_ITEM 1 + +/* HWA Items */ +#define MBP_HWA_REQUEST_ITEM 1 + +#define MBP_MAKE_IDENT(appid, item) (((item) << 8) + (appid)) + +#define MBP_IDENT(appid, item) MBP_MAKE_IDENT(MBP_APPID_##appid, MBP_##appid##_##item##_ITEM) + typedef struct { u32 major_version : 16; u32 minor_version : 16; diff --git a/src/southbridge/intel/bd82x6x/me_8.x.c b/src/southbridge/intel/bd82x6x/me_8.x.c index 3613fe4..6d0a82d 100644 --- a/src/southbridge/intel/bd82x6x/me_8.x.c +++ b/src/southbridge/intel/bd82x6x/me_8.x.c @@ -285,8 +285,7 @@
me2host_pending -= mbp_item_hdr.length;
- mbp_item_id = (((u32)mbp_item_hdr.item_id) << 8) + - mbp_item_hdr.app_id; + mbp_item_id = MBP_MAKE_IDENT(mbp_item_hdr.app_id, (u32)mbp_item_hdr.item_id);
copy_size = mbp_item_hdr.length - 1;
@@ -299,30 +298,30 @@ printk(BIOS_INFO, "ME: MBP item header %8.8x\n", *((u32*)p));
switch (mbp_item_id) { - case 0x101: + case MBP_IDENT(KERNEL, FW_VER): SET_UP_COPY(fw_version_name);
- case 0x102: + case MBP_IDENT(ICC, PROFILE): SET_UP_COPY(icc_profile);
- case 0x103: + case MBP_IDENT(INTEL_AT, STATE): SET_UP_COPY(at_state);
- case 0x201: + case MBP_IDENT(KERNEL, FW_CAP): mbp_data->fw_caps_sku.available = 1; SET_UP_COPY(fw_caps_sku.fw_capabilities);
- case 0x301: + case MBP_IDENT(KERNEL, ROM_BIST): SET_UP_COPY(rom_bist_data);
- case 0x401: + case MBP_IDENT(KERNEL, PLAT_KEY): SET_UP_COPY(platform_key);
- case 0x501: + case MBP_IDENT(KERNEL, FW_TYPE): mbp_data->fw_plat_type.available = 1; SET_UP_COPY(fw_plat_type.rule_data);
- case 0x601: + case MBP_IDENT(KERNEL, MFS_FAILURE): SET_UP_COPY(mfsintegrity);
default: