Re: [osol-code] Problems with shcomp during build

2010-04-15 Thread Neale Ferguson
Looking at the dates, I think you are correct: version shcomp (AT&T Research) 2003-03-02 version sh (AT&T Research) 93t 2008-11-04 Host is at snv_107. Neale -- This message posted from opensolaris.org ___ opensolaris-code mailing l

[osol-code] Problems with shcomp during build

2010-04-15 Thread Neale Ferguson
Is this a known problem: when I do a build of ON I am getting heaps of errors when building stuff in lib/libshell - /usr/bin/shcomp "common/scripts/filemutexdemo1.sh" >"filemutexdemo1" install -s -m 755 -f /export/home/tide/OpenSolaris/sirius/onnv-gate/proto/root_s390/usr/demo/ksh/bin "filemut

Re: [osol-code] libsmb needed for build

2010-04-08 Thread Neale Ferguson
You are correct. It was my fat fingers that are to blame. Sigh. -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

[osol-code] libsmb needed for build

2010-04-08 Thread Neale Ferguson
I updated my ONNV hg repository after a few weeks and my build now seems to require libsmb to build successfully. What package am I missing (it includes libsmb.h)? Neale -- This message posted from opensolaris.org ___ opensolaris-code mailing list ope

[osol-code] iso_spec.h

2010-03-06 Thread Neale Ferguson
In $SRC/cmd/fs.d/hsfs/... each subdirectory (e.g. labelit, fstyp) has its own copy of iso_spec.h. This file is in $ROOT/usr/include (having been put there by the install_h target). Also, the ISO_DESC_TYPE macro appears to be malformed: #define ISO_DESC_TYPE(x)((enum hs_voldesc_type)*(ISO

Re: [osol-code] Array out of bounds

2010-03-04 Thread Neale Ferguson
Still another - $SRC/cmd/fmli/sys/expr.c: static char expbuf[ESIZE]; void errxx(); int num; extern char *braslist[], *braelist[], *loc2; compile(p, expbuf, &expbuf[512], 0, errxx); ESIZE is defined as 256 earlier in the file yet it references the 512th ele

Re: [osol-code] Array out of bounds

2010-03-04 Thread Neale Ferguson
Similarly, in $SRC/cmd/avs/dsw/iiadm.c there are several instances of statements like: io->shadow_vol[DSW_NAMELEN] = '\0'; shadow_vol is defined as being DSW_NAMELEN elements long so this statement is overwriting the byte immediately after this array (for example bitmap_vol[DSW_NAMELEN] follo

[osol-code] Array out of bounds

2010-03-04 Thread Neale Ferguson
I'm using gcc 4.5 to build my Systemz code and am getting statement 10 flagged as possibly out of bounds. The code is in $SRC/cmd/abi/appcert/static_prof/static_prof.c around line 127: 01 bktno = (bktno + 1) % DEFBKTS; 02 for (i = bktno; i < DEFBKTS; i = (i + 1) % DEFBKTS) { 03 if (i == orig_

Re: [osol-code] about #pragma ident "%Z%%M% %I% %E% SMI"

2010-03-02 Thread Neale Ferguson
Cool, I was just planning to build 4.5.0. I will hasten my plans. On 3/2/10 4:23 PM, "Rainer Orth" wrote: Neale Ferguson writes: > gcc 4.4 and beyond flags #ident as deprecated and issues a warning. For files > being compiled with the flag that says "treat warn

Re: [osol-code] about #pragma ident "%Z%%M% %I% %E% SMI"

2010-03-02 Thread Neale Ferguson
gcc 4.4 and beyond flags #ident as deprecated and issues a warning. For files being compiled with the flag that says "treat warnings as errors" means builds come to a stop. I am removing #idents as I find them so my build will continue. On 3/2/10 3:51 PM, "James Carlson" wrote: Garrett D'Amor

Re: [osol-code] Building with gcc

2009-12-01 Thread Neale Ferguson
There's the -Wno-deprecated flag which will do the job for me. I didn't see it the first few times, I was looking for something more specific. Neale -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensola

Re: [osol-code] Building with gcc

2009-12-01 Thread Neale Ferguson
No, it’s only the #ident it will issue a warning on. It’s just that for some of the build the “treat warning as an error” flag is set so it bombs out. gcc is happy with #pragma ident(). We added support to the 4.2.3 level to act as a no-op. I should actually check again if there’s a –W flag that

[osol-code] Building with gcc

2009-12-01 Thread Neale Ferguson
I've been using gcc 4.2.3 to build OpenSolaris for my System z port for a coupe of years and was looking to move to 4.4. Using 4.4 to build ONNV fails because the formerly deprecated #ident and #machine statements are now unsupported and will generate warnings/errors. The #machine statement is u

Re: [osol-code] Enabling interrupts before pg_init()

2009-10-12 Thread Neale Ferguson
I missed the pg_cpu_bootstrap(CPU) call in mlsetup which fixes things so that the segv will not occur. -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/lis

[osol-code] Enabling interrupts before pg_init()

2009-10-12 Thread Neale Ferguson
In os/main.c there is the following sequence of code. With interrupts enabled via spl0 timer interrupts etc. will be able to flow. However, pg_init() is not called until post_startup(). So if an interrupt occurs that requires a change of thread then pg_ev_thread_swtch() will be called without cp

[osol-code] tss/tssapi.h

2009-08-25 Thread Neale Ferguson
I just did an hg pull from head and attempted a rebuild. I am crashing with the following: /export/home/tide/OpenSolaris/sirius/onnv-gate/usr/src/cmd/cmd-crypto/tpmadm : main.c:35:22: error: tss/tspi.h: No such file or directory I can't find this file anywhere. Where is it supposed to come from?

[osol-code] Resetting a dirty page after flush

2009-02-13 Thread Neale Ferguson
If fsflush() detects a dirty page for a vnode and calls VOP_PUTPAGE() at what point through the sequence of I/O is the dirty bit of the page cleared? (The page is not being freed so pvn_write_done is not going to unmap the page.) Neale -- This message posted from opensolaris.org __

Re: [osol-code] Starting console-login service

2008-12-19 Thread Neale Ferguson
I found that when svccfg is invoked with the import command line as its arguments it fails (enter the command at the svccfg> prompt works). A yacc trace shows that it never sees "end-of_file". I added the following to svccfg_main.c: --- a/usr/src/cmd/svc/svccfg/svccfg_main.c Fri Oct 31 13:

Re: [osol-code] Starting console-login service

2008-12-16 Thread Neale Ferguson
The problem appears to be with my build of svccfg. If I issue the svccfg with the arguments on the command line I just get the prompt back and nothing imported. If I svccfg with either the -f option or wait for the svccfg> prompt and put the command there it works fine. Now to see what I've brok

Re: [osol-code] Starting console-login service

2008-12-15 Thread Neale Ferguson
Thanks, now to check the source code to see where (what property) it gets the instance name from. Neale -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/l

[osol-code] Starting console-login service

2008-12-15 Thread Neale Ferguson
When I start my system the console login service doesn't start. I placed a trace inside the console-login script and it shows it fails due to the test if [ "$1" != "default" ]. $1 is a null string. I assume this value comes from the start property:

Re: [osol-code] dmake not rebuilding changed targets

2008-11-25 Thread Neale Ferguson
Our build is on ufs. On 11/25/08 3:07 PM, "Roland Mainz" <[EMAIL PROTECTED]> wrote: > Neale Ferguson wrote: >> On 11/25/08 2:52 PM, "Roland Mainz" <[EMAIL PROTECTED]> wrote: >>>> Erm... the current version of "dmake" in Sun Stu

Re: [osol-code] dmake not rebuilding changed targets

2008-11-25 Thread Neale Ferguson
Nope. On 11/25/08 3:28 PM, "Roland Mainz" <[EMAIL PROTECTED]> wrote: > Neale Ferguson wrote: >> On 11/25/08 3:07 PM, "Roland Mainz" <[EMAIL PROTECTED]> wrote: >>> Neale Ferguson wrote: >>>> On 11/25/08 2:52 PM, "Roland Mainz&q

Re: [osol-code] dmake not rebuilding changed targets

2008-11-25 Thread Neale Ferguson
On 11/25/08 2:52 PM, "Roland Mainz" <[EMAIL PROTECTED]> wrote: >> Erm... the current version of "dmake" in Sun Studio 12 is: >> -- snip -- >> $ dmake >> -v >> dmake: Sun Distributed Make 7.8 SunOS_sparc Patch 126503-01 2007/07/19 D'oh! I'd better see why I'm still using the Studio 11 stuff! >> --

[osol-code] dmake not rebuilding changed targets

2008-11-25 Thread Neale Ferguson
I am encountering some strange behavior with dmake. When building OpenSolaris I have been running dmake from $SRC and letting it go on its merry way. Occasionally I've done a make -k to get it to bypass a known problem with my code. Today I had made a couple of minor changes to code in my $SRC

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
D'oh, I must have had the -fresult-prediction switch set! Thanks for picking that up! On 11/13/08 3:58 PM, "James Carlson" <[EMAIL PROTECTED]> wrote: > > A quick glance at the code shows that this is an output-only > parameter, so that should actually have been: > > x= packet_get_string(&gssL

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
So .. uint_t gssLen; : : gssLen = mic_tok.Length; x= packet_get_string(&gssLen); : As for the getopt() culprits there are 20 or more files. I'll check my diffs and record the file names. Neale -- This message posted from opensolaris.org ___ ope

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
3rd option: should the parameter to packet_get_string() simply be cast to uint_t *? -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-c

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
I should've asked the question: (a) should gss_buffer_desc have uint32_t length or (b) should packet_get_string() use size_t? I think the latter is probably the more correct option. Just to fill in the picture further. gcc defines __SIZE_TYPE__ that size_t needs to be typedef'd to (otherwise yo

[osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
In gssapi.h the gss_buffer_desc structure looks like: typedef struct gss_buffer_desc_struct { size_t length; void *value; } gss_buffer_desc, *gss_buffer_t; In ssh/sshd/auth2-gss.c a call to packet_get_string() is made using the length field of this structure. This requires a uint

[osol-code] Problem building snmpdx

2008-11-07 Thread Neale Ferguson
When building $SRC/cmd/agents/snmp/snmprelayd I get the following message from the linker: Undefined first referenced symbol in file yywrap bin-sparc/config.o ld: fatal: Symbol referencing errors. No output written to

Re: [osol-code] hook symbol checking error

2008-10-28 Thread Neale Ferguson
Yep, that was the problem. Thanks -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

[osol-code] adt_event and struct msg_text

2008-10-28 Thread Neale Ferguson
In adt.c we include adt_event.h which has the following definition: extern struct msg_text adt_msg_text[]; struct msg_text is defined in adt_xlate.h. However, at this stage adt_xlate.h hasn't been installed. Even if it had, however, adt_xlate.h itself includes adt_event.h. I assume Sun Studio

[osol-code] hook symbol checking error

2008-10-27 Thread Neale Ferguson
I'm getting the following when I build the kernel. I'm not sure what the error means or how to resolve it: /export/home/tide/OpenSolaris/sirius/onnv-gate/usr/src/uts/zSeries/hook warning: hook symbol checking: global variable(s) introduced and/or removed. 0a1,2 > hook_stack_lock > hook_stacks ***

[osol-code] Scheduling timeout and processing callout

2008-09-10 Thread Neale Ferguson
). I assume I need to do some work here for the platform I am working on. Can someone describe the changes that were done in this area? Neale Ferguson -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensol

[osol-code] lib/libc/port/gen/nss_dbdefs.c - literal too big?

2008-08-22 Thread Neale Ferguson
In nss_dbddefs.c at lines 313 and 336 there is the following: if ((g = (hval & 0xf)) != 0) the literal has 9 digits but hval is defined as uint32_t. I assume we just have one more zero at the end than is absolutely necessary or am I missing something important? Neale This message p

[osol-code] stk_add() returning EFAULT

2008-07-01 Thread Neale Ferguson
I'm attempting to build the m4 package. During this aclocal is invoked which in turn invokes autom4te. There are quite a lot of parameters and envvars being passed and the execve fails with EFAULT. Tracing shows me that the following code is responsible in $SRC/uts/common/os/exec: /* * Add a

Re: [osol-code] utmpx

2008-06-17 Thread Neale Ferguson
Thanks. The problem turned out to be related to the ABI of the platform I'm porting to. lseek32 has an off32_t parameter. The ABI specifies that ints are sign extended so the compiler can bypass doing the sign extending when lseek32 calls lseek32_common. I added some "thunking" code to do the pr

[osol-code] utmpx

2008-06-16 Thread Neale Ferguson
Recently my system has started to behave oddly. After I logoff w or who will report the user as still logged on. ps shows that there is no process associated with the user. On some occasions the "what" field of the output of the 'w' command reports 'sched". Looking back through my changes to the

Re: [osol-code] Dirty pages

2008-05-29 Thread Neale Ferguson
A couple of follow-up questions: 1. Tracing fop_getpage() shows that the return value from *(vp)->v_op->vop_getpage is usually 0 which indicates success. However, many times I see 4096 which doesn't seem to correspond to an ERRxxx type value. What is this telling me? Should I only investigate t

Re: [osol-code] Dirty pages

2008-05-27 Thread Neale Ferguson
> So, there is no way to turn off the "storage key" before faulting in the > page, and then turning it back on after the input has completed? No. The hardware has always worked this way - it's defined in its principle of operations that I/O is part of the "change recording" mechanism. It is imp

Re: [osol-code] Dirty pages

2008-05-27 Thread Neale Ferguson
> How quickly do you want an answer to this ? Last week! ;-) It's not a write fault that's the problem here. It's when a read is done the page is marked dirty and fsflush will attempt to write it back out. Actually it's any read of the page (whether caused by a read fault or a write fault). Th

Re: [osol-code] sigresend and defunct processes

2008-05-23 Thread Neale Ferguson
Further to the last post, I've determined (lines preceded by '-' are debug messages in my kernel): *** sigtoproc sets the signal mask - 3000BA224EC = 0002 *** issig_forreal called which calls fsig which checks the masks and finds signal 18 ready to send

[osol-code] sigresend and defunct processes

2008-05-23 Thread Neale Ferguson
I've been running the gcc testsuite remotely which involves establishing ssh connection, running the test, returning the results, and terminating the ssh connection. The termination of the ssh connection results in a SIGCHLD being sent to the parent sshd process as the child goes away. Things pr

Re: [osol-code] Clearing mod bit

2008-05-15 Thread Neale Ferguson
Thanks for the answer. No for a follow-up question: when I read a block from disk the page it gets read into will get its mod bit set (in this architecture the mod/ref bits are associated with the physical page). This would mean fsflush() would detect this page and attempt to flush it back to

[osol-code] Clearing mod bit

2008-05-13 Thread Neale Ferguson
In checkpage() in common/os/vm_pageout.c a page that is to be freed has its attributes checked and if it's found that the P_MOD bit is set the page is paged out by queuing a request to the pageout thread. Is the P_MOD bit reset anywhere during this process and if so where? Presumably next time c

Re: [osol-code] pfiles

2008-05-07 Thread Neale Ferguson
It appears the problem is related to instr_t. I had changed instr_t from uint32_t (as it is for SPARC) to uint16_t (the minimum size for a s390x instruction which also have to be half-word aligned). I haven't followed through what the change to instr_t caused but I got some other ugly errors oc

[osol-code] pfiles

2008-05-01 Thread Neale Ferguson
I am having trouble with the pfiles command. The other p commands appear to work fine but this one hangs. Here's the sequence of operations used to generate the situation. > grep scum (to cause the program to just sit and wait for input) > ps shows: 100416 pts/1 0:00 grep > pflags 10

[osol-code] Reclaiming pages used by boot-time ramdisk

2008-05-01 Thread Neale Ferguson
Has boot-time RAMDISK support been added to SPARC? Currently for s390x at boot I remove the pages used by the ramdisk from the phys_avail memlist structure and create my own ramdisk memlist. I then intended to add these pages back to the general populace when release_bootstrap() is called. Howev

Re: [osol-code] Checking for dirty pages

2008-04-30 Thread Neale Ferguson
Thanks, that was it. The sync code was missing from my version of hat_pte_unmap(). (The is for s390x which was derived from the x86 hat layer.) This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.or

[osol-code] Checking for dirty pages

2008-04-25 Thread Neale Ferguson
When swapout gets up and segkp_unlock gets called a page is checked to see if it has been modified by using the hat_mod() operation. This is actually a call to hat_page_getattr() with the P_MOD flag as one of the arguments. In hat_i86.c hat_page_getattr() is simply a PP_GETRM() operation which i

Re: [osol-code] rctl_enforced_value returning strange value for RLIMIT_STACK

2008-02-09 Thread Neale Ferguson
The culprit is make itself. I missed the setrlimit syscall in my tracing. This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] rctl_enforced_value returning strange value for RLIMIT_STACK

2008-02-09 Thread Neale Ferguson
Correction, rather than "bad" value I should say "different" value. This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

[osol-code] rctl_enforced_value returning strange value for RLIMIT_STACK

2008-02-09 Thread Neale Ferguson
When I run make part of the exec() processing involves a call to rctl_enforced_value: rctl_enforced_value(rctlproc_legacy[RLIMIT_STACK], p->p_rctls, p)) make is a 32-bit app and I get a value that corresponds to the 2GB line as expected. However, make itself will fork and exec another instance

Re: [osol-code] Tracing IP stack for PING

2008-02-09 Thread Neale Ferguson
Turned on internal debug of ip.c and found it was the ip checksum. My ip_ocsum.s needed work. This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/ope

[osol-code] Tracing IP stack for PING

2008-02-07 Thread Neale Ferguson
We have our system up to the stage where we can starting doing some networking stuff. ifconfig lo0 sets up our loopback device. When we ping 127.0.0.1 we never get a response. I've been able to verify that ping successfully executes the sendto() call and is now waiting on the pollsys syscall. I

Re: [osol-code] /dev/null

2008-02-05 Thread Neale Ferguson
devfsadm -P does the trick This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] /dev/null

2008-02-05 Thread Neale Ferguson
It's failing in the checking of the security policy, specifically: boolean_t priv_isfullset(const priv_set_t *set) { PRIV_TEST_BODY(set->pbits[i] == ~(priv_chunk_t)0); } Evidently I'm missing something from my hand assembled system that defines the policies. Any clues as to what I haven'

[osol-code] /dev/null

2008-02-05 Thread Neale Ferguson
I am getting strange results from directing output to /dev/null when logged on as a non-root user using /bin/sh. >From a non-root user I see the following: $ ls -l /devices/pseudo/[EMAIL PROTECTED]:null crw-rw-rw- 1 root sys 13, 2 Feb 5 16:24 /devices/pseudo/[EMAIL PROTECTED]:n

[osol-code] Fragment errors with new disk driver

2008-01-02 Thread Neale Ferguson
We're writing a new disk driver and are able to use newfs to lay down a ufs filesystem. I can write small files using something like echo >. However, if I create a file of, say, 2048 bytes and then use dd to copy it from one file to another then I crap out with stuff like this: panic[cpu1]/thre

[osol-code] Use of sti/cli in os/intr.c

2007-11-01 Thread Neale Ferguson
In the x86/amd64 module os/intr.c calls to sti()/cli() are made. One of these is in dispatch_hardint(). Now if intr_thread_prolog() has been called the cpu_intr_actv bitmap is updated according to the current PIL. If dispatch_hardint() is then called and it issues sti() then an interrupt is all

[osol-code] math.h

2007-09-27 Thread Neale Ferguson
To what component does math.h, iso/math_iso.h etc. belong? They exist on a "live" OpenSolaris system in /usr/include but I can't find them in the OpenSolaris source tree. There is a math.h but it belongs to libbc and doesn't contain the _h_val definition required by libc/port/fp/fp_data.c. Neal

[osol-code] syscalls.h

2007-09-06 Thread Neale Ferguson
In the latest uts/common/sys/syscalls.h the definitions of SYS__x (used if using GCC) has disappeared. This means if you try and build with gcc you will get a heap of complaints about things like SYSCALL__fork1 not being found. The definition of SYS__ in addition to SYS_ is due to the fact t

[osol-code] Questions about softints and x-calls

2007-06-22 Thread Neale Ferguson
As part of the s390x port I'm implementing soft interrupt handling and cross-CPU calls. The way System z does program generated interrupts is via the SVC instruction. This interruption cannot be masked so it will be processed despite what the PIL setting is. PIL is being done in software and dep

[osol-code] dispq setup

2007-06-19 Thread Neale Ferguson
As part of the startup of CPUs in mp_startup, struct cpu entries are created for CPUs (other than the boot cpu0). Each cpu area is zeroed and a call to disp_cpu_init() is made. It in turn calls cpu_dispqalloc() which has the following loop: cpup = cpu_list; do {

[osol-code] lwp_rtt

2007-06-13 Thread Neale Ferguson
In start_main in ./common/os/main.c there's a call to lwp_rtt just before it leaves. What is the purpose/operation of this routine? I've looked at the x86 and sparc implementations but it's still not clear what the intent of the function is. I am attempting to implement it for my s390x port.

[osol-code] Re: [i18n-discuss] Re: libc_i18n.a for s390x

2007-06-13 Thread Neale Ferguson
I can wait until August. There's a lot more work in the port to keep me going until then. Neale This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/

[osol-code] libc_i18n.a for s390x

2007-06-12 Thread Neale Ferguson
My s390x port has got to the stage where it is attempting to load exec/elfexec as part of the start_init process. However, this requires that libc is built which further requires libc_i18n.a which appears to be one of the "closed source" items. Is this the case and if so what are my options for

[osol-code] Re: Re: s390x update

2007-05-28 Thread Neale Ferguson
I got the ramdisk stuff working. My latest problem is that the load of misc/strplumb is failing and I can't work out what's wrong (no dependencies and, apparently, no unresolved addresses). One area that will require major work (but is working thanks to low activity) is the allocation of page

[osol-code] Re: Mounting ramdisk as root

2007-05-24 Thread Neale Ferguson
Solved - problem was with the s390x implementation of copystr that is used by pn_get_buf(). This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opens

[osol-code] Re: Mounting ramdisk as root

2007-05-24 Thread Neale Ferguson
Further analysis shows the following call in devi_config_one fails as the ramdisk dev_ops has a null bus_ops field. Now I'm assuming because this works on i86 there's something not configured correctly on my system. if (!NEXUS_DRV(ddi_get_driver(pdip))) return (NDI_FAILU

[osol-code] Mounting ramdisk as root

2007-05-22 Thread Neale Ferguson
I am attempting to get my s390x kernel to mount a ramdisk as its root device. I'd like it to reuse the one used during boot but I'd just like to get the attach stuff working. Here are the debug messages I'm getting: rootconf: calling VFS_MOUNTROOT ufs ndi_devi_config_one: par = rootnex-1 (3d

[osol-code] Re: s390x update

2007-05-18 Thread Neale Ferguson
I managed to work through the problems listed above and have now run into the limitation of the gnu linker which: - doesn't generate program headers for "partially linked" objects - doesn't support the -N flag to add DT_NEEDED entries in the header so that fssnap_if can be autoloaded to resolve t

[osol-code] Re: s390x update

2007-05-17 Thread Neale Ferguson
I was just too zealous in my culling of code within rootnex. I accidently got rid of the ctlops vector in the bus_ops table for the driver. Therefore the attach_node process was failing leading to a null dip. This message posted from opensolaris.org ___

[osol-code] Re: s390x update

2007-05-16 Thread Neale Ferguson
Thanks to the tracing facilities of the hypervisor and a bit of REXX coding I generated the following trace of functions being called. It fails within attach_driver_nodes() ... -> i_ddi_attach_pseudo_node from i_ddi_init_root+17C -> ddi_name_to_major from i_ddi_attach_pseudo_node+16 -> mod_name_

[osol-code] s390x update

2007-05-15 Thread Neale Ferguson
I thought it was time for another update on the progress of the s390x port. I will be attempting to get a community going in the next couple of weeks when I get some time to devote to the project. I'm now getting into the device configuration stuff and crapping out because the dip for pseudo i

[osol-code] Re: math.h

2007-05-03 Thread Neale Ferguson
I am cross compiling for the IBM mainframe on a v490. /usr/include does have math.h What I am seeing that is different to other platforms, thanks to correspondence with James Carlson, is that while both builds are showing -nostdinc in the compilation options mine is missing the -I /usr/include.

[osol-code] math.h

2007-05-02 Thread Neale Ferguson
One error I've been ignoring while concentrating on getting the kernel built has been during the build of the rsa portion. I'm getting: ../../../common/bignum/mont_mulf.c:36:18: error: math.h: No such file or directory There are math.h in stand/lib/sa and lib/libbc/inc/include but shouldn't the

[osol-code] fs_operation_def

2007-05-02 Thread Neale Ferguson
I've been bringing my s390x code up to the latest level. I've encountered quite a few complaints when building with gcc with, for example, autofs.h where it declares the following: extern const struct fs_operation_def auto_vnodeops_template[]; fs_operation_def is defined in sys/vfs_opreg.h but

[osol-code] System z port update

2007-04-04 Thread Neale Ferguson
I circumvented the problem I described in the "Ramdisk layout" thread by moving the device drivers location down to within 2GB of the kernel. I'll look at GOT/PLT support in the near future. I'm now loading the modules and getting through startup. It's now crashing in hment_put_reserve as part o

Re: [osol-code] Ramdisk layout

2007-04-02 Thread Neale Ferguson
As a temporary work around I simply redefined SYSBASE to 1GB which means my modules are all within the 2GB limit. I'm not sure I want to go the gcc route: I'd rather not introduce another flag etc. Can you think of why GOT/PLT support within krtld is a bad idea? The effort in Linux is minimal. The

Re: [osol-code] Ramdisk layout

2007-04-02 Thread Neale Ferguson
Thanks. The kernel is now attempting to load the modules. It's now revealed another situation in that when krtld resolves the references in the driver the displacements are > 2GB. By default, gcc will use relative instructions to do calls and get the addresses of external references. However, these

[osol-code] Ramdisk layout

2007-04-01 Thread Neale Ferguson
I'm continuing to make progress with the s390x port. The kernel is now crapping out with the following: loading module TS (sched/TS) panic[cpu0]/thread=11c200: Couldn't load default scheduling class 'TS' skipping system dump - no dump device configured I am using a ramdisk from where the kernel h

[osol-code] Re: ctfmerge (again)

2007-01-12 Thread Neale Ferguson
Problem fixed. Using -feliminate-unused-debug-types flag stops the production of tens of thousands of things that causes ctfmerge to overflow its counter. My next question is: why does ctfmerge prune the .hash section header from the elf object? When krtld loads unix it looks for the DT_HASH en

[osol-code] Boot process

2007-01-05 Thread Neale Ferguson
Is my understanding of the boot process correct if I believe that the boot loader will load krtld and genunix. krtld will relocate itself for all non-UNDEF style symbols in kobj_boot, before passing control to kobj_init which then finishes the relocation of it and genunix? The proposition "whoam

[osol-code] Re: ctfstabs

2006-12-23 Thread Neale Ferguson
Found the problem. When gcc creates the .debug_info section entry for DW_FORM_strp type strings it defines an address rather than an offset. It relies on the fact that .debug_str gets loaded in the right place to make this address behave like an offset. This is fine for cases where the file is l

[osol-code] ctfstabs

2006-12-19 Thread Neale Ferguson
I added some fields to my offsets.il file and am now getting: /opt/onbld/bin/genoffsets -s /opt/onbld/bin/s390x/ctfstabs -r /opt/onbld/bin/s390x/ctfconvert /opt/onbld/bin/s390x/cw -_gcc -xarch=z990 -_noecho -W0,-xdbggen=no%usedonly-xO3 ../../zSeries/ml/s390x.il -D_ASM_INLINES -Xa -_gcc=

[osol-code] ctfmerge (again)

2006-12-07 Thread Neale Ferguson
I've just started getting the following message when building. It's running ctfmerge against genunix: ERROR: ctfmerge: No room for additional types in master I'm not exactly sure what it's telling me and what remedial action I need to take. Help?! This message posted from opensolaris.org _

[osol-code] Re: Re: freemem

2006-11-28 Thread Neale Ferguson
Thanks for the advice. It turns out all I needed to do was write a simple routine to initialize the memlist. The sparc/intel code initialized its memlist using the boot memlists created by the boot process. As s390x doesn't have such a beast it just needed to initialize the memlist structure and

[osol-code] Re: freemem

2006-11-16 Thread Neale Ferguson
Actually, this question is redundant and arises because of a lack of understanding of the way memlists work. I wonder if someone could step me through the way things work here... I'm trying to get my mind around the use of memlists in the startup code. I've modeled the System z code from the su

[osol-code] freemem

2006-11-16 Thread Neale Ferguson
How is the variable "freemem" setup for the first time? It is updated each clock tick but is there an initialization of it at startup? This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://

[osol-code] Progress with System z Port

2006-11-15 Thread Neale Ferguson
Following the advice given in this forum regarding bop_alloc etc. I've made further progress with the port. I thought it'd be useful to summarize where I'm at. Below is the console log of OpenSolaris booting on a System z box (z990). It's very early days still and there is a lot more work to do

[osol-code] Help to understand bop_xxxx operations

2006-11-07 Thread Neale Ferguson
s no such PROM support so I'm wondering the best way to emulate these routines. Some of the comments seem to indicate that the stuff it returns is a virtual address so I'm pretty confused at the moment. Neale Ferguson This message po