summaryrefslogtreecommitdiffstats
path: root/hdata/test
Commit message (Collapse)AuthorAgeFilesLines
...
* hdat: Parse hostboot memory reservations from HDATVasant Hegde2017-01-151-0/+1
| | | | | | | | | | | | Hostboot reserves some memory and passes via HDAT. This patch adds code to parse node reservation details and marks it as REGION_HW_RESERVED. Later mem_region_add_dt_reserved() populates DT entry. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: allocate memory for label] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat: Add new fields to IPL params structureVasant Hegde2017-01-152-0/+2
| | | | | | | | | | | | | | | | Add new fields to sys params structure and update sys family for p9. In P9 the compatible string is supplied by hostboot through the HDAT. This patch add support for using these strings to set the compatible property in the device tree rather than using the machine ID number scheme traditionally used in the HDAT. [removed ibm,firenze from, add some prints - Oliver] Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [Folded Oliver's changes to original patch - Vasant] Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: fixup test case] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* HDAT: Fix typo in nest-frequency propertyVasant Hegde2016-09-272-2/+8
| | | | | | | | | nest-frquency -> nest-frequency Fixes: 5cda6f6d (platforms/firenze: Fix I2C clock source frequency) CC: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* core/init: create the dt root in main_cpu_entryOliver O'Halloran2016-09-271-0/+2
| | | | | | | | | This is created seperately when parsing the hdat and when expanding the DT. There is no real reason for this and it makes more sense to create it in the main init path. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* core/init: remove master_cpu parameterOliver O'Halloran2016-09-271-1/+1
| | | | | | | | | | | | master_cpu is used to determine the ChipTOD master if no ChipTOD information is available in the HDAT. However, it is set to zero at every skiboot entry point (fdt_entry, the 0x180 FSP entry and opal_boot_trampoline) and is otherwise unused. This patch removes this passing around and uses the boot CPU PIR to find the ChipTOD master rather than zero. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* consolidate gcov flags into HOSTGCOVFLAGS for host binariesStewart Smith2016-09-021-1/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Build host programs (and checks) with debug enabledBenjamin Herrenschmidt2016-08-181-0/+2
| | | | | | | | This enables memory poisoning in allocations and list checking among other things. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdat/vpd: Add chip-id property to processor chip node under vpdVasant Hegde2016-07-282-0/+6
| | | | | | | | | | We have core information under /cpus node and processor chip VPD data (like SN, LN, etc) under /vpd directory. Presently we don't have any property to relate cores and chip information. This patch adds chip-id information for processor chip nodes under vpd. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* interrupts: Remove #interrupt-cells from ICP nodesBenjamin Herrenschmidt2016-07-122-26/+0
| | | | | | | | | It's not necessary and not in PAPR. HostBoot should probably do a similar change. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Timebase quirk for slow simulators like AWAN and SIMICSBenjamin Herrenschmidt2016-07-061-0/+2
| | | | | | | | | | | This will internally pretend the timebase is running 1000 times slower, which reduces some otherwise really terrible delays in some simulators. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: move cfam_chipid cleanup into own patch] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata: Make hdata_to_dt more suitable for fuzzingStewart Smith2016-05-181-4/+26
| | | | | | | | We make parse_hdat() return success/failure rather than assert. This allows the hdata_to_dt binary to gracefully error out rather than assert, which is useful when throwing it at a fuzzer. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add base POWER9 supportMichael Neuling2016-05-101-1/+2
| | | | | | | | | | | Add PVR detection, chip id and other misc bits for POWER9. POWER9 changes the location of the HILE and attn enable bits in the HID0 register, so add these definitions also. Signed-off-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: Fix Numbus typo, hdata_to_dt build fixes] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/test: Add new test caseVasant Hegde2016-04-014-0/+4302
| | | | | | | Add test case for SPIRA-H/S. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/hdata_to_dt: Add -s optionVasant Hegde2016-04-011-28/+52
| | | | | | | | hdata_to_dt handles legacy SPIRA data only. This patch adds new option (-s) to handle new SPIRAH/S data. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* */test/*: Added '<subdir>-check' make targetsOliver O'Halloran2016-03-301-2/+7
| | | | | | | Currently these exist for some parts of the source tree, but not all of it. They're nice if you are only modifing code in a one part of the tree as the full test suite can be a little slow. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/test: Fix 'make clean'Vasant Hegde2016-03-111-1/+2
| | | | | | | Remove *-gcov and *.d files. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* platforms/firenze: Fix I2C clock source frequencyGavin Shan2016-03-081-0/+1
| | | | | | | | | | | | | | | | The I2C master clock source frequency is hardcoded to wrong value. The correct frequency should be the nest clock frequency divided by 16 as Ben said. This fixes I2C master source frequency with the help of additional properties "nest-frequency" and "bus-frequency" to root and xscom device node separately. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: fixup hdata test for added property] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* DT sorting testOliver O'Halloran2016-01-211-45/+1
| | | | | | | | | | | | Moved the dt_dump() into test/dt_common.c so that it can be shared between hdata/test/hdata_to_dt.c and core/test/run-device.c run-device.c contains two tests, one basic sorting test and a generate-and-sort test. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: remove trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/test: Updated the hdata_to_dt test data for the new sorting behaviourOliver O'Halloran2016-01-211-8906/+8725
| | | | | Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/hdata_to_dt.c: Also print node names.Oliver O'Halloran2016-01-212-8648/+8995
| | | | | | | | | Currently the hdata_to_dt script will only dump the node properties. This change adds a "node: <name>" line to the default output and adds the -t flag to only print the node names, without properties. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fix endian flip in printf for FSP in hdata/fsp.cStewart Smith2016-01-211-1/+1
| | | | | | | | | | | commit dfab2fb87c2d83e240a002e8829b525d10342df3 upstream Harmless for skiboot as we're BE. When building and running unit tests on LE though, we got an incorrect hw/software version for FSP hardware/software for hdata_to_dt test. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Revive hdata_to_dt and make it work againStewart Smith2016-01-212-18/+3
| | | | | | | | | commit 27b49826e5f1d9c0008c0a5bf0953dd673a9b9e1 upstream Some functions were stubbed out which meant we hit assert rather than dumping out the device tree Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Use VALGRIND callout rather than tricky malloc/memcpyStewart Smith2016-01-211-3/+3
| | | | | | | | | | | | commit d04030556db4bb73151172ded3f279882e706dbd upstream The tricky memcpy trips up various static analysers and looks rather odd. The more correct thing to do is to ask valgrind to mark it as undefined. There's a call for that, and we depend on valgrind to run the test suite anyway, so we're not introducing a new dependency. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add hdata_to_dt testStewart Smith2016-01-216-10/+8765
| | | | | | | | | | | commit 6dc84bb65a3f51b97d2728a8fcdadacf8114293f upstream This adds ~1000 lines of code to the coverage-report. We manipulate the log levels of a few messages that contain pointers so that a basic diff of the hdata_to_dt output is possible. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata test: Check the return value from lseekKamalesh Babulal2015-07-071-1/+3
| | | | | | | | | | | | 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>
* Add pr_fmt to do printf/prlog prefixing automagicallyStewart Smith2015-05-121-2/+7
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fixup hdata test for fsp LID preloadingStewart Smith2015-05-072-1/+4
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add Naples chip supportBenjamin Herrenschmidt2015-04-091-0/+1
| | | | | | | | | | 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>
* Asynchronous LID/Resource loading for FSP systemsStewart Smith2015-03-241-1/+1
| | | | | | | | | | | | | | | 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>
* Make building of hdata unit tests quietStewart Smith2015-01-211-2/+2
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fix makefile dependency generation, especially for HOSTCCStewart Smith2014-12-151-0/+2
| | | | | | | | | | | 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>
* Silence warning for hdata/tests/stubs.c prlog missing prototypeStewart Smith2014-12-051-1/+3
| | | | | | We get the real prototype in real code from skiboot.h Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hdata/test: Fix broken testsJoel Stanley2014-08-151-1/+1
| | | | | | | | | | | | | | 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>
* {core,hdata}/test: Add prlog to stubJoel Stanley2014-08-151-1/+12
| | | | | | | | 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>
* Initial commit of Open Source releaseBenjamin Herrenschmidt2014-07-023-0/+280
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
OpenPOWER on IntegriCloud