Age | Commit message (Collapse) | Author | Files | Lines |
|
dt_find_property() might return NULL. In handle_capp_recoverable,
check for return value, before dereferencing it.
Fixes Coverity defect#97844.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
dt_find_property() might return NULL. In __paca_parse(),
check for return value, before dereferencing it.
Also fix trailing white spaces.
Fixes Coverity defect#97842.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
In add_size_to_ram_area(), Introduce check for memory
allocation failure, before using it.
Fixes Coverity defect#97840.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
In find_shared(), dt_find_property might return NULL value,
so check for validity of the pointer before dereferencing it.
Fixes Coverity defect#97846.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fix memory leak by free-ing 'links'. Also, fix trailing white
spaces.
Fixes Coverity defect#98816.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
HDIF_get_iarray_size could return -1 on failure, so detect that
and somewhat gracefully back out of an awful loop
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Check if value returned by lseek is non-negative, as we
will be passing it mmap. Fix it up, by aborting on negative
value.
Fixes Coverity defect#98808.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
[stewart@linux.vnet.ibm.com: fix spira_heap_size type]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fix NULL pointer dereference in paca.c
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
V2: Use CHECK_SPPTR instead of NULL
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fetch the memory bus frequency present in PCIA area and add this
information to the memory node.
ms-dimm@d000 {
[...]
description = "32GB CDIMM";
ibm,loc-code = "U78C9.001.WZS03HU-P1-C16";
ibm,memory-bus-frequency = <0x0 0x5f5e1000>;
serial-number = "YH10M147C1L1";
fru-type = [4d 53];
[...]
};
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Fix leak and avoid repeated call to the same function
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
That way user space tools can identify the change in VPD layout etc.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Populate CCIN description and model-name property as "Unknown" if its
not available (say new system model, etc). That way device tree will
be consistent.
Also improve error logging.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Reviewed-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
On FSP based machine, FSP controls System Attention Indicator. This
indicator detail (location code) is passed to OPAL via HDAT. OPAL
can get/set this indicator via normal MBOX command.
This patch takes care of parsing SLCA entry and populating device tree
with SAI location code.
Device Tree:
We create '/ibm,opal/led' node which contains all location code LED
information. 'led-types' property under each node tells LED type.
For SAI indicator 'led-types' property will be 'attention'.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
FSP based machine supports two different LED modes:
- Light Path : Both identify and fault LEDs are supported
- Guiding Light: Only identify LEDs are supported
And this information is passed to OPAL via HDAT. Lets parse this
and populate the device tree. Later LED driver uses this information
to populate indivisual LED node.
Device Tree property:
/ibm,opal/led/led-mode : lightpath/guidinglight
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Unfortunately we do not have single place to get all LED related
information (Some of the information is passed via HDAT and rest
via MBOX command).
Lets create led node before parsing HDAT and use this node to
populate all LED related information.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This adds the PVR and CFAM ID for the Naples chip. Otherwise treated as
a Venice.
This doesn't add the definitions for the new PHB revision yet
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This moves away from using fsp_sync_msg in fsp_fetch_data and instead
using the platform hooks for start_preload_resource() to actually queue
up a load and having the plumbing for checking if a resource is loaded yet.
This gets rid of the "pollers called with locks held" warning we got
heaps of previously. You can now boot some FSP systems without getting
this warning at all.
This also sets the stage for starting load of LIDs much earlier to when
they're needed, improving boot time.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Location codes are no more than 80 characters (including
terminating NULL char).
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
This patch changes all printf based log messages in the
hdata/slca code to prlog based log messages.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
SLCA entries available through hdat have parent-child relationship of
various FRUs of the system, the patch makes use of this data to create
VPD nodes in hierarchial fashion.
This is further useful for the user space tools like 'lshw'/'lsvpd' to
plug-in the support easily on POWER.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Instead of having individual rules to generate .d, add -MMD to
HOSTCC parameters, and just include the generated .d files.
This fixes a few weird dependency issues.
Also, make the mambo hello_kernel test depend on skiboot.lid
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Passing the wrong parameter to snprintf (sizeof(char*)) rather
than actual length of the string. GCC 4.9 told us about it (and broke
make check when I enabled -Werror)
hdata/test/../memory.c: In function ‘add_address_range’:
hdata/test/../memory.c:144:23: error: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We get the real prototype in real code from skiboot.h
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
It only exposed one function that is local to the hdat stuff
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We're mostly PR_DEBUG here, except for the basics, which are PR_INFO.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We will PR_INFO the total amount of memory, as this is just
informative.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
It's certainly not an error that we have a serial port, and not
essential to display during boot. Odds are, you already know
about the serial port.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
If we have an UNAVAILABLE core (e.g. garded by FSP), we *WILL*
print that out with PR_WARNING, as that's probably something
that people want to pay attention to. Otherwise we stick with
PR_INFO, which should be enough for these kind of log messages.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We can, by default, deal with just two lines rather than 5 of
ASCII art
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Commit e810dcbc (ATTN: Set up attention area to handle attention) broke
tests, as the familiy of CPU_TO_BEXX macros are not compile time constant.
hdata/test/../spira.c:60:4: error: initializer element is not constant
.addr = CPU_TO_BE64((unsigned long)&(cpu_ctl_spat_area) + SKIBOOT_BASE)
There is no test coverage of this code, so for now we can comment out
these areas in order to allow the tests to pass.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
We are missing a prlog for tests. This adds a dumb version that ignores
the log level and uses printf to display all messages.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
At present CPU control area ntuple in SPIRA structure is NULL.
ATTN component in Service Processor side checks for this field and if its empty,
it logs hardcoded SRC (0xBB821410) and generates SYSDUMP. So we have 1 SRC for
all failure (assert call) from OPAL side. This makes difficult to debug the issue.
Service processor provides attention area interface (FIPS PHyp Attentions spec),
so that we can pass SRC and user data (error message) to service processor.
This will helps us identify different failures in OPAL.
This patch enables attention area and provides interface (update_sp_attn_area())
to add src and user data (error message) through assert macro.
Attention SRC format:
1st byte - Opal src type
2-4 bytes - Holds the address of the assert function call
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
- Better function naming
- Better macro naming
- Re-ordered function variables
- calculate max_mdst_entry after allocating memory
for mdst table.
No change in functionality.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|