Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-09-08 Thread John Baldwin
On Tuesday, September 07, 2010 11:52:36 am Marcin Cieslak wrote:
 Dnia 27.08.2010 John Baldwin j...@freebsd.org napisał/a:
  On Thursday, August 26, 2010 8:50:01 pm Xin LI wrote:
  Hi,
  
  The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
  FreeBSD/amd64 on amd64.
  
  Comments welcome!  I'll commit it in by the weekend if there is no
  objection on this.
 
  As others have noted, the 'x86' is on purpose, and I would rather it 
  continue 
  to do that rather than this change.
 
 Not sure about it, the loader and boot block are 32-bit code, aren't they?
 (That actually made me to hack some patches to make ficl 64-bit, but that's
 another story).
 
 So I think i386 is better designation for pure 32-bit code I think.

It actually is not pure 32-bit as there is a small bit of 64-bit code to
transfer from the loader to the kernel in the loader.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-09-07 Thread Marcin Cieslak
Dnia 27.08.2010 John Baldwin j...@freebsd.org napisał/a:
 On Thursday, August 26, 2010 8:50:01 pm Xin LI wrote:
 Hi,
 
 The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
 FreeBSD/amd64 on amd64.
 
 Comments welcome!  I'll commit it in by the weekend if there is no
 objection on this.

 As others have noted, the 'x86' is on purpose, and I would rather it continue 
 to do that rather than this change.

Not sure about it, the loader and boot block are 32-bit code, aren't they?
(That actually made me to hack some patches to make ficl 64-bit, but that's
another story).

So I think i386 is better designation for pure 32-bit code I think.

-- 
   Marcin Cieslak // sa...@saper.info 

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-08-31 Thread John Baldwin
On Monday, August 30, 2010 6:22:10 pm Xin LI wrote:
 On 2010/08/27 06:34, John Baldwin wrote:
  On Thursday, August 26, 2010 8:50:01 pm Xin LI wrote:
  Hi,
 
  The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
  FreeBSD/amd64 on amd64.
 
  Comments welcome!  I'll commit it in by the weekend if there is no
  objection on this.
 
  As others have noted, the 'x86' is on purpose, and I would rather it 
continue
  to do that rather than this change.
 
 What about this one?  It changes the 'NEWVERSWHAT' variables from
 (i386|${MACHINE_ARCH}) to x86 for consistency.

This looks good.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-08-30 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 2010/08/27 06:34, John Baldwin wrote:
 On Thursday, August 26, 2010 8:50:01 pm Xin LI wrote:
 Hi,

 The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
 FreeBSD/amd64 on amd64.

 Comments welcome!  I'll commit it in by the weekend if there is no
 objection on this.
 
 As others have noted, the 'x86' is on purpose, and I would rather it continue 
 to do that rather than this change.

What about this one?  It changes the 'NEWVERSWHAT' variables from
(i386|${MACHINE_ARCH}) to x86 for consistency.

Cheers,
- -- 
Xin LI delp...@delphij.nethttp://www.delphij.net/
FreeBSD - The Power to Serve!  Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJMfC8RAAoJEATO+BI/yjfB6uIH/1XHiZd0U+Hojbh1GuiVCi7X
TKQJ6j6hYC1JS0cdgDcGVgqV+12b3lsvT7uFU38sV+tSALVzPltPRexqjQQ2ltcQ
EWlXRZXas/z9K/9SeLVZvVq1ZoF8vjWHvGjMjy7MRnRsSIDy9K5QEAlWbh4SkE7p
a3whNOB2o3Gn5FxWS4j3OYVyh9CLgpaiGcPrWOWQygLmY1bwRjnpC3vbby2PD7hX
9Mw1jAYJ2vdqbshZbSb4xmitUfeF4Rm7qRBxvIU4qUsVef+xabciUx74bsZlPQyi
jfvVvuuar1ToazVxxwaXlTdD5kPCtkxDSmduCx8aPh5n2w6MdRVrYTpANlamFpM=
=XeJ4
-END PGP SIGNATURE-
Index: sys/boot/i386/zfsloader/Makefile
===
--- sys/boot/i386/zfsloader/Makefile(revision 212022)
+++ sys/boot/i386/zfsloader/Makefile(working copy)
@@ -3,7 +3,7 @@
 .PATH: ${.CURDIR}/../loader
 
 LOADER=zfsloader
-NEWVERSWHAT=   ZFS enabled bootstrap loader i386
+NEWVERSWHAT=   ZFS enabled bootstrap loader x86
 LOADER_ZFS_SUPPORT=yes
 LOADER_ONLY=   yes
 NO_MAN=yes
Index: sys/boot/i386/efi/Makefile
===
--- sys/boot/i386/efi/Makefile  (revision 212022)
+++ sys/boot/i386/efi/Makefile  (working copy)
@@ -42,7 +42,7 @@ ${PROG}:  ${LDSCRIPT}
 
 CLEANFILES=vers.c loader.efi
 
-NEWVERSWHAT=   EFI loader ${MACHINE_ARCH}
+NEWVERSWHAT=   EFI loader x86
 
 vers.c:${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
Index: sys/boot/i386/loader/Makefile
===
--- sys/boot/i386/loader/Makefile   (revision 212022)
+++ sys/boot/i386/loader/Makefile   (working copy)
@@ -6,7 +6,7 @@ MK_SSP= no
 LOADER?=   loader
 PROG=  ${LOADER}.sym
 INTERNALPROG=
-NEWVERSWHAT?=  bootstrap loader i386
+NEWVERSWHAT?=  bootstrap loader x86
 
 # architecture-specific loader code
 SRCS=  main.c conf.c vers.c
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-08-27 Thread Kostik Belousov
On Thu, Aug 26, 2010 at 05:50:01PM -0700, Xin LI wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 Hi,
 
 The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
 FreeBSD/amd64 on amd64.
 
 Comments welcome!  I'll commit it in by the weekend if there is no
 objection on this.
Change to FreeBSD/x86 was on purpose. And, since the same loader
can boot both i386 and amd64 kernels, I consider the current state
more logical.

Later, kernel reports its architecture explicitely.


pgps1JWmEnpVV.pgp
Description: PGP signature


Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-08-27 Thread Alexander Best
On Fri Aug 27 10, Kostik Belousov wrote:
 On Thu, Aug 26, 2010 at 05:50:01PM -0700, Xin LI wrote:
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA256
  
  Hi,
  
  The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
  FreeBSD/amd64 on amd64.
  
  Comments welcome!  I'll commit it in by the weekend if there is no
  objection on this.
 Change to FreeBSD/x86 was on purpose. And, since the same loader
 can boot both i386 and amd64 kernels, I consider the current state
 more logical.

yeah. i think jhb wanted this to happen. the old thread for this can be found
here [1].

there's also a PR with a patch submitted by myself which will make use of the
keyword 'x86' throughout the whole loader(8) code.

the PR number for that is 147120. would be nice if someone would commit the
patch. that is of course if in fact it has really been decided that for code
that's being shared between amd64 and i386 the keyword 'x86' shall be used
consistently.

however recently i've seen quite some commits to HEAD which make me believe
that the developers (most of all jhb) want to make heavy use of the 'x86'
keyword.

cheers.
alex

 
 Later, kernel reports its architecture explicitely.



-- 
a13x
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-08-27 Thread Alexander Best
On Fri Aug 27 10, Alexander Best wrote:
 On Fri Aug 27 10, Kostik Belousov wrote:
  On Thu, Aug 26, 2010 at 05:50:01PM -0700, Xin LI wrote:
   -BEGIN PGP SIGNED MESSAGE-
   Hash: SHA256
   
   Hi,
   
   The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
   FreeBSD/amd64 on amd64.
   
   Comments welcome!  I'll commit it in by the weekend if there is no
   objection on this.
  Change to FreeBSD/x86 was on purpose. And, since the same loader
  can boot both i386 and amd64 kernels, I consider the current state
  more logical.
 
 yeah. i think jhb wanted this to happen. the old thread for this can be found
 here [1].

oops. forgot the reference. :( it's

[1] http://www.mail-archive.com/freebsd-hack...@freebsd.org/msg70613.html

...also r205662 seems to have introduced x86. the commit message might be
interesting.

cheers.
alex

 
 there's also a PR with a patch submitted by myself which will make use of the
 keyword 'x86' throughout the whole loader(8) code.
 
 the PR number for that is 147120. would be nice if someone would commit the
 patch. that is of course if in fact it has really been decided that for code
 that's being shared between amd64 and i386 the keyword 'x86' shall be used
 consistently.
 
 however recently i've seen quite some commits to HEAD which make me believe
 that the developers (most of all jhb) want to make heavy use of the 'x86'
 keyword.
 
 cheers.
 alex
 
  
  Later, kernel reports its architecture explicitely.
 
 
 
 -- 
 a13x

-- 
a13x
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH] Use MACHINE_ARCH for boot loader

2010-08-27 Thread John Baldwin
On Thursday, August 26, 2010 8:50:01 pm Xin LI wrote:
 Hi,
 
 The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
 FreeBSD/amd64 on amd64.
 
 Comments welcome!  I'll commit it in by the weekend if there is no
 objection on this.

As others have noted, the 'x86' is on purpose, and I would rather it continue 
to do that rather than this change.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


[PATCH] Use MACHINE_ARCH for boot loader

2010-08-26 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
FreeBSD/amd64 on amd64.

Comments welcome!  I'll commit it in by the weekend if there is no
objection on this.

Cheers,
- -- 
Xin LI delp...@delphij.nethttp://www.delphij.net/
FreeBSD - The Power to Serve!  Live free or die
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.16 (FreeBSD)

iQEcBAEBCAAGBQJMdwu5AAoJEATO+BI/yjfBe+4H/i/LVqSlVP4XbQ8Xfzs2x0Xr
pv+sOtSMOKOBmtKb6KrTxyZ/GyLTAxxERlJCDLuxFZ1fVZ+E+q3BrhNRyJGcCjYx
6B3gdFwgiOlZbbFw/FGrI0W32xbeTnzd4oHqZWli4Nn6L7h+smX+O11aFaAg4ktG
y8E3ngJrG3ublbUskJ6/Vbi2xIbkTt0iPPa7jZlGGU2rTrLGTtB7E/5GNIXbiOWe
NwfKW+c2vaNCWTzwrUM/jHAkVgM3ZFXVEwx0BFGuhY4Rc2z5sGLwvpbueNT7xkTv
Y6goyuw6vwxnxA6ps2eka38Dz1JsoDNXsdFgpkgEF57c1hROSHF39lJhIfEB5t8=
=HL2J
-END PGP SIGNATURE-
Index: sys/boot/i386/boot2/boot2.c
===
--- sys/boot/i386/boot2/boot2.c (revision 211847)
+++ sys/boot/i386/boot2/boot2.c (working copy)
@@ -283,7 +283,7 @@ main(void)
 
 for (;;) {
if (!autoboot || !OPT_CHECK(RBX_QUIET))
-   printf(\nFreeBSD/x86 boot\n
+   printf(\nFreeBSD/ MACHINE_ARCH  boot\n
   Default: %u:%s(%u,%c)%s\n
   boot: ,
   dsk.drive  DRV_MASK, dev_nm[dsk.type], dsk.unit,
Index: sys/boot/i386/boot2/Makefile
===
--- sys/boot/i386/boot2/Makefile(revision 211847)
+++ sys/boot/i386/boot2/Makefile(working copy)
@@ -34,6 +34,7 @@ CFLAGS=   -Os \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
-D${BOOT2_UFS} \
-DFLAGS=${BOOT_BOOT1_FLAGS} \
+   -DMACHINE_ARCH=\${MACHINE_ARCH}\ \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
Index: sys/boot/i386/zfsboot/zfsboot.c
===
--- sys/boot/i386/zfsboot/zfsboot.c (revision 211847)
+++ sys/boot/i386/zfsboot/zfsboot.c (working copy)
@@ -731,7 +731,7 @@ main(void)
 
 for (;;) {
if (!autoboot || !OPT_CHECK(RBX_QUIET))
-   printf(\nFreeBSD/x86 boot\n
+   printf(\nFreeBSD/ MACHINE_ARCH  boot\n
   Default: %s:%s\n
   boot: ,
   spa-spa_name, kname);
Index: sys/boot/i386/zfsboot/Makefile
===
--- sys/boot/i386/zfsboot/Makefile  (revision 211847)
+++ sys/boot/i386/zfsboot/Makefile  (working copy)
@@ -26,6 +26,7 @@ CFLAGS=   -Os -g \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
-DBOOT2 \
-DFLAGS=${BOOT_BOOT1_FLAGS} \
+   -DMACHINE_ARCH=\${MACHINE_ARCH}\ \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
Index: sys/boot/i386/zfsloader/Makefile
===
--- sys/boot/i386/zfsloader/Makefile(revision 211847)
+++ sys/boot/i386/zfsloader/Makefile(working copy)
@@ -3,7 +3,7 @@
 .PATH: ${.CURDIR}/../loader
 
 LOADER=zfsloader
-NEWVERSWHAT=   ZFS enabled bootstrap loader i386
+NEWVERSWHAT=   ZFS enabled bootstrap loader ${MACHINE_ARCH}
 LOADER_ZFS_SUPPORT=yes
 LOADER_ONLY=   yes
 NO_MAN=yes
Index: sys/boot/i386/loader/Makefile
===
--- sys/boot/i386/loader/Makefile   (revision 211847)
+++ sys/boot/i386/loader/Makefile   (working copy)
@@ -6,7 +6,7 @@ MK_SSP= no
 LOADER?=   loader
 PROG=  ${LOADER}.sym
 INTERNALPROG=
-NEWVERSWHAT?=  bootstrap loader i386
+NEWVERSWHAT?=  bootstrap loader ${MACHINE_ARCH}
 
 # architecture-specific loader code
 SRCS=  main.c conf.c vers.c
Index: sys/boot/i386/gptboot/gptboot.c
===
--- sys/boot/i386/gptboot/gptboot.c (revision 211847)
+++ sys/boot/i386/gptboot/gptboot.c (working copy)
@@ -281,7 +281,7 @@ main(void)
 
 for (;;) {
if (!autoboot || !OPT_CHECK(RBX_QUIET))
-   printf(\nFreeBSD/x86 boot\n
+   printf(\nFreeBSD/ MACHINE_ARCH  boot\n
   Default: %u:%s(%up%u)%s\n
   boot: ,
   dsk.drive  DRV_MASK, dev_nm[dsk.type], dsk.unit,
Index: sys/boot/i386/gptboot/Makefile
===
--- sys/boot/i386/gptboot/Makefile  (revision 211847)
+++ sys/boot/i386/gptboot/Makefile  (working copy)
@@ -27,6 +27,7 @@ CFLAGS=   -Os \
-mrtd \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
-D${GPTBOOT_UFS} \
+   -DMACHINE_ARCH=\${MACHINE_ARCH}\ \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED}