Reto Buerki [Fri, 13 Jul 2018 08:01:45 +0000 (10:01 +0200)]
Collect APIC IDs in processor creator
Summary:
Closes T489. Update schema to latest version: The processor element now
lists the APIC IDs present in the system. Let processor creator collect
even APIC IDs.
Reviewers: ken
Reviewed By: ken
Tags: #mugenhwcfg
Maniphest Tasks: T489
Differential Revision: https://dev.codelabs.ch/D714
Reto Buerki [Fri, 13 Jul 2018 08:01:45 +0000 (10:01 +0200)]
Collect APIC IDs in processor creator
Filter out HT threads by only appending even IDs.
Reto Buerki [Fri, 13 Jul 2018 08:00:54 +0000 (10:00 +0200)]
Update hardware config schema
The processor element now lists the APIC IDs present in the system.
Adrian-Ken Rueegsegger [Mon, 26 Mar 2018 09:49:59 +0000 (11:49 +0200)]
Improve collection of CPU core information
Summary:
Extend get_cpu_cores method to consider CPU packages. The CPU core count
is now determined by adding the number of CPU cores per physical
package.
Test Plan:
Verified that the correct number of CPUs is generated on the Fujitsu
Primergy server and that the count for Lenovo T430s remains the same.
Reviewers: reet
Reviewed By: reet
Differential Revision: https://dev.codelabs.ch/D692
Adrian-Ken Rueegsegger [Mon, 26 Mar 2018 09:49:59 +0000 (11:49 +0200)]
Improve collection of CPU core information
Extend get_cpu_cores method to consider CPU packages. The CPU core count
is now determined by adding the number of CPU cores per physical
package.
Adrian-Ken Rueegsegger [Wed, 21 Mar 2018 18:05:33 +0000 (19:05 +0100)]
Various minor fixes
Summary:
Reduce I/O ports of system board device as only port 0xcf9 is required
for reboot. Remove all other I/O port resources.
Also, fix pep8 warning by adding missing whitespace and update PCI IDs.
Test Plan:
Removed the system board device from Genode/base_hw policy and verified
that vbox4_win7_32 scenario runs correctly.
Reviewers: reet
Reviewed By: reet
Differential Revision: https://dev.codelabs.ch/D691
Adrian-Ken Rueegsegger [Wed, 21 Mar 2018 18:05:33 +0000 (19:05 +0100)]
Update pci.ids to version 2018.03.21
Adrian-Ken Rueegsegger [Wed, 21 Mar 2018 15:31:44 +0000 (16:31 +0100)]
Reduce I/O ports of system board device
Only port 0xcf9 is required for reboot. Remove all other I/O port
resources.
Adrian-Ken Rueegsegger [Tue, 13 Mar 2018 14:10:02 +0000 (15:10 +0100)]
Minor: Add missing whitespace
Adrian-Ken Rueegsegger [Mon, 12 Mar 2018 15:38:13 +0000 (16:38 +0100)]
Use size parameter when grabbing dmesg output
The effect is that the tool will collect all information contained in
the kernel log buffer not just the last 16392 bytes. This helps where
many log messages are generated during system boot and the kernel log
buffer is configured to a larger size (e.g. CONFIG_LOG_BUF_SHIFT=17 on
Debian).
Auditors: reet
Adrian-Ken Rueegsegger [Mon, 12 Mar 2018 10:31:03 +0000 (11:31 +0100)]
Rework IRQ/MSI and add I/O APIC information extraction
Summary:
Ref T459, T452. Generate I/O APIC device based on information parsed
from the MADT/APIC table. For each I/O APIC present on the system a
<device> is created with capabilities specifying the base Global System
Interrupt (GSI) and the maximum redirection table entry index.
Use the legacy IRQ number extracted from the ACPI DSDT PCI Routing Table
(PRT). Selection of the PRT entry is done using the PCI device number
and interrupt pin number as defined by the PCI config space. For devices
behind PCI bridges, the pin number of the parent/bridge device connected
to the system bus is used.
The PRT itself is gathered from the DSDT using the acpiexec utility and
executing the _PRT method. The device interrupt pin is read from the PCI
config space while the supported MSI(-x) vector number is read from the
corresponding capability.
Also fix some PEP8 warnings and avoid using parentheses in combination
with assert. Assert is a keyword and not a function so using parentheses
in this context leads to the creation of a tuple and non-empty tuples
evaluate to True...
Finally, update URLs in the README to use https where possible.
Test Plan:
Checked that the generated IRQ information matches the values from the
lspci -vv output of a Linux system booted with "pci=nomsi" on the Lenovo
T430s, X260 and Intel NUC 6CAYH. Also verified that the I/O APIC
information is correctly extracted from a Fujitsu Primergy RX2530 M1
server system that sports 3 I/O APICs.
Reviewers: reet
Reviewed By: reet
Maniphest Tasks: T459, T452
Differential Revision: https://dev.codelabs.ch/D687
Adrian-Ken Rueegsegger [Mon, 12 Mar 2018 10:31:03 +0000 (11:31 +0100)]
Reword error message on iasl execution failure
Adrian-Ken Rueegsegger [Thu, 8 Mar 2018 18:00:39 +0000 (19:00 +0100)]
Extract I/O APIC max redirection entry from dmesg
The new max_redirection_entry capability value specifies the last I/O
APIC redirection entry index starting from 0. Thus the effective index
of the last valid redirection entry is gsi_base + max_redirection_entry.
Adrian-Ken Rueegsegger [Thu, 8 Mar 2018 13:04:48 +0000 (14:04 +0100)]
README: Update URLs to use https where possible
Adrian-Ken Rueegsegger [Thu, 8 Mar 2018 09:45:32 +0000 (10:45 +0100)]
Fix DMAR get_referenced_rmrr test
The function expects BDF parameters as integers and not strings.
Otherwise comparison may lead to unexpected mismatches because of
implicit string/int type conversions prior to equality check (i.e. hex
string does not match corresponding integer decimal value).
Adrian-Ken Rueegsegger [Thu, 8 Mar 2018 09:43:14 +0000 (10:43 +0100)]
Do not use parentheses in combination with assert
Assert is a keyword and not a function. Using parentheses in this context
leads to the creation of a tuple and non-empty tuples evaluate to
True... *sigh* Notice that there is now a failing test.
Adrian-Ken Rueegsegger [Thu, 8 Mar 2018 09:16:27 +0000 (10:16 +0100)]
Minor: Fix some PEP8 warnings
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 16:55:18 +0000 (17:55 +0100)]
Drop obsolete getPci_MSI function
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 16:55:04 +0000 (17:55 +0100)]
Do not set msi attribute of pci element
It has been superseded by the new MSI IRQ collection mechanism.
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 16:53:34 +0000 (17:53 +0100)]
Update hardware config schema
The <pci> element no longer has a 'msi' attribute.
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 16:26:53 +0000 (17:26 +0100)]
Drop obsolete getMsiIrq function
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 10:20:54 +0000 (11:20 +0100)]
Use legacy IRQ number extracted from ACPI PCI Routing Table
Instead of using the IRQ number assigned to the device by Linux, use the
number extracted from the ACPI DSDT PCI Routing Table. Selection of the
PRT entry is done using the PCI device number and interrupt pin number
as defined by the PCI config space. For devices behind PCI bridges, the
pin number of the parent/bridge device connected to the system bus is
used.
Note: The tests have been refactored to favor Mock usage instead of
additional test data files.
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 10:16:47 +0000 (11:16 +0100)]
Read device interrupt pin & line from PCI config space
When parsing PCI config space capabilities, also read the interrupt pin
and line from the PCI config space header of the device. Cache the
per-device information in a map and implement getInterruptInfo function
that returns the interrupt information for a specified PCI device.
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 11:44:30 +0000 (12:44 +0100)]
Refactor device capability file reading
Pass an opened file as parameter to _readCapFile and use in-memory byte
stream file in test.
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 09:54:54 +0000 (10:54 +0100)]
Load PRT from DSDT in creator.createElements
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 09:53:43 +0000 (10:53 +0100)]
Declare path to DSDT in paths.py
Adrian-Ken Rueegsegger [Wed, 7 Mar 2018 11:06:18 +0000 (12:06 +0100)]
Minor: Adjust formatting of function comments
Adrian-Ken Rueegsegger [Tue, 6 Mar 2018 16:12:26 +0000 (17:12 +0100)]
Simplify isBridge and isPciExpress functions
Adrian-Ken Rueegsegger [Thu, 22 Feb 2018 17:33:19 +0000 (18:33 +0100)]
Generate <msi> child elements for device IRQs
A <msi> child element is generated for each MSI interrupt a PCI device
supports.
Adrian-Ken Rueegsegger [Thu, 22 Feb 2018 10:24:25 +0000 (11:24 +0100)]
Update to latest hardware XML schema
The new schema extends the device IRQ type to enable improved handling
of MSI IRQs.
Adrian-Ken Rueegsegger [Thu, 22 Feb 2018 10:57:46 +0000 (11:57 +0100)]
Extract MSI(-x) vector count from PCI config space
Let get_cap_msi[x] functions return the number of supported MSI
interrupt vectors by querying the respective PCI config space
capability, see PCI Local Bus Specification, Revision 3.0, section
6.8.1.3 and 6.8.2.3.
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 13:05:41 +0000 (14:05 +0100)]
Implement DSDT _PRT parsing
Extract PCI Interrupt Routing Table from ACPI DSDT table using acpiexec.
This is required to determine the legacy IRQ for any given PCI device.
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 12:50:55 +0000 (13:50 +0100)]
Implement ACPI AML execution using acpiexec utility
The new acpi.execute_aml function can be used to execute commands on a given
AML file. The acpiexec utility is invoked on a copy of the given AML file and
the output is returned as string.
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 10:26:09 +0000 (11:26 +0100)]
Extract copying of ACPI table to separate function
Adrian-Ken Rueegsegger [Thu, 22 Feb 2018 14:04:03 +0000 (15:04 +0100)]
Simplify getBit utility function
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 10:02:45 +0000 (11:02 +0100)]
Util: Add find function
The function returns the first element in the list for which the given
predicate is True.
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 14:27:08 +0000 (15:27 +0100)]
Generate I/O APIC devices based on MADT information
Create a <device> element with capability "ioapic" for each I/O APIC
present in the system.
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 14:25:47 +0000 (15:25 +0100)]
Drop unneeded params from IommuDevicesCreator
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 14:08:06 +0000 (15:08 +0100)]
Implement I/O APIC extraction from MADT
The MADT module provides functions to parse MADT/APIC tables and extract
I/O APIC information such as the memory address and global system
interrupt base number as specified by ACPI specification, section
5.2.12.3.
Adrian-Ken Rueegsegger [Fri, 2 Mar 2018 14:07:37 +0000 (15:07 +0100)]
Add MADT/APIC table test data
Reto Buerki [Fri, 29 Sep 2017 14:10:49 +0000 (16:10 +0200)]
Make reserved memory block detection more robust
Summary:
Closes T457. Newer Linux kernels (tested with 4.13) changed the casing
of the memory type from 'reserved' to 'Reserved'. Therefore convert to
lowercase before comparison in filterMemoryBlocks function.
Also fix some creator tests and perform minor (pep8) cleanup.
Reviewers: ken
Reviewed By: ken
Maniphest Tasks: T457
Differential Revision: https://dev.codelabs.ch/D647
Reto Buerki [Fri, 29 Sep 2017 14:10:49 +0000 (16:10 +0200)]
Make reserved memory regions detection more robust
Newer Linux kernels (tested with 4.13) changed the casing of the memory
type from 'reserved' to 'Reserved'. Therefore convert to lowercase
before comparison in filterMemoryBlocks function.
Reto Buerki [Fri, 29 Sep 2017 14:09:12 +0000 (16:09 +0200)]
Minor cleanup
Reto Buerki [Fri, 29 Sep 2017 14:02:19 +0000 (16:02 +0200)]
Fix creator tests
Delete unneeded variable declarations and assert empty lists. Also fix
assertion of filterDevicePaths.
Reto Buerki [Tue, 26 Sep 2017 14:02:12 +0000 (16:02 +0200)]
Fix log output on empty message queue
Auditors: ken
Reto Buerki [Mon, 11 Sep 2017 10:03:29 +0000 (12:03 +0200)]
Add config space region to PCI devices
Summary:
Ref T450. Make getPciConfigAddress an utility function and implement
get_mmconf creator function which returns an mmconf XML memory region
specified by PCI base, bus, device and function values.
Append PCI device mmconf regions in createDeviceFromPath function.
Test Plan:
Verified that a format B policy has the same mmconf regions as before
this revision.
Reviewers: ken
Reviewed By: ken
Maniphest Tasks: T450
Differential Revision: https://dev.codelabs.ch/D646
Reto Buerki [Mon, 11 Sep 2017 10:03:29 +0000 (12:03 +0200)]
Append mmconf region in createDeviceFromPath
Reto Buerki [Mon, 11 Sep 2017 10:02:02 +0000 (12:02 +0200)]
Implement get_mmconf creator function
The function returns an mmconf XML memory region specified by base, bus,
device and function.
Reto Buerki [Mon, 11 Sep 2017 09:40:02 +0000 (11:40 +0200)]
Make getPciConfigAddress an utility function
Reto Buerki [Thu, 14 Sep 2017 13:46:10 +0000 (15:46 +0200)]
Properly handle invalid IRQs
Summary:
Closes T454. Append log messages to generated output.xml. This makes it
more evident that warnings/errors occurred during XML generation. Also
add a warning if the tool is called with the --force command line
option.
On some systems, Linux exposes IRQs which are not in our allowed range,
which results in an ugly schema validation exception. Catch this
exception and add proper warning that the resource has been skipped.
Test Plan:
Verified that invalid legacy/MSI IRQs are skipped on the Intel NUC
6CAYH. Also verified that nothing has changed on the Lenovo T440s.
Reviewers: ken
Reviewed By: ken
Maniphest Tasks: T454
Differential Revision: https://dev.codelabs.ch/D641
Reto Buerki [Thu, 14 Sep 2017 13:46:10 +0000 (15:46 +0200)]
Append warning about invalid IRQ resources
On some systems, Linux exposes IRQs which are not in our allowed range,
which results in an ugly schema validation exception.
Catch this exception and add proper warning that the resource has been
skipped.
Reto Buerki [Thu, 14 Sep 2017 12:46:35 +0000 (14:46 +0200)]
Add warning if --force option is active
Reto Buerki [Thu, 14 Sep 2017 12:42:02 +0000 (14:42 +0200)]
Append error log to output header
This makes it more evident that warnings/errors occurred during XML
generation.
Reto Buerki [Thu, 14 Sep 2017 12:41:33 +0000 (14:41 +0200)]
Make produceLine output function newline-aware
Reto Buerki [Thu, 14 Sep 2017 12:35:18 +0000 (14:35 +0200)]
Wrap messages at width 80, not 70
Reto Buerki [Thu, 14 Sep 2017 12:17:55 +0000 (14:17 +0200)]
Drop message display() functions in favor of to_str
Reto Buerki [Thu, 14 Sep 2017 12:17:15 +0000 (14:17 +0200)]
Fix one pep8 style issue in mugenhwcfg.py
Reto Buerki [Tue, 12 Sep 2017 19:38:04 +0000 (21:38 +0200)]
Make processor speed detection more reliable
Summary:
Closes T453. The refined TSC clocksource string is not always present in
dmesg (at least on newer kernels).
Therefore, also look for the 'tsc: Detected <speed> processor' string if
the refined TSC clocksource regex search fails.
Also drop test_genDmesg test because running dmesg requires root on
Debian stretch now.
Test Plan:
Verified that processor speed extraction works on a 4.10.0 kernel
running on NUC 6CAYH where the refined TSC clocksource message is not
present in dmesg.
Reviewers: ken
Reviewed By: ken
Maniphest Tasks: T453
Differential Revision: https://dev.codelabs.ch/D640
Reto Buerki [Tue, 12 Sep 2017 19:38:04 +0000 (21:38 +0200)]
Shorten dmesg_nokey file
Reto Buerki [Tue, 12 Sep 2017 19:35:08 +0000 (21:35 +0200)]
Add second TSC speed regular expression
Also look for the 'tsc: Detected <speed> processor' string if the
refined TSC clocksource regex search fails.
Reto Buerki [Tue, 12 Sep 2017 19:17:53 +0000 (21:17 +0200)]
Use regular expression to find TSC speed
Reto Buerki [Tue, 12 Sep 2017 18:57:34 +0000 (20:57 +0200)]
Drop test_genDmesg test
Running dmesg requires root on Debian stretch.
Reto Buerki [Fri, 8 Sep 2017 13:43:28 +0000 (15:43 +0200)]
Append IOMMU group ID to PCI device element
Summary:
Closes T449. Linux partitions devices into IOMMU groups depending on
their isolation properties. Devices in the same IOMMU group cannot be
properly isolated from each other because they may perform inter-device
transactions directly, without going through the IOMMU.
NOTE: This is informative for now as Muen does not configure PCI access
control services (ACS). Therefore the IOMMU groups provided by
Linux cannot yet be used 1:1 in a Muen system.
Test Plan: Verified that IOMMU groups are properly appended on the Lenovo T440s.
Reviewers: ken
Reviewed By: ken
Maniphest Tasks: T449
Differential Revision: https://dev.codelabs.ch/D639
Reto Buerki [Fri, 8 Sep 2017 13:43:28 +0000 (15:43 +0200)]
Append IOMMU group element in getPci function
Reto Buerki [Fri, 8 Sep 2017 13:43:05 +0000 (15:43 +0200)]
Add iommugrp argument to getPci function
Reto Buerki [Fri, 8 Sep 2017 13:41:42 +0000 (15:41 +0200)]
Add iommugrp argument to createDeviceFromPath
Reto Buerki [Fri, 8 Sep 2017 12:10:43 +0000 (14:10 +0200)]
Display warning if IOMMU groups are not available
Reto Buerki [Fri, 8 Sep 2017 12:09:20 +0000 (14:09 +0200)]
Add iommugrpdir argument to PCI dev creator createElems
Reto Buerki [Fri, 8 Sep 2017 12:06:04 +0000 (14:06 +0200)]
Update hardware config schema
Besides minor changes, this update provides the IOMMU group ID child of
PCI device elements.
Reto Buerki [Fri, 8 Sep 2017 12:04:30 +0000 (14:04 +0200)]
Declare PATH_IOMMUGRP in test/testpaths.py
Reto Buerki [Fri, 8 Sep 2017 12:03:13 +0000 (14:03 +0200)]
Declare IOMMUGRPS constant in paths.py
Reto Buerki [Fri, 8 Sep 2017 08:53:28 +0000 (10:53 +0200)]
Fix pep8 warnings in src/creator.py
Reto Buerki [Fri, 8 Sep 2017 14:34:42 +0000 (16:34 +0200)]
Fix TSC clocksource error string
Adrian-Ken Rueegsegger [Thu, 20 Apr 2017 08:45:28 +0000 (10:45 +0200)]
README: Use acpica-tools instead of iasl package
Auditors: reet
Reto Buerki [Thu, 30 Mar 2017 13:35:59 +0000 (15:35 +0200)]
Filter out memory blocks with zero size
Summary:
This happens if the BIOS reports a memory block size below one page. It
is then rounded down to zero in the generateMemoryBlock function.
Extend the filterMemoryBlocks function to remove those blocks from the
generated memory block list.
Reviewers: ken
Reviewed By: ken
Differential Revision: https://dev.codelabs.ch/D577
Reto Buerki [Thu, 30 Mar 2017 13:35:59 +0000 (15:35 +0200)]
Filter out memory blocks with zero size
This happens if the BIOS reports a memory block size below one page.
Extend the filter function to remove those blocks from the generated
memory block list.
Reto Buerki [Thu, 30 Mar 2017 13:35:10 +0000 (15:35 +0200)]
Add new memory block to memorycreator test data
Reto Buerki [Thu, 30 Mar 2017 13:34:01 +0000 (15:34 +0200)]
Assert len of block list in memmapextraction test
Adrian-Ken Rueegsegger [Mon, 6 Feb 2017 14:53:00 +0000 (15:53 +0100)]
Update pci.ids to version 2017.01.28
Reviewers: reet
Reviewed By: reet
Differential Revision: https://dev.codelabs.ch/D547
Adrian-Ken Rueegsegger [Mon, 6 Feb 2017 14:53:00 +0000 (15:53 +0100)]
Update pci.ids to version 2017.01.28
Reto Buerki [Wed, 11 Jan 2017 15:47:20 +0000 (16:47 +0100)]
Add system board device to generated config
Summary:
The system board device specifies resources provided by the
motherboard/chipset. It declares the 32-bit wide Configuration Space
Address (16#0cf8#) and Configuration Space Data (16#0cfc#) I/O ports.
The 8-bit wide 16#0cf9# port in the same range specifies the Reset
Control Register of the I/O controller hub (ICH). It furthermore
declares the 8-bit wide ACPI poweroff I/O port extracted from the ACPI
FADT table using the new FADT table parser.
Only the 16#0cf9# and the poweroff ports are actually used by the SK but
for supporting the Genode base-hw scenario, the complete 16#0cf8# ..
16#0cff# range must be specified in order to avoid overlapping ports
with multiple devices.
Note: 16#0cf8# and 16#0cfc# will be removed from the system board device
as soon as the Genode base-hw kernel supports the Enhanced Configuration
Access Mechanism (ECAM) for PCI bus enumeration.
Reviewers: ken
Reviewed By: ken
Tags: #mugenhwcfg
Differential Revision: https://dev.codelabs.ch/D534
Reto Buerki [Wed, 11 Jan 2017 11:08:56 +0000 (12:08 +0100)]
Add pm1a_cnt_slp_typ capability to system board
The cap specifies the value which must be written to the PM1A control
block address in order to put the system into S5 soft-off state. The
value is identical for all currently supported hardware and is therefore
specified as a constant value instead of extracted from the ACPI DSDT
_S5 object.
Reto Buerki [Wed, 11 Jan 2017 11:05:17 +0000 (12:05 +0100)]
Rename poweroff port to 'pma1_cnt'
Reto Buerki [Tue, 10 Jan 2017 16:45:54 +0000 (17:45 +0100)]
Append ACPI poweroff port to system board device
Reto Buerki [Tue, 10 Jan 2017 16:33:14 +0000 (17:33 +0100)]
Declare path to FADT in paths.py
Reto Buerki [Tue, 10 Jan 2017 16:30:46 +0000 (17:30 +0100)]
Implement ACPI FADT parser
The ACPI FADT parser reads an ACPI FADT table from a file in binary
format and decompiles it using acpi.decompile_table. For now, it only
provides a getter for the system shutdown port (PM1A Control Block
Address).
Reto Buerki [Mon, 9 Jan 2017 16:15:07 +0000 (17:15 +0100)]
Drop unneeded DMAR_TEMP path from paths.py
Reto Buerki [Mon, 9 Jan 2017 14:51:55 +0000 (15:51 +0100)]
Add system board device to generated config
The system board device specifies resources provided by the
motherboard/chipset. For now, it declares the 32-bit wide Configuration
Space Address (16#0cf8#) and Configuration Space Data (16#0cfc#) I/O
ports. The 8-bit wide 16#0cf9# port in the same range specifies the
Reset Control Register of the I/O controller hub (ICH).
Only the 16#0cf9# port is actually used by the SK but for supporting the
Genode base-hw scenario the complete range must be specified in order to
avoid overlapping ports with multiple devices.
Note: 16#0cf8# and 16#0cfc# will be removed from the system board device
as soon as the Genode base-hw kernel supports the Enhanced Configuration
Access Mechanism (ECAM) for PCI bus enumeration.
Reto Buerki [Mon, 9 Jan 2017 10:57:05 +0000 (11:57 +0100)]
Factor out ACPI decompile_table function to acpi.py
Reto Buerki [Mon, 9 Jan 2017 11:09:12 +0000 (12:09 +0100)]
Minor: Remove whitespace in README.md
Reto Buerki [Mon, 9 Jan 2017 11:08:51 +0000 (12:08 +0100)]
Cleanup: Drop obsolete custom exceptions
Adrian-Ken Rueegsegger [Mon, 9 Jan 2017 09:57:13 +0000 (10:57 +0100)]
Sort result of os.listdir
The list returned by os.listdir is in arbitrary order. Sort the list
prior to processing to get reproducible results.
Auditors: reet
Adrian-Ken Rueegsegger [Fri, 16 Dec 2016 16:10:52 +0000 (17:10 +0100)]
Rework legacy serial device generation
Summary:
Parse serial device information provided by Linux sysfs instead of
/proc/ioports. This enables the inclusion of serial device IRQs.
Drop obsolete code and test files.
Test Plan:
Generated a platform config on Kontron hardware and checked that the IRQs of
serial devices have been correctly added.
Reviewers: reet
Reviewed By: reet
Differential Revision: https://dev.codelabs.ch/D529
Adrian-Ken Rueegsegger [Fri, 16 Dec 2016 11:44:29 +0000 (12:44 +0100)]
Drop unneeded ioport test files
Adrian-Ken Rueegsegger [Fri, 16 Dec 2016 11:43:38 +0000 (12:43 +0100)]
Drop unneded IOPORTS path
Adrian-Ken Rueegsegger [Fri, 16 Dec 2016 11:43:02 +0000 (12:43 +0100)]
Drop obsolete serial device creator code
Adrian-Ken Rueegsegger [Fri, 16 Dec 2016 11:40:12 +0000 (12:40 +0100)]
Switch to new serial devices extraction method
Use Linux sysfs serial information to determine serial devices of the
system.
Adrian-Ken Rueegsegger [Thu, 15 Dec 2016 17:56:37 +0000 (18:56 +0100)]
Add getSerialDevices function
The function returns a list of serial devices found at the specified path.
Adrian-Ken Rueegsegger [Thu, 15 Dec 2016 17:55:56 +0000 (18:55 +0100)]
Add parseSerialDeviceResources function
The function parses a serial device resource description string and returns
the extracted information. If the data cannot be parsed None is returned.
Adrian-Ken Rueegsegger [Thu, 15 Dec 2016 15:26:09 +0000 (16:26 +0100)]
Add Linux sysfs path for serial devices