From bee7f1cbcd5bf18acc539c9c9b6a14960dadea3d Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Mon, 14 Dec 2015 09:30:28 -0600 Subject: Update constants and comments for P9 PIR format Implemented a set of macros and constants that can be used everywhere to translate a PIR into its component parts and pull out individual pieces of data from a complete PIR. Also added and updated the references to the old ATTR_FABRIC_NODE_ID with ATTR_FABRIC_GROUP_ID. Change-Id: If9735f53940e5849a648729e4bf8ca0cfbb09f6e RTC: 88055 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/706 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell --- src/include/kernel/intmsghandler.H | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/include/kernel/intmsghandler.H') diff --git a/src/include/kernel/intmsghandler.H b/src/include/kernel/intmsghandler.H index 57044a483..98d8d5288 100644 --- a/src/include/kernel/intmsghandler.H +++ b/src/include/kernel/intmsghandler.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2016 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -28,6 +30,7 @@ #include #include #include +#include /** * @class InterruptMsgHdlr @@ -53,17 +56,17 @@ class InterruptMsgHdlr : public MessageHandler */ enum { - P8_PIR_THREADID_MSK = 0x00000007, - P8_PIR_COREID_MSK = 0x00000078, - P8_PIR_CHIPID_MSK = 0x00000380, - P8_PIR_NODEID_MSK = 0x00001C00, + P8_PIR_THREADID_MSK = PIR_t::THREAD_MASK, + P8_PIR_COREID_MSK = PIR_t::CORE_MASK, + P8_PIR_CHIPID_MSK = PIR_t::CHIP_MASK, + P8_PIR_NODEID_MSK = PIR_t::GROUP_MASK, // Logical Shift Left fields for mmio Base address from PIR. // (IP addr bit pos - PIR bit pos) - P8_IP_THREADID_LSL = (12-0), - P8_IP_COREID_LSL = (15-3), - P8_IP_CHIPID_LSL = (20-7), - P8_IP_NODEID_LSL = (22-10), + P8_IP_THREADID_LSL = (12-PIR_t::BITS_AFTER_CORE), + P8_IP_COREID_LSL = (15-PIR_t::BITS_AFTER_CORE), + P8_IP_CHIPID_LSL = (20-PIR_t::BITS_AFTER_CHIP), + P8_IP_NODEID_LSL = (22-PIR_t::BITS_AFTER_GROUP), XIRR_ADDR_OFFSET = 4, MFRR_ADDR_OFFSET = 12, -- cgit v1.2.1