Home | History | Annotate | Download | only in boot
History log of /src/sys/arch/amiga/stand/bootblock/boot/bbstart.s
RevisionDateAuthorComments
 1.15  29-Apr-2022  rin Simplify relocation rules.

Now, both single- and triple-byte encodings in relocation table
represent addrdiff (instead of absolute file offset for the latter).

Shave off one insn for boot.amiga. Also, for elf2bb(1), relocation
overflow is mitigated and detectable at least even if inevitable
(it seems unlikely to happen although).
 1.14  29-Apr-2022  rin Fix boot.amiga when relocation table is located beyond 0x8000.

In this case, we cannot load reltab directly into %a2 by movw:

For m68k, movw is actually synonym for different instructions when
its destination is data or address register, respectively.

(1) For data register, it is for move.w, which loads source into lower
half word with upper wharf word being kept untouched.

(2) For address register, it is movea.w, which loads source with
*sign extension*.

XXX
We should really stop using movw, and use move.w or movea.w explicitly.
However, this will end up with BIG diff...

Thanks ryo@ and isaki@ for comments offlist.
 1.13  06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.12  28-Apr-2008  martin branches: 1.12.20; 1.12.22;
Remove clause 3 and 4 from TNF licenses
 1.11  26-Jan-2002  aymeric branches: 1.11.118; 1.11.120; 1.11.122;
- ANSIfy
- remove some trailing spaces/tabs
- minor style nits
 1.10  17-Dec-2001  mhitch Update amiga booter to two-stage booter.

First stage is bootxx_ffs (for ffs boot partitions) or bootxx_fd (for bootable
floppy disk). These locate, load, and execute the second stage loader boot.amiga.
The console screen is created and passed to the second stage loader.

The second stage loader uses loadfile() to load the kernel image, which can
be either a.out or ELF format, and can also be compressed. It will load a
kernel file from ffs file systems or the ustarfs used on floppy disks.
 1.9  24-Sep-2001  is branches: 1.9.4;
Put default command line into a fixed location with a known size.
This is intended to allow patching of the command line without a
compiler.
 1.8  02-Mar-2001  mhitch branches: 1.8.2; 1.8.4;
More missing register prefixes and _C_LABEL()s for ELF. Should now compile
with ELF, but still needs an "elf2bb" program.
 1.7  01-Mar-2001  is Add register prefixes.
 1.6  26-Feb-2001  is use ENTRY_NOPROFILE and _C_LABEL, where appropriate.
 1.5  16-Feb-1999  is branches: 1.5.8;
Fix Copyright dates
 1.4  16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.3  13-Nov-1998  is Simplify program structure to save a few bytes.
 1.2  21-Jan-1997  is * make object dirs work:
- move the helper programs txlt and aout2bb to the topmost directory
- build the few files from libsa in the topmost directory

* while doing this, hunted down mysterious code expansion: It seems
that ld aligns code segments differently when linking .o's directly
than when using an archive consisting of the same files. Abuse this
effect to make the bootblock even smaller. The floppy boot block
"fdboot" is now small enough to build; add it back to the Makefile.

* while being here, remove a file which was committed by mistake.
 1.1  29-Nov-1996  is branches: 1.1.1;
Initial revision
 1.1.1.1  29-Nov-1996  is First version of a NetBSD-Amiga bootblock compilable from within NetBSD,
along with toolchain enhancements.

aout2bb transforms a.out files with reloc information into bootblock format
files with a compressed relocation info.

bbstart.s relocates the bootblock using this compressed info, before jumping
to C code.

txlt changes some more of the absolute references to pc-relative ones (we know
we have a single code + data address space).

If you ever try to change this: don't even dare to change the compiler options;
they were found in weeks of trial and error as the ones producing the smallest
(not necessarily fastests) code.

installboot is just a script around dd, for now.

Some ideas by Michael Hitch, Leo Weppelman and Jason Thorpe; bugs added
by myself.
 1.5.8.1  12-Mar-2001  bouyer Sync with HEAD.
 1.8.4.2  11-Feb-2002  jdolecek Sync w/ -current.
 1.8.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.9.4.3  28-Feb-2002  nathanw Catch up to -current.
 1.9.4.2  08-Jan-2002  nathanw Catch up to -current.
 1.9.4.1  24-Sep-2001  nathanw file bbstart.s was added on branch nathanw_sa on 2002-01-08 00:23:00 +0000
 1.11.122.2  11-Aug-2010  yamt sync with head.
 1.11.122.1  16-May-2008  yamt sync with head.
 1.11.120.1  18-May-2008  yamt sync with head.
 1.11.118.1  02-Jun-2008  mjf Sync with HEAD.
 1.12.22.1  05-Mar-2011  rmind sync with head
 1.12.20.1  17-Aug-2010  uebayasi Sync with HEAD.

RSS XML Feed