Repository: /svn/ppc-dev/ppc-dev
Latest revision: 108
Total changesets: 1
Log message:
usr/src/uts/ppc/vm/hat_debug.c:
  Forgot a newline, when printing out warnings about highly shared
 pages.
   trunk/usr/src/uts/common/disp/disp.c

usr/src/uts/common/disp/disp.c:
    Need to reset starting point for timing out of idle loop.
    Without this fix, you get a timeout and panic after 60
    seconds of elapsed time from the start of the idle loop,
    even if other work had been done.

    Of course, this whole thing is temporary, anyway.  It was
    a way to try to break in and get some data when rtld became
    perpetually blocked on _lwp_mutex_lock().

Add kprintf system call.

We have some primitive debugging capability in the Solaris/PPC
kernel.  It isn't kmdb, but at least we have printf-like functions
that print trace messages out to the console.  But, in early
userland, we have nothing.  In the userland run-time loader,
we can't use libc to do I/O.  Libc isn't loaded yet.  So debugging
anything is a real drag, even by early kernel bringup standards.

So, I added a system call that gives direct access to prom_printf()
from userland.  No open(), read(), write() necessary.  We don't need
no stinking device tree. :)

Of course, this is a colossal violation of security.  But,
it is temporary.

Suppress the calls to print the contents of a ddi_acc_hdl.
That information is not needed for the foreseeable future.
The function, print_ddi_acc_hdl(), is still in pmdb_subr.c,
in case it is needed again.

usr/src/lib/libc/ppc/sys/fork1.s:
    Use branchless logic to set return value.

Add "hello world" from rtld, to show that kprintf() works from
rtld.

Sprinkle calls to kprintf() around _lwp_mutex_lock(),
 _lwp_mutex_unlock(),
and a few other places, to find out why rtld blocks on a mutex and
hangs

usr/src/lib/libc/inc/thr_inlines.h:
    Reverse the sense of the return value of set_lock_byte().
    It used to be an inline transcription of lock_try() from
    the Solaris/PPC/2.6 code.  That code returned 0 for failure
    and 1 for success.  But, the set_lock_byte() should return
    the old value of the byte in memory, which means that a
    return value of 0 indicates success -- the old value was 0,
    so the lock was not already locked, and we just now locked it.
    Any non-zero value indicates failure, because the byte
    in memory was already locked.

usr/src/lib/libc/inc/thr_inlines.h:
    This file was modified, yesterday.
    I forgot to update the copyright date.

usr/src/uts/ppc/sys/c_language.h:
    New file.  I need a place to collect C language supplements,
    that is, things that should have been features of the C language.
    So far, I have placed ELEMENTS() there, because there are now
    several files that #define it and use it.

    There are some candidate header files in common code where
    ELEMENTS() (or something like it) could be added, but I don't
    want to mess with common header files.  Well, not now, anyway.

usr/src/uts/chrp/os/cpuid.c
usr/src/uts/chrp/os/trap.c
usr/src/uts/ppc/test/unit_test.c
    Replace private #define of ELEMENTS();
    use the definition in sys/c_language.h.

usr/src/uts/ppc/test/test_lwp_lock.c:
    Update the unit test of set_lock_byte() to reflect the fact that
 the
    sense of the return value is 0 for success, non-zero for failure.
    We do not want our unit tests to suffer from software rot.

    While we are at it, make the test coverage a bit more thorough.

usr/src/uts/common/os/modctl.c:
    Add visible delimiters around the namespace/module string in the
    error messages.  This is a little poka-yoke device that makes it
 more
    clear if something goes wrong due to leading space getting in the
    namespace, due to the way the C processor expands macros inside
 strings.

usr/src/uts/ppc/ml/modstubs.s:
    Add warning comment for the next poor slob who might not realize
    how careful one needs to be about whitespace in the use of the
    MODULE() macro.

usr/src/uts/ppc/pmdb/pmdb_subr.c
usr/src/uts/ppc/pmdb/pmdb_trace.c
usr/src/uts/ppc/sys/pmdb_subr.h

  1. Publish definition of hex_dump.
  2. Move some functions from pmdb_trace.c to pmdb_subr.c,
     where they belong.  pmdb_trace.c should contain only
     helper functions for the macros that trace current location
     and contents of variables.
  3. More general printing of numbers with SI suffixes.
  4. Add print_pc(), print a program counter in both raw and symbolic
 form.

usr/src/uts/ppc/ml/ddi_ppc_asm.s:
    Make cstyle clean.

    Note: it may seem kind of funny to be concerned about whether an
    assembly language file is cstyle clean.  But, a surprising number
    of .s files can be checked without a ridiculous amount of noise,
    and things like block comment style, indentation rules,
 preprocessor
    rules, etc. apply to assembly language as well as C.  Also, C code
    meant for lint gets cstyled.  It actually can work out better than
    you might think.  If I had my way, I would add an asm option to
    cstyle to make use slightly more relaxed rules.  But, I already
    have my own private copy of cstyle that I have to maintain, and
    I don't want to maintain a copy that diverges even more.  At least
    not now.

usr/src/uts/ppc/vm/hat_ppcmmu.c:
    Finish the implementation of hat_unload_callback().

    This work had not been done, because we have never before been
    as far into userland that we had real cases of a non-null
    callback function.  I felt comfortable just postponing this work,
    because I am familiar with HAT code, and so to me it isn't scary,
    and familiarity breeds confidence -- some might say overconfidence.

    Anyway, here it is.
    
Get aw to work for PowerPC.

The aw binaries in /opt/onbld/*/bin are of unknown origin,
and were certainly not built using the current version of
usr/src/tools/aw/aw.c, out of the box.

So, I will have to derive PowerPC changes from scratch.

usr/src/Makefile.master:
    Use '-gdwarf-2' only with gcc.

usr/src/tools/aw/aw.c:
 1. Don't emit '-K' argument to GNU assembler, at least for PowerPC.
 2. verbose: Show the entire pipline, all at once, before doing
 anything.
    Otherwise, error messages can get mixed in with trace messages.
 3. If -P is not specified, then complain about any -D or -U options.
 4. For PowerPC, define __powerpc and __ppc, and similarly for 64-bit.

usr/src/tools/aw/Makefile:
    For PowerPC, ensure that we get isa_defs.h from
 usr/src/uts/common/sys,
    not from /usr/include on the (cross) development machine.
    
gs rev 934 to 950

Files:
        create: usr/src/lib/libc/ppc/sys/kprintf.s
        create: usr/src/uts/common/syscall/kprintf.c
        create: usr/src/uts/ppc/sys/c_language.h
        update: usr/src/Makefile.master
        update: usr/src/cmd/sgs/rtld/common/external.c
        update: usr/src/cmd/sgs/rtld/common/setup.c
        update: usr/src/cmd/sgs/rtld/ppc/_setup.c
        update: usr/src/cmd/sgs/rtld/ppc/boot.s
        update: usr/src/lib/libc/inc/thr_inlines.h
        update: usr/src/lib/libc/port/sys/lwp.c
        update: usr/src/lib/libc/ppc/Makefile
        update: usr/src/lib/libc/ppc/sys/_lwp_mutex_unlock.s
        update: usr/src/lib/libc/ppc/sys/fork1.s
        update: usr/src/tools/aw/Makefile
        update: usr/src/tools/aw/aw.c
        update: usr/src/uts/chrp/os/cpuid.c
        update: usr/src/uts/chrp/os/trap.c
        update: usr/src/uts/common/Makefile.files
        update: usr/src/uts/common/disp/disp.c
        update: usr/src/uts/common/io/vfe/vfe_gem.c
        update: usr/src/uts/common/os/modctl.c
        update: usr/src/uts/common/os/sunpci.c
        update: usr/src/uts/common/os/sysent.c
        update: usr/src/uts/common/sys/syscall.h
        update: usr/src/uts/ppc/ml/ddi_ppc_asm.s
        update: usr/src/uts/ppc/ml/modstubs.s
        update: usr/src/uts/ppc/pmdb/pmdb_subr.c
        update: usr/src/uts/ppc/pmdb/pmdb_trace.c
        update: usr/src/uts/ppc/sys/pmdb_subr.h
        update: usr/src/uts/ppc/test/test_lwp_lock.c
        update: usr/src/uts/ppc/test/unit_test.c
        update: usr/src/uts/ppc/vm/hat_debug.c
        update: usr/src/uts/ppc/vm/hat_ppcmmu.c
 
 
This message posted from opensolaris.org

Reply via email to