diff options
Diffstat (limited to 'coverage-report/hdata/hostservices.c.gcov.html')
-rw-r--r-- | coverage-report/hdata/hostservices.c.gcov.html | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/coverage-report/hdata/hostservices.c.gcov.html b/coverage-report/hdata/hostservices.c.gcov.html new file mode 100644 index 0000000..a6c399a --- /dev/null +++ b/coverage-report/hdata/hostservices.c.gcov.html @@ -0,0 +1,169 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + +<html lang="en"> + +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title>LCOV - skiboot.info - hdata/hostservices.c</title> + <link rel="stylesheet" type="text/css" href="../gcov.css"> +</head> + +<body> + + <table width="100%" border=0 cellspacing=0 cellpadding=0> + <tr><td class="title">LCOV - code coverage report</td></tr> + <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr> + + <tr> + <td width="100%"> + <table cellpadding=1 border=0 width="100%"> + <tr> + <td width="10%" class="headerItem">Current view:</td> + <td width="35%" class="headerValue"><a href="../index.html">top level</a> - <a href="index.html">hdata</a> - hostservices.c<span style="font-size: 80%;"> (source / <a href="hostservices.c.func-sort-c.html">functions</a>)</span></td> + <td width="5%"></td> + <td width="15%"></td> + <td width="10%" class="headerCovTableHead">Hit</td> + <td width="10%" class="headerCovTableHead">Total</td> + <td width="15%" class="headerCovTableHead">Coverage</td> + </tr> + <tr> + <td class="headerItem">Test:</td> + <td class="headerValue">skiboot.info</td> + <td></td> + <td class="headerItem">Lines:</td> + <td class="headerCovTableEntry">26</td> + <td class="headerCovTableEntry">32</td> + <td class="headerCovTableEntryMed">81.2 %</td> + </tr> + <tr> + <td class="headerItem">Date:</td> + <td class="headerValue">2021-05-13 12:18:09</td> + <td></td> + <td class="headerItem">Functions:</td> + <td class="headerCovTableEntry">3</td> + <td class="headerCovTableEntry">3</td> + <td class="headerCovTableEntryHi">100.0 %</td> + </tr> + <tr> + <td></td> + <td></td> + <td></td> + <td class="headerItem">Branches:</td> + <td class="headerCovTableEntry">0</td> + <td class="headerCovTableEntry">0</td> + <td class="headerCovTableEntryHi">-</td> + </tr> + <tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr> + </table> + </td> + </tr> + + <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr> + </table> + + <table cellpadding=0 cellspacing=0 border=0> + <tr> + <td><br></td> + </tr> + <tr> + <td> +<pre class="sourceHeading"> Branch data Line data Source code</pre> +<pre class="source"> +<a name="1"><span class="lineNum"> 1 </span> : : // SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later</a> +<a name="2"><span class="lineNum"> 2 </span> : : /* Copyright 2013-2017 IBM Corp. */</a> +<a name="3"><span class="lineNum"> 3 </span> : : </a> +<a name="4"><span class="lineNum"> 4 </span> : : #include <stdint.h></a> +<a name="5"><span class="lineNum"> 5 </span> : : #include <stdlib.h></a> +<a name="6"><span class="lineNum"> 6 </span> : : #include <stdio.h></a> +<a name="7"><span class="lineNum"> 7 </span> : : </a> +<a name="8"><span class="lineNum"> 8 </span> : : #include <libfdt/libfdt.h></a> +<a name="9"><span class="lineNum"> 9 </span> : : #include <skiboot.h></a> +<a name="10"><span class="lineNum"> 10 </span> : : #include <device.h></a> +<a name="11"><span class="lineNum"> 11 </span> : : #include <compiler.h></a> +<a name="12"><span class="lineNum"> 12 </span> : : #include <hostservices.h></a> +<a name="13"><span class="lineNum"> 13 </span> : : </a> +<a name="14"><span class="lineNum"> 14 </span> : : #include "spira.h"</a> +<a name="15"><span class="lineNum"> 15 </span> : : #include "hdata.h"</a> +<a name="16"><span class="lineNum"> 16 </span> : : </a> +<a name="17"><span class="lineNum"> 17 </span> :<span class="lineCov"> 6 : static void merge_property(const struct dt_node *src_root,</span></a> +<a name="18"><span class="lineNum"> 18 </span> : : struct dt_node *dst_root,</a> +<a name="19"><span class="lineNum"> 19 </span> : : const char *name)</a> +<a name="20"><span class="lineNum"> 20 </span> : : {</a> +<a name="21"><span class="lineNum"> 21 </span> : : const struct dt_property *src;</a> +<a name="22"><span class="lineNum"> 22 </span> : : struct dt_property *dst;</a> +<a name="23"><span class="lineNum"> 23 </span> : : </a> +<a name="24"><span class="lineNum"> 24 </span> : : /* Nothing to merge if old one doesn't exist. */</a> +<a name="25"><span class="lineNum"> 25 </span> :<span class="lineCov"> 6 : src = dt_find_property(src_root, name);</span></a> +<a name="26"><span class="lineNum"> 26 </span> :<span class="lineCov"> 6 : if (!src)</span></a> +<a name="27"><span class="lineNum"> 27 </span> :<span class="lineCov"> 6 : return;</span></a> +<a name="28"><span class="lineNum"> 28 </span> : : </a> +<a name="29"><span class="lineNum"> 29 </span> : : /* Just create a new one if there's none in dst. */</a> +<a name="30"><span class="lineNum"> 30 </span> :<span class="lineCov"> 6 : dst = __dt_find_property(dst_root, name);</span></a> +<a name="31"><span class="lineNum"> 31 </span> :<span class="lineCov"> 6 : if (!dst) {</span></a> +<a name="32"><span class="lineNum"> 32 </span> :<span class="lineCov"> 6 : dt_add_property(dst_root, name, src->prop, src->len);</span></a> +<a name="33"><span class="lineNum"> 33 </span> :<span class="lineCov"> 6 : return;</span></a> +<a name="34"><span class="lineNum"> 34 </span> : : }</a> +<a name="35"><span class="lineNum"> 35 </span> : : </a> +<a name="36"><span class="lineNum"> 36 </span> : : /* Append src to dst. */</a> +<a name="37"><span class="lineNum"> 37 </span> :<span class="lineNoCov"> 0 : dt_resize_property(&dst, dst->len + src->len);</span></a> +<a name="38"><span class="lineNum"> 38 </span> :<span class="lineNoCov"> 0 : memcpy(dst->prop + dst->len, src->prop, src->len);</span></a> +<a name="39"><span class="lineNum"> 39 </span> : : }</a> +<a name="40"><span class="lineNum"> 40 </span> : : </a> +<a name="41"><span class="lineNum"> 41 </span> :<span class="lineCov"> 2 : static void hservice_parse_dt_tree(const struct dt_node *src)</span></a> +<a name="42"><span class="lineNum"> 42 </span> : : {</a> +<a name="43"><span class="lineNum"> 43 </span> : : const struct dt_property *sprop;</a> +<a name="44"><span class="lineNum"> 44 </span> : : </a> +<a name="45"><span class="lineNum"> 45 </span> : : /* Copy/merge reserved names & ranges properties. */</a> +<a name="46"><span class="lineNum"> 46 </span> :<span class="lineCov"> 12 : list_for_each(&src->properties, sprop, list) {</span></a> +<a name="47"><span class="lineNum"> 47 </span> :<span class="lineCov"> 10 : if (streq(sprop->name, "reserved-names") ||</span></a> +<a name="48"><span class="lineNum"> 48 </span> :<span class="lineCov"> 8 : streq(sprop->name, "reserved-ranges") ||</span></a> +<a name="49"><span class="lineNum"> 49 </span> :<span class="lineCov"> 6 : streq(sprop->name, "ibm,enabled-idle-states"))</span></a> +<a name="50"><span class="lineNum"> 50 </span> :<span class="lineCov"> 6 : merge_property(src, dt_root, sprop->name);</span></a> +<a name="51"><span class="lineNum"> 51 </span> : : }</a> +<a name="52"><span class="lineNum"> 52 </span> :<span class="lineCov"> 2 : }</span></a> +<a name="53"><span class="lineNum"> 53 </span> : : </a> +<a name="54"><span class="lineNum"> 54 </span> : : /* Get host services information from hdat. */</a> +<a name="55"><span class="lineNum"> 55 </span> :<span class="lineCov"> 2 : bool hservices_from_hdat(const void *fdt, size_t size)</span></a> +<a name="56"><span class="lineNum"> 56 </span> : : {</a> +<a name="57"><span class="lineNum"> 57 </span> : : int err;</a> +<a name="58"><span class="lineNum"> 58 </span> : : struct dt_node *hservices;</a> +<a name="59"><span class="lineNum"> 59 </span> : : </a> +<a name="60"><span class="lineNum"> 60 </span> :<span class="lineCov"> 2 : prlog(PR_DEBUG, "HBRT: Found mini-DT at 0x%p size: 0x%08lx\n",</span></a> +<a name="61"><span class="lineNum"> 61 </span> : : fdt, size);</a> +<a name="62"><span class="lineNum"> 62 </span> : : </a> +<a name="63"><span class="lineNum"> 63 </span> : : /* For diagnostic purposes, we copy the whole blob over */</a> +<a name="64"><span class="lineNum"> 64 </span> :<span class="lineCov"> 2 : dt_add_property(dt_root, "ibm,hbrt-mini-fdt", fdt, size);</span></a> +<a name="65"><span class="lineNum"> 65 </span> : : </a> +<a name="66"><span class="lineNum"> 66 </span> : : /* Parse & extract relevant properties */</a> +<a name="67"><span class="lineNum"> 67 </span> :<span class="lineCov"> 2 : err = fdt_check_header(fdt);</span></a> +<a name="68"><span class="lineNum"> 68 </span> :<span class="lineCov"> 2 : if (err) {</span></a> +<a name="69"><span class="lineNum"> 69 </span> :<span class="lineNoCov"> 0 : prerror("HBRT: fdt blob %p hdr error %d\n", fdt, err);</span></a> +<a name="70"><span class="lineNum"> 70 </span> :<span class="lineNoCov"> 0 : return false;</span></a> +<a name="71"><span class="lineNum"> 71 </span> : : }</a> +<a name="72"><span class="lineNum"> 72 </span> : : </a> +<a name="73"><span class="lineNum"> 73 </span> :<span class="lineCov"> 2 : hservices = dt_new_root("ibm,hostservices");</span></a> +<a name="74"><span class="lineNum"> 74 </span> :<span class="lineCov"> 2 : err = dt_expand_node(hservices, fdt, 0);</span></a> +<a name="75"><span class="lineNum"> 75 </span> :<span class="lineCov"> 2 : if (err < 0) {</span></a> +<a name="76"><span class="lineNum"> 76 </span> :<span class="lineNoCov"> 0 : prerror("HBRT: fdt blob %p parse error %d\n", fdt, err);</span></a> +<a name="77"><span class="lineNum"> 77 </span> :<span class="lineNoCov"> 0 : return false;</span></a> +<a name="78"><span class="lineNum"> 78 </span> : : }</a> +<a name="79"><span class="lineNum"> 79 </span> : : </a> +<a name="80"><span class="lineNum"> 80 </span> :<span class="lineCov"> 2 : hservice_parse_dt_tree(hservices);</span></a> +<a name="81"><span class="lineNum"> 81 </span> :<span class="lineCov"> 2 : dt_free(hservices);</span></a> +<a name="82"><span class="lineNum"> 82 </span> :<span class="lineCov"> 2 : return true;</span></a> +<a name="83"><span class="lineNum"> 83 </span> : : }</a> +<a name="84"><span class="lineNum"> 84 </span> : : </a> +</pre> + </td> + </tr> + </table> + <br> + + <table width="100%" border=0 cellspacing=0 cellpadding=0> + <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr> + <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr> + </table> + <br> + +</body> +</html> |