summaryrefslogtreecommitdiffstats
path: root/hw/fsp
Commit message (Collapse)AuthorAgeFilesLines
...
* | llvm-scan-build: fix value is never read warningStewart Smith2015-11-101-6/+2
| | | | | | | | | | | | | | | | hw/fsp/fsp-sensor.c:425:3: warning: Value stored to 'sensor_buf_ptr' is never read sensor_buf_ptr = (uint32_t *)((uint8_t *)sensor_buffer + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | llvm-scan-build: fix dead assignment warningStewart Smith2015-11-101-6/+2
| | | | | | | | | | | | | | | | hw/fsp/fsp-sensor.c:748:4: warning: Value stored to 'sensor_buf_ptr' is never read sensor_buf_ptr = (uint32_t *)((uint8_t *)sensor_buffer ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | sparse: fix incorrect type in assignment in fsp-mem-err.cStewart Smith2015-11-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since skiboot is all BE, no built code changes hw/fsp/fsp-mem-err.c:215:35: warning: invalid assignment: |= hw/fsp/fsp-mem-err.c:215:35: left side has type restricted beint16_t hw/fsp/fsp-mem-err.c:215:35: right side has type int hw/fsp/fsp-mem-err.c:228:57: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:228:57: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_start hw/fsp/fsp-mem-err.c:228:57: got unsigned long long [unsigned] [usertype] paddr hw/fsp/fsp-mem-err.c:229:55: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:229:55: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_end hw/fsp/fsp-mem-err.c:229:55: got unsigned long long hw/fsp/fsp-mem-err.c:269:65: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:269:65: expected restricted beint64_t [usertype] physical_address_end hw/fsp/fsp-mem-err.c:269:65: got unsigned long long [unsigned] [usertype] paddr_end hw/fsp/fsp-mem-err.c:318:58: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:318:58: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_start hw/fsp/fsp-mem-err.c:318:58: got unsigned long long [unsigned] [usertype] paddr_start hw/fsp/fsp-mem-err.c:319:56: warning: incorrect type in assignment (different base types) hw/fsp/fsp-mem-err.c:319:56: expected restricted beint64_t [addressable] [assigned] [usertype] physical_address_end hw/fsp/fsp-mem-err.c:319:56: got unsigned long long [unsigned] [usertype] paddr_end Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | sparse: fix be64 degrades to integer warnings in fsp-mem-err.cStewart Smith2015-11-101-6/+6
| | | | | | | | | | | | | | | | | | | | No code changes in skiboot due to being BE hw/fsp/fsp-mem-err.c:162:44: warning: restricted beint64_t degrades to integer hw/fsp/fsp-mem-err.c:263:45: warning: restricted beint64_t degrades to integer hw/fsp/fsp-mem-err.c:266:52: warning: restricted beint64_t degrades to integer Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | sparse: correct endian conversion of sglistStewart Smith2015-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | No generated code change for skiboot, as is BE hw/fsp/fsp-dump.c:422:31: warning: invalid assignment: += hw/fsp/fsp-dump.c:422:31: left side has type signed long long hw/fsp/fsp-dump.c:422:31: right side has type restricted beint64_t Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | sparse: add missing endian conversion in fsp-attn.cStewart Smith2015-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | hw/fsp/fsp-attn.c:104:30: warning: incorrect type in assignment (different base types) hw/fsp/fsp-attn.c:104:30: expected restricted beint32_t <noident> hw/fsp/fsp-attn.c:104:30: got unsigned int [unsigned] [usertype] <noident> No generated code change for skiboot as we're BE Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | sparse: fix endian conversion for MDST tableStewart Smith2015-11-101-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hdata/spira.c:94:25: warning: incorrect type in initializer (different base types) hdata/spira.c:94:25: expected unsigned long long [unsigned] [usertype] addr hdata/spira.c:94:25: got restricted beint64_t [usertype] <noident> hdata/spira.c:95:25: warning: incorrect type in initializer (different base types) hdata/spira.c:95:25: expected unsigned int [unsigned] [usertype] type hdata/spira.c:95:25: got restricted beint32_t [usertype] <noident> hdata/spira.c:96:25: warning: incorrect type in initializer (different base types) hdata/spira.c:96:25: expected unsigned int [unsigned] [usertype] size hdata/spira.c:96:25: got restricted beint32_t [usertype] <noident> hdata/spira.c:99:25: warning: incorrect type in initializer (different base types) hdata/spira.c:99:25: expected unsigned long long [unsigned] [usertype] addr hdata/spira.c:99:25: got restricted beint64_t [usertype] <noident> hdata/spira.c:100:25: warning: incorrect type in initializer (different base types) hdata/spira.c:100:25: expected unsigned int [unsigned] [usertype] type hdata/spira.c:100:25: got restricted beint32_t [usertype] <noident> hdata/spira.c:101:25: warning: incorrect type in initializer (different base types) hdata/spira.c:101:25: expected unsigned int [unsigned] [usertype] size hdata/spira.c:101:25: got restricted beint32_t [usertype] <noident> This also means we use proper conversions in fsp-mdst-table.c This means no actual change for skiboot as it's BE. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | fsp/dpo: DPO driver code improvementsVipin K Parashar2015-10-141-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes below code improvements in DPO driver for FSP based systems: 1. Improves code logic at few places. 2. Improves logging by changing PR_TRACE severity to PR_INFO for log messages and adding new log messages. 3. Removes unused header files. 4. Replaces Sapphire word with OPAL in comments. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Merge branch 'stable': FSP leds fix and skiboot 5.1.7 release notesStewart Smith2015-10-131-1/+12
|\ \ | |/
| * Merge branch 'update-2.1.1.1' into stableStewart Smith2015-10-091-1/+12
| |\
| | * hw/fsp/fsp-leds.c: use allocated buffer for FSP_CMD_GET_LED_LIST responseStewart Smith2015-10-091-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug has originated since day 1 (of public release), what was going on was that we were incorrectly using PSI_DMA_LOC_COD_BUF as the *address* to write to for the FSP to read rather than using that purely as the TCE table. What we *should* have been doing (and this patch now does), is allocating some (aligned) memory and using it. With this patch, we no longer write over some poor random memory location that could be being used by the host OS for something important, for example, in the (internal) bug report of this, it was futex_hash_bucket in Linux being replaced with our structure for replying to FSP_CMD_GET_LED_LIST (which is around 4kb) and Linux doesn't like it when you replace a bunch of lock data structures with essentially garbage. Since this is FSP LED code specific, this only affects FSP based systems. Reported-by: Dionysius d. Bell <belldi@us.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
| | * fsp: Avoid NULL dereference in case of invalid class_resp bitsBenjamin Herrenschmidt2014-12-091-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When handling timeouts, we appear to do an occasional NULL dereference in fsp_timeout_poll() due to fsp_cmdclass_resp_bitmask being out of sync (bit set but class queue empty). The cause for the discrepancy will be sorted out separately but the code should be more robust. Additionally, add a lock to ensure we don't race on the timer calculations otherwise we might get spurrious dual detection of the timeout. Fixes SW288484 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | | chiptod: chiptod code improvementsVipin K Parashar2015-10-071-6/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes below changes in chiptod code to improve quality Changes in hw/chiptod.c - Uses pr_fmt macro for tagging log messages - Simplifies if conditions - Removes extra write spaces Changes in hw/fsp/fsp-chiptod.c - Uses pr_fmt macro for tagging log messages Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | fsp/ipmi: Fix an illegal memory accessNeelesh Gupta2015-09-111-2/+1
| | | | | | | | | | | | | | | | | | | | The patch fixes an illegal access to the memory which has been freed. Fixes Coverity defect # 101858 Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | move enum ipl_state to hw/fsp/fsp.cStewart Smith2015-09-101-0/+10
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Move FSP specific abort() code to platform layerVasant Hegde2015-09-091-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presently abort() call sets up HID0, triggers attention and finally calls infinite for loop. FSP takes care of collecting required logs and reboots the system. This sequence is specific to FSP machine and it will not work on BMC based machine. Hence move FSP specific code to hw/fsp/fsp-attn.c. Note that this patch adds new parameter to abort call. Hence replaced _abort() by abort() in exception.c so that we can capture file info as well. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix index of -1 into arrayStewart Smith2015-09-081-1/+3
| | | | | | | | | | | | | | | | | | | | In the event that we had no IO paths up, we could index -1 into the array of iopaths, no doubt causing casual amounts of fun. Although, since this is in early boot code only, the possibility of this being a problem is quite slim. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix stored value never read warning from scan-build in FSP code updateStewart Smith2015-08-311-0/+3
| | | | | | | | | | | | Instead just print a PR_TRACE notice as (by design), this is an okay thing. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix spelling mistakesStewart Smith2015-08-265-8/+8
| | | | | | | | | | | | See https://github.com/lucasdemarchi/codespel Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | fsp/fsp-chiptod: Fix uninitialized valueKamalesh Babulal2015-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Initialized variable rc to 0, to fix uninitialized value issue. Fixes Coverity defect#101857. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Acked-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | fsp/chiptod: Fix initialised variableJoel Stanley2015-08-131-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If chiptod_adjust_topology returned true, rc would be uninitialised and the message type passed to fsp_mkmsg would be undefined. This also changes chiptod_adjust_topology to return true/false instead of -1 and 0. hw/fsp/fsp-chiptod.c:45:7: error: variable 'rc' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (chiptod_adjust_topology(topo, action) < 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/fsp/fsp-chiptod.c:48:50: note: uninitialized use occurs here resp = fsp_mkmsg(FSP_RSP_TOPO_ENABLE_DISABLE | rc, 0); ^~ hw/fsp/fsp-chiptod.c:45:3: note: remove the 'if' if its condition is always true if (chiptod_adjust_topology(topo, action) < 0) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hw/fsp/fsp-chiptod.c:30:12: note: initialize the variable 'rc' to silence this warning uint8_t rc; ^ = '\0' Signed-off-by: Joel Stanley <joel@jms.id.au> foo Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | errorlog: Deprecate elog callback parameterSamuel Mendoza-Jonas2015-07-3112-41/+38
| | | | | | | | | | | | | | | | | | | | There are now no users of the call_out parameter and future users should use the log_append_msg() and log_append_data() functions, so remove all references to call_out. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | errorlog: Simplify log calling conventionSamuel Mendoza-Jonas2015-07-311-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the callback functionality from log_error() and replace it with the ability to append to a user data section, or add addtional user data sections to an error log. For multiline or otherwise complex logging the convention is now to call opal_elog_create() to obtain a errorlog buffer and use log_append_msg() and log_append_data() to append to the user data section. Additional user data sections can be added to the error log via log_add_section(). The caller is then responsible for calling log_commit(). For simple logs log_simple_error() takes care of creating and committing the error log as before. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/LEDS: Add support to handle SAI state request from service processorVasant Hegde2015-07-171-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ideally service processor shouldn't request OPAL for SAI state...as this LED is controlled by service processor itself. But of some reason its asking OPAL to provide state. Hence handle this request until FSP team fixes it. Sample log without this patch: [77884350335,3] FSPLED: Could not find the location code LC=U8246.L2C.060377A [77942662287,8] FSPLED: FSP_CMD_GET_LED_LIST command received Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/LEDS: Remove led-loc propertyVasant Hegde2015-07-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We added led-loc property.. which contains LED location information. But this property was never used. Also we can make out LED location (enclosure/component) based on location code (if location code doesn't contain "-" means its enclosure location code). As Ben suggested [1], removing this property. Present code is included in skiboot skiboot-5.0 release..But we don't have any consumer yet. Hence I think its fine to make this changes. [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-June/130433.html Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | fsp/ipmi: Add the in-band IPMI support for FSP systemsNeelesh Gupta2015-07-102-1/+356
| | | | | | | | | | | | | | | | | | | | | | FSP implements the IPMI commands support that can be accessed over the mailbox interface from the host. The host needs to provide and receive the message/data bytes of the IPMI command in the TCE space in the KCS (Keyboard Controller Style) format. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | fsp/mem-err: Fix leak in one error path and minor clean upsNeelesh Gupta2015-07-101-10/+4
| | | | | | | | | | Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | opal: Enable backup topology.Mahesh Salgaonkar2015-07-092-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever FSP makes any changes to backup topology as part of either routine hardware maintenance or fixing failed backup topology configuration, it sends out mailbox command xE6, s/c 0x06, mod 0, to enable/disable the backup topology. OPAL layer should keep itself up-to-date with accurate details of current topology configurations. This will help OPAL layer to successfully handle any TOD failover in future. The FSP can only request that the currently inactive (backup) topology be disabled or enabled. If the requested topology is currently the active topology, then fail this request with a 0xB8 (TOD topology in use) status as return code. For disable request, set the backup topology status as disabled. For enable request, scan all the available chips and find the new backup master chip by looking at TOD status register of each chip. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | doc/opal-api: Add description of OPAL EPOW and DPO messagesVipin K Parashar2015-06-291-1/+1
| | | | | | | | | | | | | | Updated opal-messages.txt with description of OPAL EPOW and DPO messages Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | queue_led_state_change() - Fix unterminated string warningKamalesh Babulal2015-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | struct led_set_cmd cmd is zalloc. While doing strncpy of loc_code to cmd->loc_code, there are chances of cmd->loc_code being unterminated. Fix the issue by copying LOC_CODE_SIZE - 1. Fixes Coverity defect #100249. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix possible buffer overflowAnanth N Mavinakayanahalli2015-06-191-1/+2
| | | | | | | | | | | | | | NULL terminate and truncate size of copy into char buffer to the right size. Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Use destination buffer size as bound for strncpyAnanth N Mavinakayanahalli2015-06-191-1/+1
| | | | | | | | | | | | | | | | ... instead of potentially unbounded src buffer size Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix potential NULL pointer dereferenceAnanth N Mavinakayanahalli2015-06-191-0/+2
| | | | | | | | | | | | | | | | Safety check... Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix potential NULL pointer dereferenceAnanth N Mavinakayanahalli2015-06-191-0/+2
| | | | | | | | | | | | | | Safety check... Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix surveillance lockingAnanth N Mavinakayanahalli2015-06-161-0/+2
| | | | | | | | | | | | | | | | There is one instance of fsp_surv_state that is accessed without the surveillance lock. Fix it. Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/EPOW: OPAL EPOW driver cleanupVipin K Parashar2015-06-012-160/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch performs below cleanup: * Removes processing for SPCN bits as SPCN events don't cause any EPOW * Removes code to do a panel status query again after receiving mbox panel status notification which already has EPOW info present. * Edits some debug prints and comments. * Removes extra header files included. Current OPAL EPOW driver would be parsing mbox panel status notifications for EPOW info and sending OPAL_MSG_EPOW notification once EPOW is detected. System on UPS power, abnormal ambient or internal temp EPOW conditions are covered by driver. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Add pr_fmt to do printf/prlog prefixing automagicallyStewart Smith2015-05-124-171/+126
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Preload VPD LID and set up fsp_lid_load() for async queued loadingStewart Smith2015-05-072-5/+29
| | | | | | | | | | | | | | | | This means VPD LID is already loaded before we start preloading kernel and initramfs LIDs, thus ensuring VPD doesn't have to wait for them to finish being read from FSP. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP LID loading: always remove from lid_loaded listStewart Smith2015-05-071-4/+2
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | Fix FSP resource/LID loading for preloading LIDs.Stewart Smith2015-05-071-5/+9
| | | | | | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/ELOG: Remove TCE mapping for host bufferVasant Hegde2015-05-071-3/+0
| | | | | | | | | | | | | | | | elog_write_to_host_buffer is used to pass error log to host. Hence we don't need TCE mapping for this buffer. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/ELOG: Reduce elog write buffer sizeVasant Hegde2015-05-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Present we are allocating 64K for emergency and host buffer. But we just need 16K (which is the max elog size). Hence reduce the variable size to 16K. Similarly we are allocating 256K for normal fsp write error log path. (elog_write_to_fsp_buffer). But in reality we just need 16K. Hence reduce this size as well. Note that we have top level elog pool with 64 entries of 16K to hold multiple errors. So we are fine here. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/ELOG: Free error log buffer in error pathVasant Hegde2015-05-071-1/+5
| | | | | | | | | | | | | | Also pass MBOX return state instead of sending "true" always. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/ELOG: Do not reject elog in acknowledgement pathVasant Hegde2015-05-071-2/+0
| | | | | | | | | | | | | | | | Remove useless elog_reject_head call in acknowledgement path. We can ACK elog in any order. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/ELOG: Use elog REJECT state properlyVasant Hegde2015-05-071-2/+7
| | | | | | | | | | | | | | | | Presently we continue to read error log even though elog state is "REJECTED". This patch fixes this by rearraning code. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/ELOG: Reduce elog read buffer sizeVasant Hegde2015-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | Presently we are allocating 256K for elog read buffer. But we just read one log at a time. Also maximum size of ELOG is 16KB. Effectively we are not using remaining 240K. This patch reduces the size of the buffer to 16K. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/LED: Handle SA indicator update notificationVasant Hegde2015-05-071-0/+30
| | | | | | | | | | | | | | | | FSP sends SA indicator update notification via sys param update. Use that info to update cached indicator state. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/SYSPARAM: Introduce update notify system parameter notifierVasant Hegde2015-05-071-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | FSP sends update system parameter notification asynchronously. Presently no one is using this notification. We just ACK this notification. This patch adds notifier chain so that if someone (like LED) is interested in this notification, they can register and get notification. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/LED: Add system attention indicator supportVasant Hegde2015-05-071-1/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SAI is controlled by FSP. This patch adds support to get/set this indicator. Also update OPAL interface so that playload can read/set this indicator. During init, we read this indicator state using MBOX command. OPAL uses MBOX interface to update this SAI. FSP sends update notification whenever there is change in SAI state (except for OPAL initiates updates). We use the notification to update cached SAI state. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* | FSP/LED: Get SAI location code from device treeVasant Hegde2015-05-071-11/+59
| | | | | | | | | | | | | | | | SAI information is available in device tree. This patch parses device tree to get SAI location code information. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud