| /openbmc/openbmc/poky/scripts/ |
| H A D | cve-json-to-text.py | 2 # SPDX-FileCopyrightText: OpenEmbedded Contributors 4 # SPDX-License-Identifier: MIT 7 # Derived from cve-report.py from Oniro (MIT, by Huawei Inc) 22 print("Syntax: %s [-h] [-i inputJSONfile][-o outputfile]" % sys.argv[0]) 51 if opt in ("-h"): 53 elif opt in ("-i"): 55 elif opt in ("-o"): 79 def process_data(filename, data): argument 84 data: dictionary from parsing the JSON file 88 if not "version" in data or data["version"] != "1": [all …]
|
| /openbmc/gpioplus/src/gpioplus/ |
| H A D | handle.cpp | 44 static int build(const Chip& chip, const std::vector<Handle::Line>& lines, in build() argument 47 if (lines.size() > GPIOHANDLES_MAX) in build() 54 for (size_t i = 0; i < lines.size(); ++i) in build() 56 req.lineoffsets[i] = lines[i].offset; in build() 57 req.default_values[i] = lines[i].default_value; in build() 64 memcpy(req.consumer_label, consumer_label.data(), consumer_label.size()); in build() 65 req.lines = lines.size(); in build() 67 int r = chip.getFd().getSys()->gpio_get_linehandle(*chip.getFd(), &req); in build() 70 throw std::system_error(-r, std::generic_category(), in build() 77 Handle::Handle(const Chip& chip, const std::vector<Line>& lines, in Handle() argument [all …]
|
| /openbmc/qemu/crypto/ |
| H A D | tlscredspsk.c | 2 * QEMU crypto TLS Pre-Shared Keys (PSK) support 41 char **lines = NULL; in lookup_key() local 43 int ret = -1; in lookup_key() 47 pskfile, gerr->message); in lookup_key() 49 return -1; in lookup_key() 52 lines = g_strsplit(content, "\n", -1); in lookup_key() 53 for (i = 0; lines[i] != NULL; ++i) { in lookup_key() 54 if (strncmp(lines[i], username, ulen) == 0 && lines[i][ulen] == ':') { in lookup_key() 55 key->data = (unsigned char *) g_strdup(&lines[i][ulen + 1]); in lookup_key() 56 key->size = strlen(lines[i]) - ulen - 1; in lookup_key() [all …]
|
| /openbmc/openbmc/meta-openembedded/meta-oe/recipes-graphics/vk-gl-cts/files/ |
| H A D | generate-srcuri.py | 14 if re.match(r"[a-z0-9]{40}", ref): 18 cmd = ("git", "ls-remote", "--tags", "--exit-code", repo, ref) 47 Convert the external/fetch_sources.py data 50 lines = [] 58 lines.append(f" {url} \\") 62 lines.append(f" {url} \\") 65 return lines 71 filename = os.path.join(basedir, "vulkan-validationlayers/src/scripts/known_good.json") 74 data = json.load(fp, object_hook=lambda x: types.SimpleNamespace(**x)) 78 lines = [] [all …]
|
| /openbmc/qemu/scripts/modules/ |
| H A D | module_block.py | 5 # Copyright Red Hat, Inc. 2015 - 2016 11 # See the COPYING file in the top-level directory. 17 data = line.split() 19 # data[0] -> struct element name 20 # data[1] -> = 21 # data[2] -> value 23 return data[2].replace('"', '')[:-1] 26 lines = [] 27 lines.append('.library_name = "' + library + '",') 29 lines.append('.format_name = "' + format_name + '",') [all …]
|
| /openbmc/openpower-hw-diags/util/ |
| H A D | ffdc.cpp | 14 * data for that field. 16 * @param journal - The journal to parse 17 * @param field - Field containing the data to retrieve 18 * @return Data for the speciefied field 22 const char* data{nullptr}; in sdjGetFieldValue() local 26 if (0 == sd_journal_get_data(journal, field, (const void**)&data, &length)) in sdjGetFieldValue() 30 // The data returned by sd_journal_get_data will be prefixed with the in sdjGetFieldValue() 32 const void* eq = memchr(data, '=', length); in sdjGetFieldValue() 35 // get just data following the "=" in sdjGetFieldValue() 36 prefix = (const char*)eq - data + 1; in sdjGetFieldValue() [all …]
|
| /openbmc/openbmc-build-scripts/tools/ |
| H A D | config-clang-tidy | 10 def main() -> None: 13 parser.add_argument("--repo", help="Path to the repository", default=".") 15 "--commit", 25 "merge", help="Merge a reference clang-tidy config" 28 "--reference", help="Path to reference clang-tidy", required=True 33 "format", help="Format a clang-tidy config" 38 "enable", help="Enable a rule in a reference clang-tidy config" 44 "disable", help="Enable a rule in a reference clang-tidy config" 48 "--drop", help="Delete the check from the config", action="store_true" 56 def subcmd_merge(args: argparse.Namespace) -> None: [all …]
|
| /openbmc/openbmc/poky/meta/lib/patchtest/ |
| H A D | mbox.py | 10 # SPDX-License-Identifier: GPL-2.0-only 16 # From: https://stackoverflow.com/questions/59681461/read-a-big-mbox-file-with-python 32 lines = [] 36 yield email.message_from_bytes(b''.join(lines)) 39 lines = [] 41 lines.append(line) 44 def __init__(self, data): argument 45 self.author = data['From'] 46 self.to = data['To'] 47 self.cc = data['Cc'] [all …]
|
| /openbmc/qemu/scripts/ |
| H A D | modinfo-generate.py | 2 # -*- coding: utf-8 -*- 15 data = "" 31 data += " " + item 33 return (kind, data) 35 def generate(name, lines, enabled): argument 40 for line in lines: 41 if line.find("MODINFO_START") != -1: 42 (kind, data) = parse_line(line) 44 objs.append(data) 46 deps.append(data) [all …]
|
| /openbmc/openbmc/poky/meta/classes-recipe/ |
| H A D | ptest-cargo.bbclass | 4 RUST_TEST_ARGS[doc] = "Arguments to give to the test binaries (e.g. --shuffle)" 6 # I didn't find a cleaner way to share data between compile and install tasks 9 # Sadly, generated test binaries have no deterministic names (https://github.com/rust-lang/cargo/is… 25 … cmd = f"{cargo} build --tests --message-format json {cargo_build_flags} {packageconfig_confargs}" 33 lines = [] 35 data = line.strip('\n') 36 lines.append(data) 37 bb.note(data) 42 …# Definition of the format: https://doc.rust-lang.org/cargo/reference/external-tools.html#json-mes… 44 for line in lines: [all …]
|
| /openbmc/qemu/include/hw/sd/ |
| H A D | sd.h | 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 #include "hw/qdev-core.h" 85 #define TYPE_SD_CARD "sd-card" 88 #define TYPE_SD_CARD_SPI "sd-card-spi" 115 * Write a byte on the data lines of a SD card. 122 * Read a byte from the data lines of a SD card. 140 #define TYPE_SD_BUS "sd-bus" 181 * Write a byte on the data lines of a SD bus. 188 * Read a byte from the data lines of a SD bus. 194 * Write data to a SD bus. [all …]
|
| /openbmc/u-boot/doc/ |
| H A D | README.kwbimage | 1 --------------------------------------------- 3 --------------------------------------------- 5 This document describes the U-Boot feature as it 15 -------------- 16 ./tools/mkimage -l <kwboot_file> 19 ./tools/mkimage -n <board specific configuration file> \ 20 -T kwbimage -a <start address> -e <execution address> \ 21 -d <input_raw_binary> <output_kwboot_file> 24 ./tools/mkimage -n ./board/Marvell/openrd_base/kwbimage.cfg \ 25 -T kwbimage -a 0x00600000 -e 0x00600000 \ [all …]
|
| /openbmc/openbmc-test-automation/ipmi/ |
| H A D | test_ipmi_sensor.robot | 8 Variables ../data/ipmi_raw_cmd_table.py 56 ${temp_reading}= Run IPMI Standard Command dcmi get_temp_reading -N 10 61 ... Get Lines Containing String ${temp_reading} 62 ... Inlet air temperature case-insensitive 64 ${ambient_temp_line}= Split To Lines ${ambient_temp_line} 77 ... Evaluate abs(${ambient_temp_redfish[${index}]} - ${ipmi_temp_list[${index}]}) 119 ${temp_reading}= Run IPMI Standard Command dcmi get_temp_reading -N 10 123 ... Get Lines Containing String ${temp_reading} 124 ... Baseboard temperature case-insensitive=True 125 ${lines}= Split To Lines ${baseboard_temp_lines} [all …]
|
| /openbmc/intel-ipmi-oem/ |
| H A D | generate-allowlist.py | 8 sys.stderr.write("Usage: $0 allowlist-config-in allowlist-header-out\n") 11 sys.exit(-1) 32 r"(0x[0-9a-f]{2}):(0x[0-9a-f]{2})((:(0x[0-9a-f]{4}))?)\s*((//\s*(.*))?)", # noqa: E501 36 def __init__(self, data): argument 37 # parse data line into values: 41 m = self.linere.fullmatch(data).groups() 43 raise ParseError(data) 96 lines = [ 114 lines.extend([" {}".format(e) for e in entries]) 115 lines.append("}};\n") [all …]
|
| /openbmc/u-boot/post/drivers/ |
| H A D | memory.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 * o The recommended test sequence is to test the data lines: if they are 14 * lines. Finally, test the cells in the memory now that the test 15 * program knows that the address and data lines work properly. 20 * walk through a field of zeros on the address lines and the highest 26 * write will charge the residual capacitance on the data bus so the 43 * Data line test: 44 * --------------- 45 * This tests data lines for shorts and opens by forcing adjacent data 46 * to opposite states. Because the data lines could be routed in an [all …]
|
| /openbmc/openbmc-tools/dbus-vis/ |
| H A D | ipmi_parse.js | 1 // This file parses ASCII text-encoded dbus message dump. 5 if (i0 == -1) { 6 return BigInt(-1); 10 if (i1 == -1) { 11 return BigInt(-1); 13 let line2 = line1.substr(5, i1 - 5); 21 if (i0 == -1) { 26 if (i1 == -1) { 29 let line2 = line1.substr(N, i1 - N); 43 function munchByte(lines, i) { argument [all …]
|
| H A D | dbus_pcap_loader.js | 14 // 2. Launch "dbus-pcap" to get the timestamps of each DBus message 15 // 3. Launch "dbus-pcap" to get the JSON representation of each DBus message 18 // First try to parse using dbus-pcap 24 num_lines_py.stdout.on('data', (data) => { 25 stdout_num_lines += data; 30 ShowBlocker('Running dbus-pcap (Pass 1/2, packet timestamps) ...'); 32 //spawn('python3', ['dbus-pcap', file_name, '--json', '--progress']); 33 spawn('python3', ['dbus-pcap', file_name]); 37 //const r = new RegExp('([0-9]+/[0-9]+) [0-9]+\.[0-9]+:.*'); 38 const r = new RegExp('([0-9]+\.[0-9]+):.*'); [all …]
|
| /openbmc/u-boot/drivers/video/ |
| H A D | logicore_dp_tx.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 15 * struct logicore_dp_tx_msa - Main Stream Attributes (MSA) 24 * @v_active: Vertical active resolution (lines) 25 * @v_start: Vertical blank start (in lines). 28 * @v_sync_width: Vertical sync width (lines) 29 * @v_total: Vertical total (lines) 32 * @user_pixel_width: The width of the user data input port.
|
| /openbmc/u-boot/arch/powerpc/cpu/mpc86xx/ |
| H A D | cache.S | 35 /* use invalidate-all bit in HID0 */ 43 * Invalidate L1 data cache. 53 * Flush data cache. 68 * Write any modified data cache blocks out to memory 70 * This is a no-op on the 601. 75 li r5,CACHE_LINE_SIZE-1 95 * Write any modified data cache blocks out to memory. 96 * Does not invalidate the corresponding cache lines (especially for 102 li r5,CACHE_LINE_SIZE-1 105 add r4,r4,r5 /* r4 += cache_line_size-1 */ [all …]
|
| /openbmc/openbmc/poky/meta/classes-global/ |
| H A D | sanity.bbclass | 4 # SPDX-License-Identifier: MIT 19 lines = f.readlines() 20 return lines 22 def sanity_conf_find_line(pattern, lines): 25 for index, line in enumerate(lines) 28 def sanity_conf_update(fn, lines, version_var_name, new_version): 29 index, line = sanity_conf_find_line(r"^%s" % version_var_name, lines) 30 lines[index] = '%s = "%d"\n' % (version_var_name, new_version) 32 f.write(''.join(lines)) 43 SANITY_DIFF_TOOL ?= "diff -u" [all …]
|
| /openbmc/qemu/scripts/coverage/ |
| H A D | compare_gcov_json.py | 5 # - create two build dirs with --enable-gcov 6 # - run set of tests in each 7 # - run make coverage-html in each 8 # - run gcovr --json --exclude-unreachable-branches \ 9 # --print-summary -o coverage.json --root ../../ . *.p 13 # SPDX-License-Identifier: GPL-2.0-or-later 26 parser.add_argument('-a', type=Path, default=None, 29 parser.add_argument('-b', type=Path, default=None, 32 parser.add_argument('--verbose', action='store_true', default=False, 38 # See https://gcovr.com/en/stable/output/json.html#json-format-reference [all …]
|
| /openbmc/openpower-proc-control/procedures/common/ |
| H A D | cfam_overrides.cpp | 6 #include <phosphor-logging/elog-errors.hpp> 7 #include <phosphor-logging/elog.hpp> 14 /* File /var/lib/obmc/cfam_overrides requires whitespace-separated parameters 15 Pos Address Data Mask with one register write per line. For example: 18 Blank lines and comment lines beginning with # will be ignored. */ 33 cfam_data_t data = 0; in CFAMOverride() local 53 &data, &mask) >= 3) in CFAMOverride() 56 writeRegWithMask(target, address, data, mask); in CFAMOverride()
|
| /openbmc/qemu/scripts/kvm/ |
| H A D | kvm_flightrecorder | 3 # KVM Flight Recorder - ring buffer tracing script 9 # This script provides a command-line interface to kvm ftrace and is designed 10 # to be used as a flight recorder that is always running. To start in-memory 13 # sudo kvm_flightrecorder start 8192 # 8 MB per-cpu ring buffers 15 # The per-cpu ring buffer size can be given in KB as an optional argument to 33 # fixed-size in-memory trace. 43 def write_file(path, data): argument 44 open(path, 'wb').write(data) 65 lines = True 66 while lines: [all …]
|
| /openbmc/openbmc/poky/scripts/pybootchartgui/pybootchartgui/ |
| H A D | parsing.py | 75 self.duration = self.end_time - self.start_time 152 # merge in the cmdline data 163 # re-parent any stray orphans if we can 184 k = min(k, len(util)-1) 189 avgload = sum(u[1] for u in util[j:k+1]) / (k-j+1) 231 and self.cpu_stats[-1].time > crop_at: 234 and self.disk_stats[-1].time > crop_at: 245 proc.duration = min (proc.duration, crop_at - proc.start_time) 247 and proc.samples[-1].time > crop_at: 277 """Parses (ie., splits) a file into so-called timed-blocks. A [all …]
|
| /openbmc/u-boot/drivers/mtd/nand/raw/ |
| H A D | kb9202_nand.c | 1 // SPDX-License-Identifier: GPL-2.0+ 18 * hardware specific access to control-lines 33 * Board-specific function to access device control signals 40 ulong IO_ADDR_W = (ulong) this->IO_ADDR_W; in kb9202_nand_hwcontrol() 51 this->IO_ADDR_W = (void *) IO_ADDR_W; in kb9202_nand_hwcontrol() 60 writeb(cmd, this->IO_ADDR_W); in kb9202_nand_hwcontrol() 65 * Board-specific function to access the device ready signal. 74 * Board-specific NAND init. Copied from include/linux/mtd/nand.h for reference. 76 * struct nand_chip - NAND Private Flash Chip Data 77 * @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device [all …]
|