Commit Graph

57 Commits

Author SHA1 Message Date
Marcel Moolenaar
ed57871e83 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 Moolenaar
b7b527edfa 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
John Baldwin
71ed2c3c59 Add a missing const to alpha_setcurrdev() to quiet a warning. 2005-05-31 21:23:43 +00:00
John Baldwin
81c9a2099d 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
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Warner Losh
9e127f523c 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
Ruslan Ermilov
40d387429f Overhaul makefiles. 2004-02-11 22:01:17 +00:00
David E. O'Brien
bd506e2a3a Convert to __FBSDID. 2004-01-04 23:21:18 +00:00
Peter Wemm
48a0b96a50 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
Poul-Henning Kamp
197e5e73ef 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
Peter Wemm
160554fbf4 Remove a couple of __P() stragglers. 2002-06-29 02:32:34 +00:00
Ruslan Ermilov
2a53f3fb35 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
David E. O'Brien
95cfc25d0d 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
David E. O'Brien
3bf8b9cee3 NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using
INTERNALLIB now.
2002-05-11 18:02:33 +00:00
David E. O'Brien
d1bdfb40fd -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
Bruce Evans
573e0948ea Don't clobber the default for CFLAGS.
Reviewed by:		dfr
2001-08-31 11:01:20 +00:00
David E. O'Brien
dfbe5c12ae 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
Doug Rabson
46b9a4ff52 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
David E. O'Brien
768fd422b4 Fix whitespace. 2001-03-04 04:38:14 +00:00
Jeroen Ruigrok van der Werven
7c63796828 Preceed/preceeding are not english words. Use precede or preceding. 2001-02-18 10:25:42 +00:00
Matt Jacob
492ecc5fbd init booted_kernel from environment kernelname (if there) 2000-11-14 08:11:03 +00:00
Matt Jacob
178e6e0fed move init of booted_kernel to bootinfo.c 2000-11-14 08:10:15 +00:00
Doug Rabson
d2041924cd Move the call to extend_heap() from main to start so that if our BSS
expands beyond the limit we will extend the address space before trying
to zero the BSS. This should give us plenty of headroom for modest
expansion of the loader.
2000-10-25 23:36:01 +00:00
Doug Rabson
75cdadceb4 Don't build start.S as part of libalpha.a - its built specially. 2000-10-25 23:30:04 +00:00
Matt Jacob
4b3f16308b Make the stack 12K- we seem to need a bit more.
Rename 'stack' to 'stackbase' as this variable
more correctly denotes what it is.
2000-09-18 08:16:38 +00:00
John Baldwin
eb37712079 Fix the more obvious warnings to deal with my earlier warning cleanups. 2000-08-03 09:49:44 +00:00
Paul Saab
cc3d937224 Delay calling the device cleanup routines until the absolute last
moment.  We were cleaning up after PXE too early and the module
dependancy code would not be able to load any files if it needed
too.
2000-06-14 10:34:29 +00:00
Doug Rabson
e347aadd85 Record the new PALcode revision in the pcs structure after changing to
run OSF/1 PALcode.

Obtained from: NetBSD
2000-06-03 08:24:37 +00:00
Boris Popov
801e789e01 Update loader logic to distinguish modules vs. files.
Add support for module metadata. The old way of dependancy
handling will be supported for a while.

Reviewed by:	peter
2000-05-01 17:41:25 +00:00
Daniel C. Sobral
fbc9fa5059 Pass unit number to bcache_strategy(), so that the cache can be
flushed if the unit changes. Compute the absolute offset before
bcache_strategy() instead of after.

The actual fix is sligthly different for the one in the PR.

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:53:34 +00:00
Poul-Henning Kamp
7d5961670c Remove BAD144 support, it has already been disabled for some time. 1999-12-08 09:33:00 +00:00
Doug Rabson
5ed53bbd66 Allow this driver to open disks with no labels (CDROMS don't). 1999-10-12 20:04:46 +00:00
Doug Rabson
cb39a2a520 Change NetBSD/Alpha to FreeBSD/alpha. 1999-09-06 18:32:40 +00:00
Mike Smith
c7ba4828b1 Slight reorganisation of the Alpha/SRM loader build:
- Make as much of the makefile for each of the three flavours
   (disk, CDROM, net) common.
 - Special-case the libalpha startup module on its use in boot1, not
   the other way around.
 - Build the loader out of a "loader" directory

Reviewed by:	mjacob, dfr
1999-09-03 19:42:18 +00:00
Doug Rabson
74b128bad6 * Fix a stack of warnings.
* Make it possible to type a filename to boot1 so that it is possible to
  recover from fatally broken versions of /boot/loader.
* Make a start at a CD boot program (not yet functional).
1999-09-01 09:11:14 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
John Polstra
32ea96b6ae Append the flags from the "boot" command to those which came from
the SRM environment.  This makes the traditional "boot [/kernel] -s"
and similar things work on the Alpha.  Since the flags are appended,
they augment and/or override those from the SRM environment.
1999-08-14 17:06:11 +00:00
Mike Smith
73332890ea Walk around the end of all the silly guessing of device types and unit
numbers that we have been doing in the past, and read /etc/fstab off the
proposed root filesystem to determine the actual device name and vfs
type for the root filesystem.  These are then exported to the kernel
via the environment variable vfs.root.mountfrom.
1999-07-21 00:08:54 +00:00
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Daniel C. Sobral
22004b5952 Revert bootinfo to 1.4 and use a different solution to NULL m_args
instead (don't copy).
1999-03-20 14:13:09 +00:00
Doug Rabson
28add8fe61 Don't choke in MOD_ARGS() if mp->m_args is NULL. 1999-03-18 11:00:48 +00:00
Daniel C. Sobral
445a035707 Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
1999-03-08 11:05:52 +00:00
Mike Smith
631746a171 Include "bootstrap.h" to get a definition for bcache_devdata.
Submitted by:	jkh
1998-11-03 23:44:49 +00:00
Mike Smith
af1f6e0673 Implement a simple LRU block cache. By default this is initialised to 16k,
and will bypass transfers for more than 8k.  Blocks are invalidated after
2 seconds, so removable media should not confuse the cache.

The 8k threshold is a compromise; all UFS transfers performed by
libstand are 8k or less, so large file reads thrash the cache.
However many filesystem metadata operations are also performed using
8k blocks, so using a lower threshold gives poor performance.

Those of you with an eye for cache algorithms are welcome to tell me
how badly this one sucks; you can start with the 'bcachestats' command
which will print the contents of the cache and access statistics.
1998-11-02 23:28:11 +00:00
Doug Rabson
06feb69276 * Extend the memory available for the heap from 256k to 512k.
* Embed the stack into the bss section for loader and netboot.  This
  is required for netboot since otherwise the stack would be inside our
  heap.
* Install loader and netboot in /boot by default.
* Fix getbootfile so that it searches for a ',' instead of a ';'
  when terminating the filename.
1998-10-31 17:12:32 +00:00
Mike Smith
d800cebf61 Turn of disk debugging by default (suppress annoying "partition marked as
unused" diagnostic on floppies).
1998-10-16 19:26:11 +00:00
Doug Rabson
6214a95af0 Fix the bootinfo so that the right values actual make it into the kernel. 1998-10-15 21:55:58 +00:00
Peter Wemm
f03d6f87b3 Get the last used address via a more conservative method, don't depend
on the module chain being in increasing address order.
1998-10-15 17:06:36 +00:00
Peter Wemm
da6c15d597 Initial attempt to update the Alpha loader and kernel to use the machine
independent elf loader and have access to kld modules.  Jordan and I were
not sure how to create boot floppies, and the things we tried just made
SRM laugh in our faces - but it was upset at boot1 which was not touched
by these changes.  Essentially this has been untested. :-(

What this does is to steal the last three slots from the nine spare longs
in the bootinfo_v1 struct to pass the module base pointer through.

The startup code now to set up and fills in the module and environment
structures, hopefully close enough to the i386 layout to be able to use
the same kernel code.  We now pass though the updated end of the kernel
space used, rather than _end. (like the i386).

If this does not work, it needs to be beaten into shape pronto.  Otherwise
it should be backed out before 3.0.

Pre-approved in principle by: dfr
1998-10-14 09:53:25 +00:00
Dima Ruban
18d099b0c4 add <sys/linker.h> 1998-10-11 03:53:35 +00:00