Repository: /svn/ppc-dev/ppc-dev
Latest revision: 107
Total changesets: 1
Log message:
HAT code changes
================
1. Collect hat code that is strictly for debugging into hat_debug.h
   and hat_debug.c

2. Move some declarations into hat_ppcmmu.h, where they belong,
   rather than manually pasting in a declaration where I need it.

3. Keep track of share counts separately for kernel mappings and
   non-kernel mappings.  This means that we can report on any
   mappings with mixed kernel and non-kernel virtual addresses.

chrp changes
============
1. Makefile.chrp: add CFLAGS rule for debug32/hat_debug.o,
   same as for debug32/hat_ppcmmu.o

2. Makefile.files: remove unit_test.o and unit_test_vm.o.
   Now, there are many unit test files, all under uts/ppc/test.
   None seem to be CHRP-specific.
   unit_test_vm is obsolete.

3. memlist.c: Show total number of ranges and total bytes
   for the given memlist, as well as printing out the elements.

4. startup.c: protect boot pages by walking the hardware pagetable,
   not by walking the PROM translations.
   *** IMPORTANT CHANGE ***
   This seems to have cured a number of Heisenbugs that were due to
   a few pages having been claimed by inetboot and the kernel.
   The discrepency was a half-dozen pages, or so, but all it takes
   is one.

5. machparam.h: reform the method for defining PAGESIZE and friends,
   so that the expressions for deriving them are still intact and
   used by C files, but simple constants are supplied for use by
   the assembler, and those constants are verified as being equal
   to the defining expressions.

usr/src/uts/ppc changes
=======================
1. Makefile.files:
       Add hat_debug.o
       Add object files for unit_test drivers and individual tests.

2. Makefile.rules:
       Add rules for pmdb/
       Add rules for test/

3. ml/lock_prim.s:
       Add more calls to check_mutex()

4. ml/modstubs.s:
       Change comments to reflect how arguments are passed on PowerPC,
       in contrast with the way it is done on x86.

5. os/bootops.c:
       Make bop_alloc() a wrapper around other underlying functions,
       which can be switched.  Switchable bop_alloc() has been used
       for experimental versions.  But now, there are just two
 underlying
       functions: one to call PROM services, and one to complain and
       die, which is used after bop_alloc() is disabled.

6. os/ppc_subr.c:
       Adjust the tests so that check_mutex() will work for
 mutex_exit()
       as well as mutex_enter().  Take a flag: 1=enter 0=exit.  The
 vast
       majority of tests apply to both enter and exit.

       Remove ppc_mutex_vector_enter() and ppc_mutex_vector_tryenter().
       Assembly language code now calls check_mutex() directly, and
 more
       often.

7. pmdb/pmdb_shell.c:
       Add code to show t0 stack.  This does not work correctly,
       but it does no harm, so I will commit this change along with
       all the others for usr/src/uts/ppc.

8. pmdb/pmdb_subr.c:
       Move several generally handy decode and print functions from
       the HAT layer code, where they were first created and used.

       Add print_bootops().

9. sys/mutex_impl.h:
       Add non-zero filler pattern to be used in check_mutex().

10. sys/pmdb.h:
       Move several function declarations to pmdb_trace.h, so that
       tracing functions and macros can be imported separately.
       Some others belong in pmdb_subr.h.

11. sys/pmdb_subr.h:
       Collect declarations for functions that decode and print
       various hardware registers, data structures, etc.  Define
       in a way that makes them usable only in a debug kernel.

12. sys/pmdb_trace.h:
       Declare only general-purpose functions for tracing current
       location, values of variables, etc.

13. sys/trap.h:
       Define SC_KPRINTF
       *** NOTE *** This change will be reversed, soon, because
       kprintf() is too heavy-weight to work as a fast system call.

usr/src/uts/common changes

usr/src/cmd changes
===================
usr/src/cmd/sh/Makefile.lite:
    Create a makefile that builds a statically linked version of Bourne
 shell
    and links against libclite.a, an archive file containing ordinary
 objects
    of libc, with a few tweaks to prevent bringing in the whole world.
    *** Experimental ***  Vey promising, but needs work.

Changes to usr/src/lib/libc
===========================

1. Makefile.objs:
       Add support for building libc.a

2. port/threads/thr.c:
       Get rid of warnings about conflicting definitions of TIDHASH.
       We use UD_TIDHASH, instead.
       We wouldn't have to do this if we reformed some header files to
       be a bit less indiscriminate about what they include.
       Don't get me started.

3. ppc/Makefile:
       Changes to make building libc.a work.  include Makefile.objs.

       Update assym.h only if its contents has really changed.

4. ppc/sys/_lwp_mutex_unlock.s:
       Optimize the way the address of the lockword is computed
       and the generation of WAITER_MASK.

usr/src/lib/libc/ppc/Makefile:
    Get rid of kprintf.o
    New version of kprintf() is coming.
    For now, remove it so builds do not break.

usr/src/uts/common/os/sunpci.c:
    Add ASSERTs and other trace messages to pci_config_getb().
    I think hp->ah_addr ought not to be NULL.
    I also think that, although offset_t is a 64-bit integer,
    it should not have a value above 2**32 on a 32-bit kernel.

usr/src/uts/common/io/vfe/vfe_gem.c
    Add call to print out the contents of conf_handle.

usr/src/uts/common/os/main.c
    Replace ad hoc print statements with FBT(), which can be enabled
    and disabled.  Some bugs are sensitive to timing, so it is handy
    to be able to adjust the verbosity.  Also, FBT() produces more
    regular trace messages.

usr/src/uts/common/os/sunddi.c
    Add some tracing.  Temporary.

usr/src/uts/common/os/sunpci.c
    Add some tracing.  Temporary.
    
usr/src/uts/ppc/ml/ddi_ppc_asm.s
    1. *** IMPORTANT ***  Fix bug where ddi_get32 (AKA ddi_getl,
 ddi_io_get32,
       ddi_io_getl, ddi_mem_get32, ddi_mem_getl) was missing a bctr at
 the
       end, and so fell through to i_ddi_get32().

       NOTE: This was caught by desk checking, while adding code to
 make
       the stack frames observable.  I was having a hard time figuring
       out how it is ever possible to get from pci_config_getb() to
       i_ddi_get32() -- it just didn't seem like there was ANY
 legitimate
       path from one to the other.  So, I added code to retain more
 stack
       frames.  Then, I spotted the problem before even running the new
       code.

       I believe the reason that this was a regression is that before
       my changes to memory management, there was a mapping to va=0,
       which should not have been there.  With that mapping, things
       worked -- sort of.

       There have been three recent fixes of note:
         1) the new scheme for protecting boot pages
         2) the workaround for an uninitialized cp->cpu_pg
         3) this fix
       Due primarily to these three fixes, I think you will find
       that a great many intermittent problems have been cleared up.
       Now, I get right back to the earlier symptom of hanging in the
       idle loop -- the old lwp unlock problem.

usr/src/uts/ppc/pmdb/pmdb_subr.c
    Add function to print the contents of a structure, given a
 description
    of its elements.  Just another Poor Man's DeBugger feature.

    Add function to print a ddi_acc_hdl.

usr/src/uts/ppc/vm/hat_ppcmmu.h
    Remove definition of struct hat.  It is ok to leave it as an
 incomplete
    type, because it is intended to be opaque.

Get rid of ad-hoc duplicate definitions of MODS_* symbols
in usr/src/uts/ppc/ml/modstubs.s.  But, do it in a way that
does not require genassym.  For definitions of simple constants,
I would rather make include files _ASM-safe.  But, since that
would be a big reform job that would not be taken back into
Solaris product, for now, we extract the definitions we need.

That makes dependencies a bit trickier than before, but since
PowerPC already has this extra layer of dependency, due to the
generation of header files from usr/src/uts/ppc/sysgen, then
we have already paid the price in make-complexity.  So, lets
have another.

usr/src/uts/ppc/os/ppc_subr.c:
    A thread's lwp pointer can be null.  Do not unconditionally
    dereference it.
    
gs revs 923 to 933

Files:
        create: usr/src/cmd/sh/Makefile.lite
        create: usr/src/lib/libc/Makefile.objs
        create: usr/src/uts/ppc/sys/pmdb_subr.h
        create: usr/src/uts/ppc/sys/pmdb_trace.h
        create: usr/src/uts/ppc/sysgen/extract-defs.pl
        create: usr/src/uts/ppc/vm/hat_debug.c
        create: usr/src/uts/ppc/vm/hat_debug.h
        update: generated.fl
        update: usr/src/Makefile.master
        update: usr/src/lib/libc/inc/thr_inlines.h
        update: usr/src/lib/libc/port/threads/thr.c
        update: usr/src/lib/libc/ppc/Makefile
        update: usr/src/lib/libc/ppc/genassym.c
        update: usr/src/lib/libc/ppc/sys/_lwp_mutex_unlock.s
        update: usr/src/lib/libc/ppc/sys/getdabr_count.s
        update: usr/src/uts/Makefile
        update: usr/src/uts/chrp/Makefile
        update: usr/src/uts/chrp/Makefile.chrp
        update: usr/src/uts/chrp/Makefile.files
        update: usr/src/uts/chrp/ml/locore.s
        update: usr/src/uts/chrp/os/intr.c
        update: usr/src/uts/chrp/os/memlist.c
        update: usr/src/uts/chrp/os/startup.c
        update: usr/src/uts/chrp/os/trap.c
        update: usr/src/uts/chrp/sys/machparam.h
        update: usr/src/uts/common/disp/cmt.c
        update: usr/src/uts/common/disp/disp.c
        update: usr/src/uts/common/io/vfe/vfe_gem.c
        update: usr/src/uts/common/os/exec.c
        update: usr/src/uts/common/os/main.c
        update: usr/src/uts/common/os/modctl.c
        update: usr/src/uts/common/os/sunddi.c
        update: usr/src/uts/common/os/sunpci.c
        update: usr/src/uts/ppc/Makefile
        update: usr/src/uts/ppc/Makefile.files
        update: usr/src/uts/ppc/Makefile.rules
        update: usr/src/uts/ppc/ml/ddi_ppc_asm.s
        update: usr/src/uts/ppc/ml/lock_prim.s
        update: usr/src/uts/ppc/ml/modstubs.s
        update: usr/src/uts/ppc/os/bootops.c
        update: usr/src/uts/ppc/os/ppc_subr.c
        update: usr/src/uts/ppc/pmdb/pmdb_shell.c
        update: usr/src/uts/ppc/pmdb/pmdb_subr.c
        update: usr/src/uts/ppc/sys/mutex_impl.h
        update: usr/src/uts/ppc/sys/pmdb.h
        update: usr/src/uts/ppc/sys/trap.h
        update: usr/src/uts/ppc/sysgen/Makefile
        update: usr/src/uts/ppc/sysgen/make-hdrs.pl
        update: usr/src/uts/ppc/vm/hat_ppcmmu.c
        update: usr/src/uts/ppc/vm/hat_ppcmmu.h
        update: usr/src/uts/ppc/vm/mach_ppcmmu.c
        update: usr/src/uts/ppc/vm/vm_machdep.c
 
 
This message posted from opensolaris.org

Reply via email to