To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-amd64
or, via email, send a message with subject or body 'help' to
freebsd-am...@freebsd.org
You can reach the person managing the list at
freebsd-a...@freebsd.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-amd64 digest..."
Today's Topics:
1. Re: amd64/144503: [boot] 8.0-RELEASE does not boot on DL585
[regression] (Gunther Schadow)
2. Request for review/comments: 32-bit compat for non-x86
architectures (Nathan Whitehorn)
3. Re: Request for review/comments: 32-bit compat for non-x86
architectures (John Baldwin)
4. Re: amd64/144503: [boot] 8.0-RELEASE does not boot on DL585
[regression] (John Baldwin)
5. Re: Request for review/comments: 32-bit compat for non-x86
architectures (Nathan Whitehorn)
6. Re: Request for review/comments: 32-bit compat for non-x86
architectures (Nathan Whitehorn)
7. Re: Request for review/comments: 32-bit compat for non-x86
architectures (John Baldwin)
8. Re: Request for review/comments: 32-bit compat for non-x86
architectures (Nathan Whitehorn)
9. Re: Request for review/comments: 32-bit compat for non-x86
architectures (John Baldwin)
10. Re: Request for review/comments: 32-bit compat for non-x86
architectures (Kostik Belousov)
11. Re: Request for review/comments: 32-bit compat for non-x86
architectures (Nathan Whitehorn)
12. [head tinderbox] failure on amd64/amd64 (FreeBSD Tinderbox)
----------------------------------------------------------------------
Message: 1
Date: Wed, 10 Mar 2010 05:10:05 GMT
From: Gunther Schadow <gun...@schadow.us>
Subject: Re: amd64/144503: [boot] 8.0-RELEASE does not boot on DL585
[regression]
To: freebs...@FreeBSD.org
Message-ID: <201003100510....@freefall.freebsd.org>
The following reply was made to PR amd64/144503; it has been noted by GNATS.
From: Gunther Schadow <gun...@schadow.us>
To: bug-fo...@FreeBSD.org, gun...@schadow.us,
John Baldwin <j...@freebsd.org>
Cc:
Subject: Re: amd64/144503: [boot] 8.0-RELEASE does not boot on DL585 [regression]
Date: Tue, 09 Mar 2010 23:41:42 -0500
Thanks for looking into this.
If I set hw.pci.mcfg=0 it does not help at all.
If I also try do disable acpi and apic it makes no difference.
Always stuck at the same point:
pci0: <PCI bus> on pcib0
The upshot is that it reminds me of the good old days of trying
to install 386/bsd 0.0 or netbsd on a VAX :)
-Gunther
------------------------------
Message: 2
Date: Tue, 09 Mar 2010 22:14:27 -0600
From: Nathan Whitehorn <nwhit...@freebsd.org>
Subject: Request for review/comments: 32-bit compat for non-x86
architectures
To: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <4B971CA3...@freebsd.org>
Content-Type: text/plain; CHARSET=US-ASCII; format=flowed
The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
(pre-generated freebsd32 syscalls stuff is included, which will be done
in two steps on commit) provides groundwork for supporting 32-bit
compatibility for 64-bit MIPS and PowerPC systems. It has been tested on
amd64 and powerpc64, and compile-tested on ia64. There are two main
parts to the patch:
1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
COMPAT_LINUX32, etc. This requires updating kernel configurations, but
is less painful than filling machine-independent bits of the kernel with
#if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old name.
2) Modifications to the freebsd32 compat layer to support big-endian
architectures.
I would appreciate any comments, bugs, or test results on ia64.
-Nathan
------------------------------
Message: 3
Date: Wed, 10 Mar 2010 08:10:10 -0500
From: John Baldwin <j...@freebsd.org>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: freebs...@freebsd.org
Cc: freebsd-...@freebsd.org, Nathan Whitehorn
<nwhit...@freebsd.org>, freebs...@freebsd.org
Message-ID: <20100310081...@freebsd.org>
Content-Type: Text/Plain; charset="iso-8859-1"
On Tuesday 09 March 2010 11:14:27 pm Nathan Whitehorn wrote:
> The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
> (pre-generated freebsd32 syscalls stuff is included, which will be done
> in two steps on commit) provides groundwork for supporting 32-bit
> compatibility for 64-bit MIPS and PowerPC systems. It has been tested on
> amd64 and powerpc64, and compile-tested on ia64. There are two main
> parts to the patch:
>
> 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
> COMPAT_LINUX32, etc. This requires updating kernel configurations, but
> is less painful than filling machine-independent bits of the kernel with
> #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
> defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old name.
>
> 2) Modifications to the freebsd32 compat layer to support big-endian
> architectures.
>
> I would appreciate any comments, bugs, or test results on ia64.
This doesn't look right for non-x86 32-bit ABIs:
Index: sys/kern/imgact_elf.c
===================================================================
--- sys/kern/imgact_elf.c (revision 204681)
+++ sys/kern/imgact_elf.c (working copy)
@@ -1439,7 +1439,7 @@
ehdr->e_ident[EI_ABIVERSION] = 0;
ehdr->e_ident[EI_PAD] = 0;
ehdr->e_type = ET_CORE;
-#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
ehdr->e_machine = EM_386;
#else
ehdr->e_machine = ELF_ARCH;
It would be nice to eliminate having <compat/ia32*> includes in MI code by
instead including those headers in appropriate headers in <machine/*>. For
example, we could change <machine/reg.h> on amd64 and ia64 to include these
headers, perhaps under an #ifdef COMPAT_FREEBSD32.
Hmm, actually, I'm quite convinced now that <machine/reg.h> for ia64 and amd64
should include <compat/ia32/ia32_reg.h> in the #ifdef _KERNEL section to avoid
polluting those includes in MI code. I'm not sure what the various
<machine/fpu.h> includes are for, but fixing ia32_reg.h would be a good first
step. It would make your diffs smaller I think.
The rest of the diff looks fine to me.
--
John Baldwin
------------------------------
Message: 4
Date: Wed, 10 Mar 2010 13:50:09 GMT
From: John Baldwin <j...@freebsd.org>
Subject: Re: amd64/144503: [boot] 8.0-RELEASE does not boot on DL585
[regression]
To: freebs...@FreeBSD.org
Message-ID: <201003101350....@freefall.freebsd.org>
The following reply was made to PR amd64/144503; it has been noted by GNATS.
From: John Baldwin <j...@freebsd.org>
To: Gunther Schadow <gun...@schadow.us>
Cc: bug-fo...@freebsd.org
Subject: Re: amd64/144503: [boot] 8.0-RELEASE does not boot on DL585 [regression]
Date: Wed, 10 Mar 2010 08:43:40 -0500
On Tuesday 09 March 2010 11:41:42 pm Gunther Schadow wrote:
> Thanks for looking into this.
>
> If I set hw.pci.mcfg=0 it does not help at all.
>
> If I also try do disable acpi and apic it makes no difference.
> Always stuck at the same point:
>
> pci0: <PCI bus> on pcib0
>
> The upshot is that it reminds me of the good old days of trying
> to install 386/bsd 0.0 or netbsd on a VAX :)
Do you get any other printfs' beyond this line with boot -v or does boot -v
die sooner?
--
John Baldwin
------------------------------
Message: 5
Date: Wed, 10 Mar 2010 08:35:09 -0600
From: Nathan Whitehorn <nwhit...@freebsd.org>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: Kostik Belousov <kost...@gmail.com>
Cc: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <4B97AE1D...@freebsd.org>
Content-Type: text/plain; CHARSET=US-ASCII; format=flowed
Kostik Belousov wrote:
> On Tue, Mar 09, 2010 at 10:14:27PM -0600, Nathan Whitehorn wrote:
>
>> The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
>> (pre-generated freebsd32 syscalls stuff is included, which will be done
>> in two steps on commit) provides groundwork for supporting 32-bit
>> compatibility for 64-bit MIPS and PowerPC systems. It has been tested on
>> amd64 and powerpc64, and compile-tested on ia64. There are two main
>> parts to the patch:
>>
>> 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
>> COMPAT_LINUX32, etc. This requires updating kernel configurations, but
>> is less painful than filling machine-independent bits of the kernel with
>> #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
>> defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old name.
>>
>> 2) Modifications to the freebsd32 compat layer to support big-endian
>> architectures.
>>
>> I would appreciate any comments, bugs, or test results on ia64.
>> -Nathan
>>
>
> This fragment
> --- sys/kern/imgact_elf.c (revision 204681)
> +++ sys/kern/imgact_elf.c (working copy)
> @@ -75,7 +75,7 @@
> #include <machine/elf.h>
> #include <machine/md_var.h>
>
> -#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
> +#if (defined(__amd64__) || defined(__ia64__)) && __ELF_WORD_SIZE == 32
> #include <machine/fpu.h>
> #include <compat/ia32/ia32_reg.h>
> #endif
> probably should be changed ? How are struct reg32 for !ia32 case is
> brought into the imgact_elf ? Can it be unified for ia32 case ?
> (Similar fragment is present in sys_process.c at least).
>
For !ia32, they are brought in machine/reg.h. You can see how that works
here:
http://svn.freebsd.org/viewvc/base/projects/ppc64/sys/powerpc/include/reg.h?revision=204915&view=markup
I would be more than happy for them to be brought in the same way for
amd64 and ia64. Since John Baldwin seems to want this too, I might roll
a new version of the diff today or tomorrow that does that.
> I do not understand how +#if !defined(PAD64_REQUIRED) && defined(__powerpc__)
> etc lines are generated.
>
These end up in syscalls.master and take advantage of the syscalls
generator propagating preprocessor statements through. 32-bit powerpc
has an ABI quirk where 64-bit arguments are transmitted in "aligned"
registers, so this adds some padding to those syscalls such that this is
preserved. The !defined bit just protects against redefinition when one
of the .c files generated from syscalls.master includes one of the
header files.
> You may want to change sysent->sv_flag SV_IA32 to SV_FREEBSD32, or add
> SV_FREEBSD32. You might want to review SV_IA32 usage, if any.
We already have SV_ILP32, which is used pretty consistently for this.
The patch includes a fix for the one erroneous use in
sys/kern/kern_jail.c that I could find with grep -R SV_IA32 /sys.
-Nathan
------------------------------
Message: 6
Date: Wed, 10 Mar 2010 08:39:15 -0600
From: Nathan Whitehorn <nwhit...@freebsd.org>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: John Baldwin <j...@freebsd.org>
Cc: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <4B97AF13...@freebsd.org>
Content-Type: text/plain; CHARSET=US-ASCII; format=flowed
John Baldwin wrote:
> On Tuesday 09 March 2010 11:14:27 pm Nathan Whitehorn wrote:
>
>> The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
>> (pre-generated freebsd32 syscalls stuff is included, which will be done
>> in two steps on commit) provides groundwork for supporting 32-bit
>> compatibility for 64-bit MIPS and PowerPC systems. It has been tested on
>> amd64 and powerpc64, and compile-tested on ia64. There are two main
>> parts to the patch:
>>
>> 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
>> COMPAT_LINUX32, etc. This requires updating kernel configurations, but
>> is less painful than filling machine-independent bits of the kernel with
>> #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
>> defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old name.
>>
>> 2) Modifications to the freebsd32 compat layer to support big-endian
>> architectures.
>>
>> I would appreciate any comments, bugs, or test results on ia64.
>>
>
> This doesn't look right for non-x86 32-bit ABIs:
>
> Index: sys/kern/imgact_elf.c
> ===================================================================
> --- sys/kern/imgact_elf.c (revision 204681)
> +++ sys/kern/imgact_elf.c (working copy)
> @@ -1439,7 +1439,7 @@
> ehdr->e_ident[EI_ABIVERSION] = 0;
> ehdr->e_ident[EI_PAD] = 0;
> ehdr->e_type = ET_CORE;
> -#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
> +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
> ehdr->e_machine = EM_386;
> #else
> ehdr->e_machine = ELF_ARCH;
>
Good catch! Such are the dangers of sed. How about defining an
ELF_ARCH32 in machine/elf.h for this case?
> It would be nice to eliminate having <compat/ia32*> includes in MI code by
> instead including those headers in appropriate headers in <machine/*>. For
> example, we could change <machine/reg.h> on amd64 and ia64 to include these
> headers, perhaps under an #ifdef COMPAT_FREEBSD32.
>
> Hmm, actually, I'm quite convinced now that <machine/reg.h> for ia64 and amd64
> should include <compat/ia32/ia32_reg.h> in the #ifdef _KERNEL section to avoid
> polluting those includes in MI code. I'm not sure what the various
> <machine/fpu.h> includes are for, but fixing ia32_reg.h would be a good first
> step. It would make your diffs smaller I think.
>
This is how it works on powerpc64. I didn't modify amd64 and ia64 in
order to avoid making too many changes, but I think you're right that
this is a good idea. I'll add that to the patch when fixing the EM_386
bit you pointed out above.
> The rest of the diff looks fine to me.
>
Thanks for the comments!
-Nathan
------------------------------
Message: 7
Date: Wed, 10 Mar 2010 10:43:23 -0500
From: John Baldwin <j...@freebsd.org>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: Nathan Whitehorn <nwhit...@freebsd.org>
Cc: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <20100310104...@freebsd.org>
Content-Type: Text/Plain; charset="iso-8859-1"
On Wednesday 10 March 2010 9:39:15 am Nathan Whitehorn wrote:
> John Baldwin wrote:
> > On Tuesday 09 March 2010 11:14:27 pm Nathan Whitehorn wrote:
> >
> >> The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
> >> (pre-generated freebsd32 syscalls stuff is included, which will be done
> >> in two steps on commit) provides groundwork for supporting 32-bit
> >> compatibility for 64-bit MIPS and PowerPC systems. It has been tested on
> >> amd64 and powerpc64, and compile-tested on ia64. There are two main
> >> parts to the patch:
> >>
> >> 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
> >> COMPAT_LINUX32, etc. This requires updating kernel configurations, but
> >> is less painful than filling machine-independent bits of the kernel with
> >> #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
> >> defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old name.
> >>
> >> 2) Modifications to the freebsd32 compat layer to support big-endian
> >> architectures.
> >>
> >> I would appreciate any comments, bugs, or test results on ia64.
> >>
> >
> > This doesn't look right for non-x86 32-bit ABIs:
> >
> > Index: sys/kern/imgact_elf.c
> > ===================================================================
> > --- sys/kern/imgact_elf.c (revision 204681)
> > +++ sys/kern/imgact_elf.c (working copy)
> > @@ -1439,7 +1439,7 @@
> > ehdr->e_ident[EI_ABIVERSION] = 0;
> > ehdr->e_ident[EI_PAD] = 0;
> > ehdr->e_type = ET_CORE;
> > -#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
> > +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
> > ehdr->e_machine = EM_386;
> > #else
> > ehdr->e_machine = ELF_ARCH;
> >
> Good catch! Such are the dangers of sed. How about defining an
> ELF_ARCH32 in machine/elf.h for this case?
Yes, that sounds good.
> > It would be nice to eliminate having <compat/ia32*> includes in MI code by
> > instead including those headers in appropriate headers in <machine/*>. For
> > example, we could change <machine/reg.h> on amd64 and ia64 to include these
> > headers, perhaps under an #ifdef COMPAT_FREEBSD32.
> >
> > Hmm, actually, I'm quite convinced now that <machine/reg.h> for ia64 and amd64
> > should include <compat/ia32/ia32_reg.h> in the #ifdef _KERNEL section to avoid
> > polluting those includes in MI code. I'm not sure what the various
> > <machine/fpu.h> includes are for, but fixing ia32_reg.h would be a good first
> > step. It would make your diffs smaller I think.
> >
> This is how it works on powerpc64. I didn't modify amd64 and ia64 in
> order to avoid making too many changes, but I think you're right that
> this is a good idea. I'll add that to the patch when fixing the EM_386
> bit you pointed out above.
Ok, thanks.
--
John Baldwin
------------------------------
Message: 8
Date: Wed, 10 Mar 2010 09:55:40 -0600
From: Nathan Whitehorn <nwhit...@freebsd.org>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: John Baldwin <j...@freebsd.org>
Cc: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <4B97C0FC...@freebsd.org>
Content-Type: text/plain; CHARSET=US-ASCII; format=flowed
John Baldwin wrote:
> On Wednesday 10 March 2010 9:39:15 am Nathan Whitehorn wrote:
>
>> John Baldwin wrote:
>>
>>> On Tuesday 09 March 2010 11:14:27 pm Nathan Whitehorn wrote:
>>>
>>>
>>>> The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
>>>> (pre-generated freebsd32 syscalls stuff is included, which will be done
>>>> in two steps on commit) provides groundwork for supporting 32-bit
>>>> compatibility for 64-bit MIPS and PowerPC systems. It has been tested on
>>>> amd64 and powerpc64, and compile-tested on ia64. There are two main
>>>> parts to the patch:
>>>>
>>>> 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
>>>> COMPAT_LINUX32, etc. This requires updating kernel configurations, but
>>>> is less painful than filling machine-independent bits of the kernel with
>>>> #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
>>>> defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old name.
>>>>
>>>> 2) Modifications to the freebsd32 compat layer to support big-endian
>>>> architectures.
>>>>
>>>> I would appreciate any comments, bugs, or test results on ia64.
>>>>
>>>>
>>> This doesn't look right for non-x86 32-bit ABIs:
>>>
>>> Index: sys/kern/imgact_elf.c
>>> ===================================================================
>>> --- sys/kern/imgact_elf.c (revision 204681)
>>> +++ sys/kern/imgact_elf.c (working copy)
>>> @@ -1439,7 +1439,7 @@
>>> ehdr->e_ident[EI_ABIVERSION] = 0;
>>> ehdr->e_ident[EI_PAD] = 0;
>>> ehdr->e_type = ET_CORE;
>>> -#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
>>> +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
>>> ehdr->e_machine = EM_386;
>>> #else
>>> ehdr->e_machine = ELF_ARCH;
>>>
>>>
>> Good catch! Such are the dangers of sed. How about defining an
>> ELF_ARCH32 in machine/elf.h for this case?
>>
>
> Yes, that sounds good.
>
>
>>> It would be nice to eliminate having <compat/ia32*> includes in MI code by
>>> instead including those headers in appropriate headers in <machine/*>. For
>>> example, we could change <machine/reg.h> on amd64 and ia64 to include these
>>> headers, perhaps under an #ifdef COMPAT_FREEBSD32.
>>>
>>> Hmm, actually, I'm quite convinced now that <machine/reg.h> for ia64 and amd64
>>> should include <compat/ia32/ia32_reg.h> in the #ifdef _KERNEL section to avoid
>>> polluting those includes in MI code. I'm not sure what the various
>>> <machine/fpu.h> includes are for, but fixing ia32_reg.h would be a good first
>>> step. It would make your diffs smaller I think.
>>>
>>>
>> This is how it works on powerpc64. I didn't modify amd64 and ia64 in
>> order to avoid making too many changes, but I think you're right that
>> this is a good idea. I'll add that to the patch when fixing the EM_386
>> bit you pointed out above.
>>
>
> Ok, thanks.
>
>
I've updated the patch to incorporate these two changes, at
http://people.freebsd.org/~nwhitehorn/compat_freebsd32_2.diff. Due to
recursive inclusion issues with sys/procfs.h, it also moves prstatus32
and friends to compat/freebsd32/freebsd32.h from ia32_reg.h. They are
MI, and seems like a more appropriate place for them anyway.
-Nathan
------------------------------
Message: 9
Date: Wed, 10 Mar 2010 12:59:07 -0500
From: John Baldwin <j...@freebsd.org>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: Nathan Whitehorn <nwhit...@freebsd.org>
Cc: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <20100310125...@freebsd.org>
Content-Type: Text/Plain; charset="iso-8859-1"
On Wednesday 10 March 2010 10:55:40 am Nathan Whitehorn wrote:
> John Baldwin wrote:
> > On Wednesday 10 March 2010 9:39:15 am Nathan Whitehorn wrote:
> >
> >> John Baldwin wrote:
> >>
> >>> On Tuesday 09 March 2010 11:14:27 pm Nathan Whitehorn wrote:
> >>>
> >>>
> >>>> The patch at http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
> >>>> (pre-generated freebsd32 syscalls stuff is included, which will be done
> >>>> in two steps on commit) provides groundwork for supporting 32-bit
> >>>> compatibility for 64-bit MIPS and PowerPC systems. It has been tested on
> >>>> amd64 and powerpc64, and compile-tested on ia64. There are two main
> >>>> parts to the patch:
> >>>>
> >>>> 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
> >>>> COMPAT_LINUX32, etc. This requires updating kernel configurations, but
> >>>> is less painful than filling machine-independent bits of the kernel with
> >>>> #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
> >>>> defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old name.
> >>>>
> >>>> 2) Modifications to the freebsd32 compat layer to support big-endian
> >>>> architectures.
> >>>>
> >>>> I would appreciate any comments, bugs, or test results on ia64.
> >>>>
> >>>>
> >>> This doesn't look right for non-x86 32-bit ABIs:
> >>>
> >>> Index: sys/kern/imgact_elf.c
> >>> ===================================================================
> >>> --- sys/kern/imgact_elf.c (revision 204681)
> >>> +++ sys/kern/imgact_elf.c (working copy)
> >>> @@ -1439,7 +1439,7 @@
> >>> ehdr->e_ident[EI_ABIVERSION] = 0;
> >>> ehdr->e_ident[EI_PAD] = 0;
> >>> ehdr->e_type = ET_CORE;
> >>> -#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
> >>> +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
> >>> ehdr->e_machine = EM_386;
> >>> #else
> >>> ehdr->e_machine = ELF_ARCH;
> >>>
> >>>
> >> Good catch! Such are the dangers of sed. How about defining an
> >> ELF_ARCH32 in machine/elf.h for this case?
> >>
> >
> > Yes, that sounds good.
> >
> >
> >>> It would be nice to eliminate having <compat/ia32*> includes in MI code by
> >>> instead including those headers in appropriate headers in <machine/*>. For
> >>> example, we could change <machine/reg.h> on amd64 and ia64 to include these
> >>> headers, perhaps under an #ifdef COMPAT_FREEBSD32.
> >>>
> >>> Hmm, actually, I'm quite convinced now that <machine/reg.h> for ia64 and amd64
> >>> should include <compat/ia32/ia32_reg.h> in the #ifdef _KERNEL section to avoid
> >>> polluting those includes in MI code. I'm not sure what the various
> >>> <machine/fpu.h> includes are for, but fixing ia32_reg.h would be a good first
> >>> step. It would make your diffs smaller I think.
> >>>
> >>>
> >> This is how it works on powerpc64. I didn't modify amd64 and ia64 in
> >> order to avoid making too many changes, but I think you're right that
> >> this is a good idea. I'll add that to the patch when fixing the EM_386
> >> bit you pointed out above.
> >>
> >
> > Ok, thanks.
> >
> >
> I've updated the patch to incorporate these two changes, at
> http://people.freebsd.org/~nwhitehorn/compat_freebsd32_2.diff. Due to
> recursive inclusion issues with sys/procfs.h, it also moves prstatus32
> and friends to compat/freebsd32/freebsd32.h from ia32_reg.h. They are
> MI, and seems like a more appropriate place for them anyway.
Looks good to me.
--
John Baldwin
------------------------------
Message: 10
Date: Wed, 10 Mar 2010 22:24:58 +0200
From: Kostik Belousov <kost...@gmail.com>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: Nathan Whitehorn <nwhit...@freebsd.org>
Cc: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <2010031020...@deviant.kiev.zoral.com.ua>
Content-Type: text/plain; charset="us-ascii"
On Wed, Mar 10, 2010 at 09:55:40AM -0600, Nathan Whitehorn wrote:
> John Baldwin wrote:
> >On Wednesday 10 March 2010 9:39:15 am Nathan Whitehorn wrote:
> >
> >>John Baldwin wrote:
> >>
> >>>On Tuesday 09 March 2010 11:14:27 pm Nathan Whitehorn wrote:
> >>>
> >>>
> >>>>The patch at
> >>>>http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
> >>>>(pre-generated freebsd32 syscalls stuff is included, which will be done
> >>>>in two steps on commit) provides groundwork for supporting 32-bit
> >>>>compatibility for 64-bit MIPS and PowerPC systems. It has been tested
> >>>>on amd64 and powerpc64, and compile-tested on ia64. There are two main
> >>>>parts to the patch:
> >>>>
> >>>>1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
> >>>>COMPAT_LINUX32, etc. This requires updating kernel configurations, but
> >>>>is less painful than filling machine-independent bits of the kernel
> >>>>with #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
> >>>>defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old
> >>>>name.
> >>>>
> >>>>2) Modifications to the freebsd32 compat layer to support big-endian
> >>>>architectures.
> >>>>
> >>>>I would appreciate any comments, bugs, or test results on ia64.
> >>>>
> >>>>
> >>>This doesn't look right for non-x86 32-bit ABIs:
> >>>
> >>>Index: sys/kern/imgact_elf.c
> >>>===================================================================
> >>>--- sys/kern/imgact_elf.c (revision 204681)
> >>>+++ sys/kern/imgact_elf.c (working copy)
> >>>@@ -1439,7 +1439,7 @@
> >>> ehdr->e_ident[EI_ABIVERSION] = 0;
> >>> ehdr->e_ident[EI_PAD] = 0;
> >>> ehdr->e_type = ET_CORE;
> >>>-#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
> >>>+#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
> >>> ehdr->e_machine = EM_386;
> >>> #else
> >>> ehdr->e_machine = ELF_ARCH;
> >>>
> >>>
> >>Good catch! Such are the dangers of sed. How about defining an
> >>ELF_ARCH32 in machine/elf.h for this case?
> >>
> >
> >Yes, that sounds good.
> >
> >
> >>>It would be nice to eliminate having <compat/ia32*> includes in MI code
> >>>by instead including those headers in appropriate headers in
> >>><machine/*>. For example, we could change <machine/reg.h> on amd64 and
> >>>ia64 to include these headers, perhaps under an #ifdef COMPAT_FREEBSD32.
> >>>
> >>>Hmm, actually, I'm quite convinced now that <machine/reg.h> for ia64 and
> >>>amd64 should include <compat/ia32/ia32_reg.h> in the #ifdef _KERNEL
> >>>section to avoid polluting those includes in MI code. I'm not sure what
> >>>the various <machine/fpu.h> includes are for, but fixing ia32_reg.h
> >>>would be a good first step. It would make your diffs smaller I think.
> >>>
> >>>
> >>This is how it works on powerpc64. I didn't modify amd64 and ia64 in
> >>order to avoid making too many changes, but I think you're right that
> >>this is a good idea. I'll add that to the patch when fixing the EM_386
> >>bit you pointed out above.
> >>
> >
> >Ok, thanks.
> >
> >
> I've updated the patch to incorporate these two changes, at
> http://people.freebsd.org/~nwhitehorn/compat_freebsd32_2.diff. Due to
> recursive inclusion issues with sys/procfs.h, it also moves prstatus32
> and friends to compat/freebsd32/freebsd32.h from ia32_reg.h. They are
> MI, and seems like a more appropriate place for them anyway.
First chunk for the sys_generic.c about ibits/obits looks like a bug fix ?
If yes, it probably would make sense to commit it separately to be able
to MFC it.
The same note about chunks that remove #include <compat/ia32...>, if
possible ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-amd64/attachments/20100310/0329fdd9/attachment-0001.pgp
------------------------------
Message: 11
Date: Wed, 10 Mar 2010 14:29:47 -0600
From: Nathan Whitehorn <nwhit...@freebsd.org>
Subject: Re: Request for review/comments: 32-bit compat for non-x86
architectures
To: Kostik Belousov <kost...@gmail.com>
Cc: freebsd-...@freebsd.org, freebs...@freebsd.org,
freebs...@freebsd.org
Message-ID: <4B98013B...@freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Kostik Belousov wrote:
> On Wed, Mar 10, 2010 at 09:55:40AM -0600, Nathan Whitehorn wrote:
>
>> John Baldwin wrote:
>>
>>> On Wednesday 10 March 2010 9:39:15 am Nathan Whitehorn wrote:
>>>
>>>
>>>> John Baldwin wrote:
>>>>
>>>>
>>>>> On Tuesday 09 March 2010 11:14:27 pm Nathan Whitehorn wrote:
>>>>>
>>>>>
>>>>>
>>>>>> The patch at
>>>>>> http://people.freebsd.org/~nwhitehorn/compat_freebsd32.diff
>>>>>> (pre-generated freebsd32 syscalls stuff is included, which will be done
>>>>>> in two steps on commit) provides groundwork for supporting 32-bit
>>>>>> compatibility for 64-bit MIPS and PowerPC systems. It has been tested
>>>>>> on amd64 and powerpc64, and compile-tested on ia64. There are two main
>>>>>> parts to the patch:
>>>>>>
>>>>>> 1) COMPAT_IA32 is renamed COMPAT_FREEBSD32, in analogy to
>>>>>> COMPAT_LINUX32, etc. This requires updating kernel configurations, but
>>>>>> is less painful than filling machine-independent bits of the kernel
>>>>>> with #if defined(COMPAT_IA32) || defined(COMPAT_PPC32) ||
>>>>>> defined(COMPAT_MIPS32) || ..., and is no less descriptive than the old
>>>>>> name.
>>>>>>
>>>>>> 2) Modifications to the freebsd32 compat layer to support big-endian
>>>>>> architectures.
>>>>>>
>>>>>> I would appreciate any comments, bugs, or test results on ia64.
>>>>>>
>>>>>>
>>>>>>
>>>>> This doesn't look right for non-x86 32-bit ABIs:
>>>>>
>>>>> Index: sys/kern/imgact_elf.c
>>>>> ===================================================================
>>>>> --- sys/kern/imgact_elf.c (revision 204681)
>>>>> +++ sys/kern/imgact_elf.c (working copy)
>>>>> @@ -1439,7 +1439,7 @@
>>>>> ehdr->e_ident[EI_ABIVERSION] = 0;
>>>>> ehdr->e_ident[EI_PAD] = 0;
>>>>> ehdr->e_type = ET_CORE;
>>>>> -#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
>>>>> +#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
>>>>> ehdr->e_machine = EM_386;
>>>>> #else
>>>>> ehdr->e_machine = ELF_ARCH;
>>>>>
>>>>>
>>>>>
>>>> Good catch! Such are the dangers of sed. How about defining an
>>>> ELF_ARCH32 in machine/elf.h for this case?
>>>>
>>>>
>>> Yes, that sounds good.
>>>
>>>
>>>
>>>>> It would be nice to eliminate having <compat/ia32*> includes in MI code
>>>>> by instead including those headers in appropriate headers in
>>>>> <machine/*>. For example, we could change <machine/reg.h> on amd64 and
>>>>> ia64 to include these headers, perhaps under an #ifdef COMPAT_FREEBSD32.
>>>>>
>>>>> Hmm, actually, I'm quite convinced now that <machine/reg.h> for ia64 and
>>>>> amd64 should include <compat/ia32/ia32_reg.h> in the #ifdef _KERNEL
>>>>> section to avoid polluting those includes in MI code. I'm not sure what
>>>>> the various <machine/fpu.h> includes are for, but fixing ia32_reg.h
>>>>> would be a good first step. It would make your diffs smaller I think.
>>>>>
>>>>>
>>>>>
>>>> This is how it works on powerpc64. I didn't modify amd64 and ia64 in
>>>> order to avoid making too many changes, but I think you're right that
>>>> this is a good idea. I'll add that to the patch when fixing the EM_386
>>>> bit you pointed out above.
>>>>
>>>>
>>> Ok, thanks.
>>>
>>>
>>>
>> I've updated the patch to incorporate these two changes, at
>> http://people.freebsd.org/~nwhitehorn/compat_freebsd32_2.diff. Due to
>> recursive inclusion issues with sys/procfs.h, it also moves prstatus32
>> and friends to compat/freebsd32/freebsd32.h from ia32_reg.h. They are
>> MI, and seems like a more appropriate place for them anyway.
>>
>
> First chunk for the sys_generic.c about ibits/obits looks like a bug fix ?
> If yes, it probably would make sense to commit it separately to be able
> to MFC it.
>
> The same note about chunks that remove #include <compat/ia32...>, if
> possible ?
>
It is a bug fix, but one that only matters on big-endian systems
(swizzle_fdbits needs it defined), and so goes into the
fixes-for-big-endian bucket. Disentangling all of this would be pretty
difficult, and most of the changes are pointless without their companion
changes. Some of the big endian bits could be pulled out, I guess, but
I'm not completely sure what the point of separately MFCing them is.
------------------------------
Message: 12
Date: Thu, 11 Mar 2010 05:36:16 GMT
From: FreeBSD Tinderbox <tind...@freebsd.org>
Subject: [head tinderbox] failure on amd64/amd64
To: FreeBSD Tinderbox <tind...@freebsd.org>, <cur...@freebsd.org>,
<am...@freebsd.org>
Message-ID: <201003110536....@freebsd-current.sentex.ca>
TB --- 2010-03-11 03:50:00 - tinderbox 2.6 running on freebsd-current.sentex.ca
TB --- 2010-03-11 03:50:00 - starting HEAD tinderbox run for amd64/amd64
TB --- 2010-03-11 03:50:00 - cleaning the object tree
TB --- 2010-03-11 03:50:34 - cvsupping the source tree
TB --- 2010-03-11 03:50:34 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/amd64/amd64/supfile
TB --- 2010-03-11 03:50:49 - building world
TB --- 2010-03-11 03:50:49 - MAKEOBJDIRPREFIX=/obj
TB --- 2010-03-11 03:50:49 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2010-03-11 03:50:49 - TARGET=amd64
TB --- 2010-03-11 03:50:49 - TARGET_ARCH=amd64
TB --- 2010-03-11 03:50:49 - TZ=UTC
TB --- 2010-03-11 03:50:49 - __MAKE_CONF=/dev/null
TB --- 2010-03-11 03:50:49 - cd /src
TB --- 2010-03-11 03:50:49 - /usr/bin/make -B buildworld
>>> World build started on Thu Mar 11 03:50:54 UTC 2010
>>> Rebuilding the temporary build tree
>>> stage 1.1: legacy release compatibility shims
>>> stage 1.2: bootstrap tools
>>> stage 2.1: cleaning up the object tree
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3: cross tools
>>> stage 4.1: building includes
>>> stage 4.2: building libraries
>>> stage 4.3: make dependencies
>>> stage 4.4: building everything
>>> stage 5.1: building 32 bit shim libraries
>>> World build completed on Thu Mar 11 05:16:16 UTC 2010
TB --- 2010-03-11 05:16:16 - generating LINT kernel config
TB --- 2010-03-11 05:16:16 - cd /src/sys/amd64/conf
TB --- 2010-03-11 05:16:16 - /usr/bin/make -B LINT
TB --- 2010-03-11 05:16:16 - building LINT kernel
TB --- 2010-03-11 05:16:16 - MAKEOBJDIRPREFIX=/obj
TB --- 2010-03-11 05:16:16 - PATH=/usr/bin:/usr/sbin:/bin:/sbin
TB --- 2010-03-11 05:16:16 - TARGET=amd64
TB --- 2010-03-11 05:16:16 - TARGET_ARCH=amd64
TB --- 2010-03-11 05:16:16 - TZ=UTC
TB --- 2010-03-11 05:16:16 - __MAKE_CONF=/dev/null
TB --- 2010-03-11 05:16:16 - cd /src
TB --- 2010-03-11 05:16:16 - /usr/bin/make -B buildkernel KERNCONF=LINT
>>> Kernel build for LINT started on Thu Mar 11 05:16:16 UTC 2010
>>> stage 1: configuring the kernel
>>> stage 2.1: cleaning up the object tree
>>> stage 2.2: rebuilding the object tree
>>> stage 2.3: build tools
>>> stage 3.1: making dependencies
>>> stage 3.2: building everything
[...]
===> siba_bwn (all)
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /obj/src/sys/LINT/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -fno-omit-frame-pointer -I/obj/src/sys/LINT -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /src/sys/modules/siba_bwn/../../dev/siba/siba_core.c
cc1: warnings being treated as errors
/src/sys/modules/siba_bwn/../../dev/siba/siba_core.c: In function 'siba_dma_translation':
/src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: warning: dereferencing 'void *' pointer
/src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: error: request for member 'sd_bus' in something not a structure or union
/src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: warning: dereferencing 'void *' pointer
/src/sys/modules/siba_bwn/../../dev/siba/siba_core.c:2035: error: request for member 'sd_bus' in something not a structure or union
*** Error code 1
Stop in /src/sys/modules/siba_bwn.
*** Error code 1
Stop in /src/sys/modules.
*** Error code 1
Stop in /obj/src/sys/LINT.
*** Error code 1
Stop in /src.
*** Error code 1
Stop in /src.
TB --- 2010-03-11 05:36:16 - WARNING: /usr/bin/make returned exit code 1
TB --- 2010-03-11 05:36:16 - ERROR: failed to build lint kernel
TB --- 2010-03-11 05:36:16 - 4836.40 user 932.40 system 6376.04 real
http://tinderbox.freebsd.org/tinderbox-head-HEAD-amd64-amd64.full
------------------------------
End of freebsd-amd64 Digest, Vol 351, Issue 4
*********************************************