[PATCH 00/17] pc386 non-legacy enhancements

Joel Sherrill joel at rtems.org
Wed Mar 9 22:24:45 UTC 2016

First, there are only 15 patches in this series. The last two
are additions of commands directly to fileio. Both may be of
interest but should be discussed separately.

This series started with the need to get the pc386 BSP working
on an embedded PC without legacy PCI BIOS and with a COM1 port
on the PCI and not in I/O space. This target board does not have
an IDE/ATA controller. The probe hangs so the build disables that.

The first patches eliminate the need for the pc386 specific pcibios.h
and add dynamic detection of using PCI BIOS or I/O space accesses for
PCI Configuration Space. It also added a shared implementation of
pci_find_device() and later patches use this to eliminate copies
in other BSPs. A ticket will be filed for the last case.

There are patches to add boot command line arguments for --printk=XXX
to specify printk output go somewhere besides the --console=XXX device.
There is also a --disable-com1-com4 boot command line argument to
disable those at run-time. The BSP is booted with these arguments:

The PCI UART is added as /dev/pcicom1. It uses a UART PCI table from
FreeBSD and probes for all PCI UARTs. These are dynamically installed.
The dynamic registration support in the shared console was enhanced
to be able to be called multiple times.

kernel tftp:// --console=pcicom1 --printk=vgacons --disable-com1-com4
boot fileio.exe

Along the way, there is also miscellaneous clean up to comments, a warning
in bsp_fatal_halt.c, etc.

I hope the description helps.


Joel Sherrill (17):
  pc386: Eliminate pcibios.h and begin removal obsolete PCI BIOS API
  i386/shared/pci/pcibios.c: Remove unused pcib_special_cycle()
  i386/shared/pci/pcibios.c: Remove unused pcib_find_by_class()
  pc386/configure.ac: Delete incorrect and unused AM_CONDITIONAL
  Add shared PCI support and enhance pc386 to support non-legacy PCI
    configuration space
  pc386: Improve boot command arguments for console/printk device
  console_private.h: Remove prototypes for non-existent methods
    bsp_com_inch() and bsp_com_outch()
  console_private.h: Improve comment for vt_ioctl()
  pc386: Add PCI UART support
  pc386/startup/bspstart.c: Reformat and cleanup file header
  pc386/startup/bsp_fatal_halt.c: Fix noreturn does return warning
  libbsp/shared/console.c: Clean up memory allocation for per device
  pc386: Add --disable-com1-com4 boot argument
  mips/malta: Use shared pci_find_device() and removed unused
  powerpc/mvme5500: Use shared pci_find_device()
  fileio: lspci candidate command
  fileio: Add command "com" to write to files

 c/src/lib/libbsp/Makefile.am                       |   3 +
 c/src/lib/libbsp/i386/Makefile.am                  |   2 +-
 c/src/lib/libbsp/i386/pc386/Makefile.am            |   8 +-
 c/src/lib/libbsp/i386/pc386/configure.ac           |   1 -
 c/src/lib/libbsp/i386/pc386/console/conscfg.c      |  29 +-
 .../lib/libbsp/i386/pc386/console/console_select.c | 217 +++++++++--
 c/src/lib/libbsp/i386/pc386/console/uart_bus_pci.c | 398 +++++++++++++++++++++
 c/src/lib/libbsp/i386/pc386/include/bsp.h          |  10 +
 c/src/lib/libbsp/i386/pc386/preinstall.am          |   4 -
 .../lib/libbsp/i386/pc386/startup/bsp_fatal_halt.c |   3 +
 c/src/lib/libbsp/i386/pc386/startup/bspstart.c     | 102 ++++--
 c/src/lib/libbsp/i386/shared/pci/pci_io.c          | 200 +++++++++++
 c/src/lib/libbsp/i386/shared/pci/pcibios.c         | 246 ++-----------
 c/src/lib/libbsp/i386/shared/pci/pcibios.h         |  62 ----
 c/src/lib/libbsp/mips/malta/Makefile.am            |   3 +-
 c/src/lib/libbsp/mips/malta/include/pci.h          |  32 --
 c/src/lib/libbsp/mips/malta/pci/pcifinddevice.c    | 277 --------------
 c/src/lib/libbsp/mips/malta/pci/pcilistdevices.c   | 102 ------
 c/src/lib/libbsp/powerpc/mvme5500/Makefile.am      |   6 +-
 .../libbsp/powerpc/mvme5500/pci/pcifinddevice.c    |  62 ----
 c/src/lib/libbsp/shared/console.c                  |  57 ++-
 c/src/lib/libbsp/shared/console_private.h          |  35 +-
 c/src/lib/libbsp/shared/pci/pci_bus_count.c        |  67 ++++
 c/src/lib/libbsp/shared/pci/pci_find_device.c      | 274 ++++++++++++++
 c/src/libchip/network/if_fxp.c                     |  43 ++-
 testsuites/samples/fileio/Makefile.am              |   2 +-
 testsuites/samples/fileio/init.c                   |   7 +-
 testsuites/samples/fileio/main_com.c               | 129 +++++++
 testsuites/samples/fileio/main_lspci.c             |  43 +++
 29 files changed, 1540 insertions(+), 884 deletions(-)
 create mode 100644 c/src/lib/libbsp/i386/pc386/console/uart_bus_pci.c
 create mode 100644 c/src/lib/libbsp/i386/shared/pci/pci_io.c
 delete mode 100644 c/src/lib/libbsp/i386/shared/pci/pcibios.h
 delete mode 100644 c/src/lib/libbsp/mips/malta/pci/pcifinddevice.c
 delete mode 100644 c/src/lib/libbsp/mips/malta/pci/pcilistdevices.c
 delete mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c
 create mode 100644 c/src/lib/libbsp/shared/pci/pci_bus_count.c
 create mode 100644 c/src/lib/libbsp/shared/pci/pci_find_device.c
 create mode 100644 testsuites/samples/fileio/main_com.c
 create mode 100644 testsuites/samples/fileio/main_lspci.c


More information about the devel mailing list