aboutsummaryrefslogtreecommitdiff
path: root/hdata/test/stubs.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26SPDX-ify all skiboot codeStewart Smith1-15/+3
Use Software Package Data Exchange (SPDX) to indicate license for each file that is unique to skiboot. At the same time, ensure the (C) who and years are correct. See https://spdx.org/ Signed-off-by: Stewart Smith <stewart@linux.ibm.com> [oliver: Added a few missing files] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-03-20hdata_to_dt: fail "gracefully" on fatal op_display()Stewart Smith1-1/+0
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-07-18Fixup unit tests for cpu_queue_job() in mem_region.cStewart Smith1-2/+2
Fixes: 06808a037d44231ba36e814ff1dbf66bc8b707da Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-07-15cpu: add cpu_queue_job_on_node()Nicholas Piggin1-0/+47
Add a job scheduling API which will run the job on the requested chip_id (or return failure). Includes test harness fixes from Stewart. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-05-29hdata/tests/stubs.c: fix GCC8 warningStewart Smith1-2/+2
hdata/test/stubs.c:112:11: error: ‘lock_caller’ alias between functions of incompatible types ‘void(void)’ and ‘_Bool(void)’ [-Werror=attribute-alias] NOOP_STUB(lock_caller); ^~~~~~~~~~~ We fix it by giving the correct prototype to our stub Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2017-12-20lock: Add additional lock auditing codeBenjamin Herrenschmidt1-1/+1
Keep track of lock owner name and replace lock_depth counter with a per-cpu list of locks held by the cpu. This allows us to print the actual locks held in case we hit the (in)famous message about opal_pollers being run with a lock held. It also allows us to warn (and drop them) if locks are still held when returning to the OS or completing a scheduled job. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> [stewart: fix unit tests] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-18hdat: fix parsing of P8 hdatStewart Smith1-1/+1
Also fixes hdat_to_dt test cases. Fixes: ad484081ef8a51811e7902aec436fa8f1ca9604a Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-15core: Move enable_mambo_console() into chip initialisationMichael Ellerman1-0/+1
Rather than having a wart in main_cpu_entry() that initialises the mambo console, we can move it into init_chips() which is where we discover that we're on mambo. This also means we don't need to check the quirk again, and has the added bonus that an assert in chip initialisation (which follows immediately) will actually produce output. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> [stewart@linux.vnet.ibm.com: fix make check by adding no-op stub] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-06hdata/test: Add memory reservations to hdata_to_dtOliver O'Halloran1-6/+14
Currently memory reservations are parsed, but since they are not processed until mem_region_init() they don't appear in the output device tree blob. Several bugs have been found with memory reservations so we want them to be part of the test output. Add them and clean up several usages of printf() since we want only the dtb to appear in standard out. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-26hdata: Reserve Trace AreasOliver O'Halloran1-0/+1
When hostboot is configured to setup in memory tracing it will reserve some memory for use by the hardware tracing facility. We need to mark these areas as off limits to the operating system and firmware. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-26mem_region: Add HW-only memory resevationsOliver O'Halloran1-0/+1
Add a new type of memory reservation that indicates a memory region is only used by hardware and should not be touched by software. This is needed for the in-memory tracing buffers. These reservations have the "no-map" property which indicates that the host kernel should not setup any virtual address mappings that cover this range, unless of course a device driver does so explicitly. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-26mem_region: rename HW_RESERVE to FW_RESERVEOliver O'Halloran1-2/+1
Currently all existing reservations are made by hostboot itself or on behalf of some other part of system firmware (e.g. the OCCs). We want to add a "true" hardware reservation type that should not be touched by the host OS. To prepare for that this patch renames the existing reservation type to refect it's actual usage. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16hdata_to_dt: Output up to PR_DEBUGOliver O'Halloran1-4/+4
A lot of stuff that is useful for debugging and general sanity checking of the HDAT parser is only printed at PR_DEBUG. Bump up the log level for hdata_to_dt so that more of this is output by default. The actual test cases only look at the DTS output so there's no harm in being verbose. Clean up the space indentation while we're here. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-16hdata: Add no-op stub functionsOliver O'Halloran1-2/+8
These are useful for side-stepping various HW specific functions. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-30hdata: print backtraces on HDAT errorsOliver O'Halloran1-0/+1
Currently these aren't sufficently obnoxious, so make them more so. HDAT parse errors usually mean we won't be able to generate enough of a device-tree to boot so we want to make this much more obvious. Suggested-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-07hdat: Parse BMC nodes much earlierOliver O'Halloran1-0/+1
This moves the parsing of the BMC and LPC details to the start of the HDAT parsing. This allows us to enable the Skiboot log console earlier so we can get debug output while parsing the rest of the HDAT. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-02-16hdata_to_dt: Only output dtbStewart Smith1-1/+1
convert test cases to diff DTS rather than DTB. This means we also have to build dtc on CentOS 7 to be able to run the test suite. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> [oohall@gmail.com moved the test cases into seperate patches] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-02-06hdata: Add FDT output to hdata_to_dtOliver O'Halloran1-0/+50
Adds a new -d <filename> command line option to the hdata_to_dt utility to output a FDT blob. This lets us output the output DT in standard form that can be handled by the usual tools such as dtc. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-01-15hdat: Parse hostboot memory reservations from HDATVasant Hegde1-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>
2016-08-18Build host programs (and checks) with debug enabledBenjamin Herrenschmidt1-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>
2015-11-11Add hdata_to_dt testStewart Smith1-1/+2
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>
2015-11-11Revive hdata_to_dt and make it work againStewart Smith1-18/+0
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>
2015-05-12Add pr_fmt to do printf/prlog prefixing automagicallyStewart Smith1-2/+7
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-05-07Fixup hdata test for fsp LID preloadingStewart Smith1-1/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24Asynchronous LID/Resource loading for FSP systemsStewart Smith1-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>
2014-12-05Silence warning for hdata/tests/stubs.c prlog missing prototypeStewart Smith1-1/+3
We get the real prototype in real code from skiboot.h Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-08-15{core,hdata}/test: Add prlog to stubJoel Stanley1-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>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt1-0/+47
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>