Repository: /svn/ppc-dev/ppc-dev
Latest revision: 109
Total changesets: 1
Log message:
Add usr/src/cmd/hello. So far, there are two versions
of the hello-world program. See usr/src/cmd/hello/hello-README.
onbld/bin/epa:
Add -cd <dir> to change directory without affecting the parent.
Most shells have a way to alter the environment on a one-shot basis,
just before running a command, but they do not do the same thing for
current working directory or umask. Maybe the reasoning is that it
is not much trouble to use a subshell. After all, it is just a couple
of parens. But then, the same could be said for altering environment
variables. Why make an exception for that? Another imponderable.
usr/src/cmd/hello-{kprintf,write}:
The two programs, 'hello-kprintf' and 'hello-write', are to be made permenent
features of Solaris/PPC, as part of the design-for-port initiative.
Therefore, they are not to be installed as /sbin/init, and they must
not both be named, simply, 'hello'.
usr/src/cmd/sgs/Makefile.init
For some reason, libelf was left out as a dependency for /sbin/init.
usr/src/lib/libc/ppc/sys/kprintf.s
Tolerate a NULL format string. Treat it as a no-op.
usr/src/lib/libc/ppc/gen/unimp_ppc_libc.c
Cause unimplemented functions to call libc_die(), which will use
kprintf() to complain. That way, a message will get out to the console.
Otherwise, we have no way of communicating with the outside world from
rtld, ... yet
usr/src/lib/libc/ppc/mapfile-vers
Make kprintf() public
usr/src/lib/libc/ppc/sys/syscall.s
Implement _syscall* and __systemcall* functions
usr/src/lib/libc/ppc/threads/tls_get_addr.c
Implement __tls_get_addr().
Note: this is implemented in C. On Sparc and x86, it is done with
hand-crafted assembly language code, for performance. I am not
terribly interested in optimization of this code, right now. But,
even if I were, I might not ever switch to asm code for Solaris/PPC,
because, with GCC inlines and -xO4 (for selected files only),
the code would be almost as good as hand-crafted asm code,
maybe just as small and just as fast.
usr/src/psm/promif/ieee1275/common/prom_printf.c
Now that we have kprintf(), it seems a good idea to ruggedize prom_printf()
a bit. It isn't bullet-proof, but it is improved. This may seem
unnecessary, since a huge security hole like kprintf() will never
be Solaris product. But, even for our purposes, some basic pointer
safety helps. And while we are at it, we may as well refactor the whole
way various other things are handled, in order to make prom_printf()
more secure.
The lower-level implementation requires a buffer pointer, a size,
and an indicator whether the formatting is for I/O or to string.
This makes many tests easier to understand, and, by the way, smaller
and faster, too. It allows for more flexible reuse of code.
It saves on kernel stack space, because an internal buffer is not
always allocated on the stack, only for I/O
usr/src/uts/chrp/genassym/Makefile
Do more to adhere to a policy of leaving targets untouched,
until and unless a target is built successfully
usr/src/lib/libc/ppc/threads/tls_get_addr.s
Remove the old asm file. __tls_get_addr() is now implemented in C.
usr/src/uts/chrp/os/machdep.c
1. Remove in_kernel_stack(). It is not used.
2. kdi_pread() and kdi_pwrite() are not implemented, yet.
Make sure they complain and die, if called
usr/src/uts/chrp/os/trap.c
Add tracebacks in the case of SIGSEGV and user instruction access.
This is to try to get information about a problem when it happens,
rather than allowing the kernel to deliver a signal to the process.
After that, much has happened and evidence has been destroyed.
NOTE: Not for use in a production system
usr/src/uts/common/syscall/kprintf.c
Handle up to 6 32-bit words worth of arguments -- 24 bytes.
Also, add argument pad values to try to make it more clear how things
have gone wrong, if the format string causes an attempt to process
more than 24 bytes worth of arguments
usr/src/uts/ppc/os/archdep.c
Remove restriction on frame pointer values that had prevented
userland tracebacks. Truly safe pointer following still needs work
usr/src/uts/ppc/pmdb/pmdb_shell.c
Print a stack backtrace for process 1.
That is, find the thread with t->t_lwp->lwp_procp == 1,
if any, and print the stack backtrace for that thread
usr/src/uts/ppc/sys/pmdb_subr.h
usr/src/uts/ppc/pmdb/pmdb_subr.c
usr/src/uts/ppc/vm/hat_debug.c
Some print functions, originally created for hat debugging,
are really more general-purpose, and can be reused.
Move those to pmdb_subr.c and update their declarations in pmdb_subr.h.
usr/src/lib/libc/ppc/gen/alloca.s
Desk check alloca() and write some comments on the logic
usr/src/uts/ppc/vm/vm_machdep.c
*** Temporary ***
Add traceback to map_addr_proc().
usr/src/uts/ppc/vm/hat_ppcmmu.c
Fix confusing comment
usr/src/uts/ppc/sysgen/generated.hdr
New file. Boilerplate header to be placed at the start of
generated files
usr/src/lib/libc/port/threads/assfail.c
Try to mitigate some second-order problems that can occur
in common_panic().
1. Issue message using kprintf(), instead of _write(2,...).
File descriptor 2 will almost certainly not work.
I think libc has not been designed and tested with
such early panics in mind.
Note: kprintf() works from rtld but does not work
from within libc. It fails while trying to resolve
the PLT entry.
2. Test for &assert_lock == NULL.
This may seem stupid, because assert_lock is static,
but, for some reason _private_lwp_mutex_lock()
get called with NULL. I think it might be one of those
things where relocations have not been done yet, so the
& operator does not work, but I am not sure.
usr/src/lib/libc/ppc/mapfile-vers
See what happens if I specify that kprintf is DIRECT.
Hmmmm, that didn't change anything.
/usr/src/lib/libc/ppc/sys/syscall.s
Latest attempt at correct __systemcall and __systemcall6.
usr/src/usr/src/uts/chrp/os/trap.c
usr/src/uts/ppc/pmdb/pmdb_shell.c
usr/src/uts/ppc/pmdb/pmdb_subr.c
Move some functions to print registers from trap code to pmdb.
Much of the code can be reused. pmdb_cmd_p1stack() now uses it.
usr/src/uts/ppc/sys/privregs.h
cstyle
gs revs 951 to 975
Files:
create: usr/src/cmd/hello/
create: usr/src/cmd/hello/hello-README
create: usr/src/cmd/hello/hello-kprintf/
create: usr/src/cmd/hello/hello-kprintf/Makefile
create: usr/src/cmd/hello/hello-kprintf/hello-kprintf.c
create: usr/src/cmd/hello/hello-kprintf/syscall.s
create: usr/src/cmd/hello/hello-write/
create: usr/src/cmd/hello/hello-write/Makefile
create: usr/src/cmd/hello/hello-write/hello-write.c
create: usr/src/cmd/hello/hello-write/syscall.s
create: usr/src/lib/libc/ppc/threads/tls_get_addr.c
create: usr/src/uts/ppc/sysgen/generated.hdr
delete: usr/src/lib/libc/ppc/threads/tls_get_addr.s
update: onbld/bin/epa
update: usr/src/cmd/sgs/Makefile.init
update: usr/src/lib/libc/ppc/gen/alloca.s
update: usr/src/lib/libc/ppc/gen/unimp_ppc_libc.c
update: usr/src/lib/libc/ppc/mapfile-vers
update: usr/src/lib/libc/ppc/sys/kprintf.s
update: usr/src/lib/libc/ppc/sys/syscall.s
update: usr/src/psm/promif/ieee1275/common/prom_printf.c
update: usr/src/uts/chrp/genassym/Makefile
update: usr/src/uts/chrp/os/machdep.c
update: usr/src/uts/chrp/os/trap.c
update: usr/src/uts/common/syscall/kprintf.c
update: usr/src/uts/ppc/os/archdep.c
update: usr/src/uts/ppc/os/syscall.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/pmdb_subr.h
update: usr/src/uts/ppc/vm/hat_debug.c
update: usr/src/uts/ppc/vm/hat_ppcmmu.c
update: usr/src/uts/ppc/vm/vm_machdep.c
This message posted from opensolaris.org