[OpenBIOS] [PATCH 00/16] Convert SPARC32 to OFMEM

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Dec 30 19:07:03 CET 2010


This patchset converts SPARC32 and its associated devices over from
its own private memory routines over to using the OFMEM API as used
by PPC and SPARC64.

v1:
Initial patchset.

Mark Cave-Ayland (13):
  Change the SPARC32 build system so that OFMEM is now included within
    SPARC32 builds.
  Reduce memory of the Forth machine to 16k.
  Alter the SPARC32 entry.S file to allow extra space for the page
    tables to handle OpenBIOS images up to 2MB.
  Switch SPARC32 page tables over to use OFMEM's ofmem_posix_memalign()
    rather than its internal posix_memalign() function.
  Switch IOMMU posix_memalign() calls over to ofmem_posix_memalign(),
    and then remove the private SPARC32 posix_memalign() implementation
    since it is no longer required.
  Add ofmem_init() function to openbios.c taking into account that
    unlike SPARC64, OFMEM needs to be setup *before* the MMU so    
    that the page table allocation routines can use it.
  Switch SPARC32 over to use OFMEM's malloc()/free() internally rather
    than using it's own implementation.
  Remove the existing map_page() function and instead install a
    transitional API using map_pages() which is almost identical to the
    OFMEM API.
  Introduce ofmem_arch_io_translation_mode() to allow an OFMEM arch to
    specify different MMU modes for I/O memory mapped regions.
  Implement ofmem_map_io() within OFMEM as a function to map I/O memory
    (similar to SPARC32's private map_io() function).
  Switch all SPARC32 devices over from the private map_io() function
    over to OFMEM's ofmem_map_io() function.
  Switch remaining SPARC32 code over to OFMEM.
  Fix the FMT_cell and FMT_ucell definitions for SPARC32.

mcayland (3):
  Alter ofmem_posix_memalign() so that the resulting pointer is aligned
    for both physical and virtual addresses.
  Introduce ofmem_arch_get_phys_top() for specifying the top of
    physical memory in OFMEM.
  Change OFMEM to allocate memory from the top of RAM downwards.

 openbios-devel/arch/ppc/qemu/ofmem.c              |   23 ++
 openbios-devel/arch/sparc32/build.xml             |    1 +
 openbios-devel/arch/sparc32/console.c             |    4 +-
 openbios-devel/arch/sparc32/entry.S               |   52 +++-
 openbios-devel/arch/sparc32/ldscript              |    3 +-
 openbios-devel/arch/sparc32/lib.c                 |  306 +++++----------------
 openbios-devel/arch/sparc32/ofmem_sparc32.c       |  149 ++++++++++
 openbios-devel/arch/sparc32/openbios.c            |    6 +-
 openbios-devel/arch/sparc64/ofmem_sparc64.c       |   26 ++-
 openbios-devel/config/examples/sparc32_config.xml |    2 +
 openbios-devel/drivers/escc.c                     |    4 +-
 openbios-devel/drivers/esp.c                      |    4 +-
 openbios-devel/drivers/fw_cfg.c                   |    2 +-
 openbios-devel/drivers/iommu.c                    |   12 +-
 openbios-devel/drivers/obio.c                     |   10 +-
 openbios-devel/drivers/sbus.c                     |    2 +-
 openbios-devel/include/arch/sparc32/types.h       |    4 +-
 openbios-devel/include/libc/stdlib.h              |    1 -
 openbios-devel/include/libopenbios/ofmem.h        |   15 +-
 openbios-devel/libopenbios/ofmem_common.c         |   73 +++++-
 20 files changed, 402 insertions(+), 297 deletions(-)
 create mode 100644 openbios-devel/arch/sparc32/ofmem_sparc32.c

-- 
1.7.2.3




More information about the OpenBIOS mailing list