[patch] teach the bootloader minor amd64 knowledge

Alexander Best alexbestms at wwu.de
Mon Mar 22 16:34:48 UTC 2010


John Baldwin schrieb am 2010-03-22:
> On Monday 22 March 2010 11:20:10 am Alexander Best wrote:
> > John Baldwin schrieb am 2010-03-22:
> > > On Monday 22 March 2010 9:50:05 am Alexander Best wrote:
> > > > hi there,

> > > > since i386 and amd64 are sharing the same bootcode the
> > > > bootloader
> > > > gets named
> > > > "FreeBSD/i386" on amd64 too. the following patch is a cosmetic
> > > > change to
> > > have
> > > > the bootloader identify itself as "FreeBSD/amd64" on amd64.

> > > > any thoughts on this one?

> > > I would not do this.  They really are the same binary.  You can
> > > take
> > > a
> > > /boot/loader built under FreeBSD/i386 and use it to load an amd64
> > > kernel and
> > > vice versa.  The one change I looked at doing a while back was
> > > renaming the
> > > i386/amd64 boot bits to identify themselves as 'FreeBSD/x86'
> > > rather
> > > than
> > > 'FreeBSD/i386'.

> > sounds nice. however that would introduce some severe
> > inconsistency, because
> > the term 'i386' is used in many places to define the x86
> > architecture (uname
> > -p/-m e.g.). also 'x86' related files/directories are called
> > 'i386'.

> > personally i'd like to see the term 'i386' completely replaced by
> > 'x86'
> > throughout the whole freebsd code.

> > if i'm not mistaken 80386 has been dropped in GENERIC in freebsd4
> > and entirely
> > in freebsd5.

> Ah, but 'x86' is commonly used now for things that are shared between
> i386
> and amd64.  See sys/x86 in HEAD, sys/arch/x86 in NetBSD, etc.  I
> think even
> Linux has an x86 tree for shared code between i386 and x86_64.

i see. i always thought x86 was used to describe the intel 32 bit architecture
in general, replacing the term i386 (which describes a specific platform
rather than an architecture/instruction set).

introducing the x86 keyword sounds like a good idea. in the future it may not
only cover the intel 32bit and 64bit architecture, but also 128bit, etc. if
intel decides to keep the instruction set and remains backward compatible that
is. ;)

-- 
Alexander Best


More information about the freebsd-hackers mailing list