Commit Graph

137 Commits

Author SHA1 Message Date
marcel
bbde8d8197 Fix getsecs(). It was not counting the seconds right. The immediate
and visible effect of the bug what that autoboot would boot a kernel
after only a couple of seconds had passed instead of waiting the
full 10 seconds it's supposed to wait by default.
Add my copyright notice, since one was missing and I reimplemented
the one and only function in this file.

MFC after: 1 week
2005-06-04 21:55:51 +00:00
marcel
ed7fa679fa Fix delay(). The processor cycle counter is a 32-bit wrapping counter.
Hence, mask off the upper 32 bits and deal with wrap-arounds.

MFC after: 1 week
2005-06-04 21:50:44 +00:00
jhb
6a48660666 Add a missing const to alpha_setcurrdev() to quiet a warning. 2005-05-31 21:23:43 +00:00
jhb
889b44a08d Change the type the buf arg to the strategy routines from void * to char *
to quiet some warnings.
2005-05-31 21:23:21 +00:00
jhb
40e54204ac Whitespace. 2005-05-31 21:22:01 +00:00
ru
bb6ad7dcac NOFORTH -> NO_FORTH 2004-12-21 12:32:15 +00:00
ru
cec60429bb Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
ru
5db2b9d5b3 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
ru
3a3e9a66ad Document MD commands. 2004-10-01 19:44:42 +00:00
marcel
cc3398a62e Part 2 of fixing the boot code: gcc 3.4 fixes.
The whole problem seems to be size. Which is odd, because it is said
that size doesn't matter. Anyway... Add -Os to strategic places in the
makefile to have the final loader be as mall as possible. This seems
to be enough to make it work. For now... I think something is more
fundamentally wrong; or something more fundamental is wrong. Potato,
potaato.
2004-08-22 06:24:59 +00:00
marcel
ac18cb2a92 Part 1 of fixing the boot code: binutils 2.15 fixes.
The binutils 2.15 assembler now automaticly and non-optionally adds
the .eh_frame section for unwind information. This section appears
to wreck havoc to the final boot code. Fix this by using a special
linker script that discards the .eh_frame sections, but is otherwise
identical to the linker internal script used for -N.

Compiler used: gcc 3.3.5
Verified with: binutils 2.14 & binutils 2.15 (stock and in-tree)
Tested with: /boot/loader & /boot/netboot
2004-08-22 00:26:01 +00:00
imp
cbc58cf8a6 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core
2004-04-05 23:41:29 +00:00
jhb
00ea003e16 Enable splitfs in the Alpha boot loaders. 2004-03-25 20:36:57 +00:00
ru
bd660fe15b Overhaul makefiles. 2004-02-11 22:01:17 +00:00
obrien
c73a98e05a Convert to __FBSDID. 2004-01-04 23:21:18 +00:00
peter
fb5fbfc750 Enable the i386 loader to load and run an amd64 kernel. If this puts
things over floppy size limits, I can exclude it for release builds or
something like that.  Most of the changes are to get the load_elf.c file
into a seperate elf32_ or elf64_ namespace so that you can have two
ELF loaders present at once.  Note that for 64 bit kernels, it actually
starts up the kernel already in 64 bit mode with paging enabled.  This
is really easy because we have a known minimum feature set.

Of note is that for amd64, we have to pass in the bios int 15 0xe821
memory map because once in long mode, you absolutely cannot make VM86
calls.  amd64 does not use 'struct bootinfo' at all.  It is a pure loader
metadata startup, just like sparc64 and powerpc.  Much of the
infrastructure to support this was adapted from sparc64.
2003-05-01 03:56:30 +00:00
phk
f946ac1010 Cut&Paste considered far too easy:
Don't include <sys/disklabel.h>
2003-04-16 21:09:41 +00:00
phk
84d6b36e30 Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>

Move i386/pc98 specific bits from <sys/reboot.h> to
<i386/include/bootinfo.h> as well.

Adjust includes in sys/boot accordingly.
2003-04-04 16:35:16 +00:00
obrien
de20c1280d Consistently use NOFORTH to control the usage of ficl. 2003-02-26 06:18:52 +00:00
phk
f48c20899a Link /boot/boot1 to the name /boot/boot to avoid per-arch naming of the
bootstrap code for disklabel using architectures.
2003-01-26 14:32:53 +00:00
jake
081cb688ba Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c. 2002-12-19 19:34:59 +00:00
jhb
a31817b547 Enable UFS2 support in boot1. Just as with sparc64 the same boot1 works
great with both UFS1 and UFS2 filesystems.

Approved by:	re
2002-11-27 20:13:15 +00:00
phk
163bc4d166 Ups, forgot to tell cvs commit about this file.
Move UFS1_ONLY to Makefiles instead of common/ufsread.c

Sponsored by:	DARPA & NAI Labs
2002-10-07 08:14:10 +00:00
peter
b6009897cf Remove a couple of __P() stragglers. 2002-06-29 02:32:34 +00:00
phk
fff890a03f #include <sys/disklabel.h> to get BBSIZE. 2002-06-11 10:19:59 +00:00
phk
6204f6b9f8 Make the alpha architecture use the common ufsread().
Submitted by:	ticso
2002-06-11 06:56:31 +00:00
trhodes
28d42899b7 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
ru
a4cd115dd3 Even more BBSIZE related breakage. 2002-05-14 13:30:45 +00:00
ru
dc9ee40833 Major cleanup of bsd.lib.mk.
Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB.
INTERNALLIB now means to build static library only and don't install
anything.  Added a NOINSTALLLIB knob for libpam/modules.  To not
build any library at all, just do not set LIB.
2002-05-13 10:53:24 +00:00
obrien
1b23a3102e Back out last commit. I expect our bsd.*.mk gods to remove the need for
defining so many extra things in addition to INTERNALLIB.  We don't like
repetitive C code and we shouldn't for make code either.
2002-05-12 13:54:42 +00:00
obrien
4da1be0803 NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using
INTERNALLIB now.
2002-05-11 18:02:33 +00:00
obrien
ce04447cdf -ffreestanding is the word.
(also resort some CFLAGS such that the more "important" value are first so
they are easier to see)
2002-05-10 09:26:35 +00:00
iedowse
9301dd7f81 Cut more than 500 bytes off the size of the alpha boot1 by adding
a simple version of bcopy() so we avoid picking up the overly-complex
implementation in libc (via libstand). This is not necessary on
-current, but RELENG_4 has apparently just exceeded the 15-sector
limit for boot1.

Reviewed by:	wilko
2002-01-18 21:54:02 +00:00
iedowse
bfc7272806 Make the alpha boot1 work on filesystems that have a block size
larger than 8k. We now use 4k buffers regardless of the filesystem
block size, so there is no longer a static limit.

Simply increasing the buffer size from 8k to 16k as done on the
i386 doesn't work on the alpha, probably because it causes us
to overshoot boot1's 48k runtime memory limit.

Tested by:	naddy
2002-01-11 16:14:34 +00:00
jhb
7ec591383b Catch the netboot version up to the main loader. This is pretty bogus.
All the alpha loaders should use the same version file.  Also, we might
should merge the various loaders (cdboot, loader, netboot) into one loader
that can boot off of disks, CD's, and network devices.  The version bump
is needed so the FICL scripts won't bomb out thinking that the netboot
binary is too old.
2002-01-11 00:09:59 +00:00
jhb
8c6afa35be - Add 'fwrite' and 'fseek' words for writing to and seeking on files.
- Change the 'fopen' keyword to accept a mode parameter.  Note that this
  will break existing 4th scripts that use fopen.  Thus, the loader
  version has been bumped and loader.4th has been changed to check for a
  sufficient version on i386 and alpha.  Be sure that you either do a full
  world build or install or full build and install of sys/boot after this
  since loader.old won't work with the new 4th files and vice versa.

PR:		kern/32389
Submitted by:	Jonathan Mini <mini@haikugeek.com>
Sponsored by:	ClickArray, Inc.
2001-12-11 00:49:34 +00:00
jhb
a3e4cf9a6b Bump the CD boot loader up to 1.1 so that the FICL upgrade a while back
will not fail thinking that the loader version is stale.  This lets us
use the Forth code on the CD now.
2001-11-21 23:16:26 +00:00
ru
62afc35080 Create backup copies using install(1). 2001-09-12 10:25:50 +00:00
bde
da7bfcdf0c Don't clobber the default for CFLAGS.
Reviewed by:		dfr
2001-08-31 11:01:20 +00:00
obrien
44bfd6c08a Style cleanup. 2001-08-10 22:31:05 +00:00
peter
9d1e0e3926 Work around what looks like a bad make(1) bug. For some reason,
make(1) wants to build loader.sym *before* the .o files.  Eliminating
one seeminly intermediate step avoids the problem.  Somehow, it seems
that variables are not getting expanded at the right time.
Any explanations would be appreciated...

Changing:
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
	${LD} ...
To:
BASEOBJS= ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o

${BASE}.sym: ${BASEOBJS}
	echo ${BASEOBJS}
	${LD} ...
.. the echo only shows LIBFICL, CRT and vers.o. ${OBJS} is not included.
2001-06-16 06:28:07 +00:00
peter
59c35987fe Nuke old gensetdefs based linker sets with extreme prejudice 2001-06-14 01:23:57 +00:00
obrien
22e09e1bf0 Revert the ugly band-aide[tm] hack of rev 1.12.
The offending loader.4th commit (rev 1.20) has been backed out.
2001-05-29 01:48:06 +00:00
obrien
01707e0035 One needs to introduce things with a `.file' directive before trying to
do a .loc on it.  BTW, the .loc needs to be in a .text section.
gas 2.11.0 catches these oversights where previous versions did not.
2001-05-28 09:52:21 +00:00
obrien
6b180e3812 grep -v offending lines from loader.4th until the master version of it
is fixed.
2001-05-28 05:18:13 +00:00
obrien
a8cd688fab Add the generated help files to CLEANDIRS.
Found by:	rm -rf /usr/obj/usr/src/sys/boot ; make ; make clean ; cvs -q up
2001-05-28 05:12:13 +00:00
gallatin
0b22a5d861 no longer needed now that we are able to build cdboot from sources again 2001-04-08 00:01:54 +00:00
gallatin
4defd5fc78 build cdboot from sources now that the cd9660 fs support works
MFC candidate
2001-04-07 23:52:31 +00:00
dfr
00380e60a1 Don't call prom_open() multiple times. This confuses some versions of SRM
and makes it impossible to boot from floppy and CD on some AlphaServer
platforms.

Detective work by: Michael Richards <michael@fastmail.ca>
2001-04-05 10:28:52 +00:00
obrien
114e64b3c4 Fix whitespace. 2001-03-04 04:38:14 +00:00