Commit Graph

1341 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
943be5d359 Fixed build error with GCC 3.3.1 2003-07-13 08:13:52 +00:00
Thomas Moestl
07a41f740a NFS support should be conditional on LOADER_NFS_SUPPORT, not
LOADER_NET_SUPPORT.
2003-07-11 16:12:50 +00:00
Ruslan Ermilov
ae0c4c928a Revert non-style part of the recent two deltas that dealt with
using as(1) to compile plain assembler source files; bsd.lib.mk
has been fixed (in revision 1.147).
2003-07-02 12:45:45 +00:00
Ruslan Ermilov
286bce1c85 sys/ia64/ia64/pal.s has been repocopied to pal.S.
Approved by:	marcel
Repocopied by:	joe
2003-07-02 11:53:55 +00:00
Ruslan Ermilov
d5025f3020 pal_stub.s has been repo-copied to pal_stub.S.
Approved by:	marcel
Repocopied by:	joe
2003-07-02 11:47:33 +00:00
Christian Brueffer
89a14234bd Add the beastie_disable variable which allows to turn the beastie
boot menu on and off.

Reviewed by:	scottl
2003-07-01 01:03:32 +00:00
Ruslan Ermilov
bc80c08e61 bsd.lib.mk,v 1.143 no longer uses ld(1) directly to strip
symbols from intermediate object files, so these hacks to
get AMD64 compile are no longer needed.

Tested on:	sledge.FreeBSD.org
2003-06-30 19:08:49 +00:00
Ruslan Ermilov
6c874d4fa8 Switch to using bsd.prog.mk; this gives us back the standard
.s.o transformation rule.
2003-06-30 14:10:58 +00:00
Ruslan Ermilov
c173771625 MFi386: revision 1.16. 2003-06-30 00:20:28 +00:00
Ruslan Ermilov
40205a0623 Revision 1.13, besides its useful part, replaced bsd.prog.mk by
bsd.lib.mk and thus broke the build since AFLAGS were not taken
into considered anymore, as bsd.lib.mk currently has wrong .s.o
rule that uses cc(1) instead of as(1).

Revision 1.14 reverted to using as(1), and revision 1.15 brought
AFLAGS back to the business, but revision 1.14 also broke "make
clean".

To fix this, but not break anything that was fixed in revisions
1.13-1.15, we revert mostly to revision 1.13 except for switching
back to using bsd.prog.mk.  This gives us back the default .s.o
rule from sys.mk that uses as(1), and fixes "make clean" by
restoring the full contents of OBJS.

Also fixed LDFLAGS.
2003-06-30 00:15:38 +00:00
Christian Brueffer
3db879acd2 Capitalize an occurrence of 'ficl' for consistency.
Submitted by:	Andre Guibert de Bruet <andy@siliconlandmark.com>
MFC after:	3 days
2003-06-29 20:57:55 +00:00
Peter Wemm
062b3e0c77 Build on amd64. Yes, I know this isn't particularly nice. 2003-06-26 03:51:57 +00:00
Ian Dowse
c83b0b621f When looking for the ':' separator in the root path, don't go past
the terminating '\0'. Since the initialisation of rootpath in
libstand/bootp.c may copy junk into the rest of the buffer, it was
possible for the code to find a ':' after the '\0' and do the wrong
thing.

Reviewed by:	ps
MFC after:	1 week
2003-06-16 20:48:56 +00:00
Jake Burkholder
caa4756af5 Remember to release the loader's heap.
Reviewed by:	tmm
2003-06-15 19:16:43 +00:00
Scott Long
af2aaddd7a Don't start the beastie menu if the 'beastie_disable' variable is set to
'YES'.

If the user selects to escape to the loader prompt, set 'autoboot_delay'
to 'NO' so that the prompt timer doesn't run.
2003-06-10 22:04:09 +00:00
Yoshihiro Takahashi
3889b283ef Add help file for pc98. 2003-06-08 03:34:49 +00:00
Yoshihiro Takahashi
c7fd521917 Enable new boot menu. 2003-06-08 03:20:35 +00:00
Yoshihiro Takahashi
b16ea1159d Don't load the acpi module. 2003-06-08 03:16:59 +00:00
Yoshihiro Takahashi
c2098cc1ad Set arch-pc98 env to true for pc98. 2003-06-08 03:11:16 +00:00
David E. O'Brien
9b8d527fef Add ${AFLAGS} to 'as' invocation. 2003-06-07 17:42:26 +00:00
Yoshihiro Takahashi
d83e355c40 MFi386: revisions 1.13 and 1.14. 2003-06-07 08:36:41 +00:00
Yoshihiro Takahashi
bd7cefa085 MFi386: revision 1.30. 2003-06-07 08:23:42 +00:00
David E. O'Brien
9ad6ff5596 Don't use a C compiler to assemble a pure asm file. 2003-06-07 08:03:19 +00:00
Jun Kuriyama
5b63e8fcf0 Tweak make values and targets not to build kgzldr.o at
installation stage.

Reviewed by: bde
2003-06-06 13:49:51 +00:00
David E. O'Brien
9f2636a8cf Don't use a C compiler to assemble a pure asm file. 2003-06-02 02:37:27 +00:00
David E. O'Brien
3c5dad6ef0 Accpet '1'..'5' in place of F1..F5 for serial console users.
Reviewed by:	Bruce M Simpson <bms@spc.org>
2003-06-01 20:41:04 +00:00
Scott Long
0480feef80 Man, I'm not on the ball. 4th does not need to escape '\' chars. This
should make our beloved friend look less like he has a massive head wound.
2003-05-31 16:07:00 +00:00
Scott Long
d9d27cecf8 Flag when ACPI has been disabled by the user so that sysinstall can do
something with it.
2003-05-31 11:19:11 +00:00
Scott Long
832bb1e2d0 Enable the new bootloader for i386 only. The new loader.rc is will only
be installed if an old one does not exist, i.e. only during install, not
during upgrades.

Approved by:	re
2003-05-31 05:25:18 +00:00
Scott Long
dfc36ded78 Add a new bootloader menu. Pull in screen.4th and frames.4th from the
examples directory to support it.  This is installed only on i386 for
now.  It will be enabled in a later commit.

Approved by:	re
2003-05-30 09:29:24 +00:00
Ruslan Ermilov
2f0e162dc0 Fixed the markup and wording of the kern.ipc.nsfbufs tunable.
(It does not modify NSFBUFS, but just overrides it if set.)

Approved by:	re (blanket)
2003-05-17 22:17:23 +00:00
Peter Wemm
728ec271c1 Fix a bug in the AMD64 trampoline. I misunderstood the implicit
32->64 bit zero extend.  This changes a movl to an orq.

Approved by:	re (amd64 bits)
2003-05-17 00:30:51 +00:00
Murray Stokely
a8a084fc17 Add variables for missing network drivers.
PR:		kern/51911
Submitted by:	David Yeske <dyeske@yahoo.com>
Approved by:	re
2003-05-16 04:31:00 +00:00
Peter Wemm
ab6859fd2f Fix lookup of module metadata on amd64 systems. While this is in
common code, the non-trivial part is #ifdef'ed and only executes when
loading amd64 kernels. The rest is trivial but needed for the the amd64
case. (Two variables changed from char ** to Elf_Addr).

Approved by:	re (amd64 "low-risk" stuff)
2003-05-12 05:48:09 +00:00
Peter Wemm
063107e21d Revert leftover AMD64 disable-acpi-module stuff. 2003-05-12 04:57:05 +00:00
Peter Wemm
573044a926 For amd64 kernels, repeat the 1GB mapping over the entire address space
instead of just at 0GB and 1GB marks.  This gives more flexibility for
the choice of KERNBASE.

Approved by:	re (amd64 stuff)
2003-05-11 22:42:29 +00:00
David E. O'Brien
1536224009 Since we insist on loading the POS ACPI by default, give the poor user
instructions on the main help screen for disabling it.
2003-05-05 07:33:12 +00:00
Murray Stokely
dab0c25bf9 Fix a bunch of typos and grammatical errors.
PR:		docs/40234
Submitted by:	Chris Pepper <pepper@rockefeller.edu>  (mostly)
MFC After:	3 days
2003-05-04 08:23:24 +00:00
KATO Takenori
f5a84cb224 IPLware support. The `IPLware' program assumes boot menu program
begins with the `jmp 0x2d4' near jump.
2003-05-02 09:33:12 +00:00
Yoshihiro Takahashi
492d54a592 Fix to build pc98 boot loader after support amd64. 2003-05-01 13:17:06 +00:00
Peter Wemm
ec4eecb60b Commit a missed change to keep in sync with the MI elf loader. 2003-05-01 04:39:22 +00:00
Peter Wemm
a5bd71a96d Argh. This was broken by the last-minute elf32/elf64/"elf kernel" changes. 2003-05-01 04:31:33 +00:00
Peter Wemm
2f0eeb54eb Nuke; repocopied to elf32_freebsd.c where it lives on. 2003-05-01 03:57:19 +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
Peter Wemm
5dacb0cdba We use i386 boot code on AMD64. 2003-04-30 22:13:36 +00:00
Peter Wemm
d6d3ae55c3 ACPI will always be present on AMD64 - it will never be an autodetect
module.
2003-04-30 22:02:39 +00:00
Peter Wemm
145b0eb56d Also look for an "elf64 kernel" (for sparc64) and "elf32 kernel" (for
powerpc) when building metadata.
2003-04-30 22:00:16 +00:00
Nate Lawson
51773ddf47 Support functions for the new ACPI import.
* AcpiOsDerivePciId(): finds a bus number, given the slot/func and the
    acpi parse tree.
  * AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to
    override the value for _OS.

Ideas from:	takawata, jhb
Reviewed by:	takawata, marcel
Tested on:	i386, ia64
2003-04-29 18:50:34 +00:00
Poul-Henning Kamp
f770d2d3dd Cut&Paste considered far too easy:
Don't include <sys/disklabel.h>
2003-04-16 21:09:41 +00:00
Peter Wemm
30f445e056 Zap some a.out leftovers 2003-04-06 06:28:08 +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
Marcel Moolenaar
117f919160 Remove `#ifndef lint' left behind after previous change. 2003-04-04 02:12:56 +00:00
David E. O'Brien
8368cf8f75 Use __FBSDID rather than rcsid[]. 2003-04-03 21:36:33 +00:00
Ruslan Ermilov
cf7d67b20e FreeBSD 5.0 has stopped shipping /modules 2.5 years ago. Catch
up with this further by excluding /modules from the (default)
kern.module_path.
2003-03-11 12:09:25 +00:00
Tom Rhodes
ff470880ba Fix a few spelling errors.
Submitted by:	Stefan Farfeleder <stefan@fafoe.dyndns.org> via -doc.
2003-03-07 03:24:38 +00:00
Sean Chittenden
6087c960b5 Document the tunable kern.ipc.nsfbufs in help.common and loader.8. Small
nearby grammar fixup that saves a line of display while in the loader
(help set tunables), but reuses the line for kern.ipc.nsfbufs.

Approved by:	 roam
2003-03-04 23:46:29 +00:00
Ruslan Ermilov
6de61153e8 FreeBSD 5.0 has stopped shipping /modules 2.5 years ago. Catch
up with this further by excluding /modules from the (default)
kern.module_path.
2003-03-03 22:53:35 +00:00
Ruslan Ermilov
73f643b411 Fixed sys/boot/pc98/boot2/Makefile to use kern.mk and
get rid of bsd.kern.mk completely.

OK'ed by:	bde
2003-03-02 21:18:40 +00:00
Hartmut Brandt
5dfe609dd1 Add two loader tuneables that allow one to change the maximum number of
queue items that can be allocated by netgraph and the number of free queue
items that are cached on a private list.

Netgraph places an upper limit on the number of queue items it may allocate.
When there is a large number of netgraph messages travelling through the
system (100k/sec and more) there is a high probability, that messages get
queued at the nodes and netgraph runs out of queue items. In this case the data
flow through netgraph gets blocked. The tuneable for the number of free
items lets one trade memory for performance.

The tunables are also available as read-only sysctls.

PR:		kern/47393
Reviewed by:	julian
Approved by:	jake (mentor)
2003-03-02 18:04:10 +00:00
Marcel Moolenaar
59c9bb54ee Speed up debugging in the context of unexpected traps by printing
the address of the image base of the loader. Given cr.iip, we can
use the symbol table to figure out what function caused the trap.
2003-03-01 05:18:28 +00:00
Marcel Moolenaar
884d549049 Paranoia: Don't use the length of the option string alone to
determine whether we have command line options. We expect a
valid string pointer as well.
2003-03-01 05:13:59 +00:00
Marcel Moolenaar
21c598caae Increase the block size for reading and writing from 8KB to 1MB and
introduce a preprocessor define for it. The larger block size
significantly speeds up the loading of the kernel.

Submitted by: Arun Sharma <arun.sharma@intel.com>
2003-02-26 09:13:05 +00:00
David E. O'Brien
a8896ec82d Consistently use NOFORTH to control the usage of ficl. 2003-02-26 06:18:52 +00:00
Ruslan Ermilov
e478cf0a5a Fixed CLEANFILES.
Submitted by:	cron
2003-02-25 15:41:49 +00:00
David E. O'Brien
957a6263b6 Only apply rev 1.10 (which hacks around the i386 boot2 being too big for
both ufs1 and ufs2 support) on i386.
2003-02-25 00:10:20 +00:00
Kirk McKusick
c555826bd7 Revert to old (broken for over 1.5Tb filesystems) version of cgbase
so that boot loader once again will fit.

Sponsored by:   DARPA & NAI Labs.
2003-02-24 04:57:01 +00:00
Marcel Moolenaar
344c6212b8 Simplify page alignment. 2003-02-20 06:47:54 +00:00
Benno Rice
a7308986f5 Don't bother to build ficl if NOFORTH is defined. 2003-02-13 04:35:04 +00:00
Tom Rhodes
cbe0d0f670 s/hw.pci_allow_unsupported_io_range/hw.pci.allow_unsupported_io_range/
The former was incorrect and gave an `unknown oid' error.
2003-02-08 19:39:01 +00:00
Marcel Moolenaar
dc00c828e3 Remove special casing for running in the simulator from the kernel
and instead add platform, firmware and EFI stubs to the loader.
The net effect of this change is that besides a special console and
disk driver, the kernel has no knowledge of the simulator. This has
the following advantages:
o  Simulator support is much harder to break,
o  It's easier to make use of more feature complete simulators.
   This would only need a change in the simulator specific loader,
o  Running SMP kernels within the simulator. Note that ski at this
   time does not simulate IPIs, so there's no way to start APs.

The platform, firmware and EFI stubs describe the following hardware:
o  4 CPU Itanium,
o  128 MB RAM within the 4GB address space,
o  64 MB RAM above the 4GB address space.

NOTE: The stubs in the skiloader describe a machine that should in
parts be defined by the simulator. Things like processor interrupt
block and AP wakeup vector cannot be choosen at random because they
require interpretation by the simulator. Currently the simulator is
ignorant of this.

This change introduces an unofficial SSC call SSC_SAL_SET_VECTORS
which is ignored by the simulator.

Tested with: ski (version 0.943 for linux)
2003-02-01 22:50:09 +00:00
Marcel Moolenaar
56eefde13d SSC calls use break immediate 0x80000. 0x80001 only works for
break.i. Ski is rather broken in this respect.
2003-02-01 21:38:36 +00:00
Yoshihiro Takahashi
271aee47ec MFi386: Install the "boot" image which is boot1 + boot2. 2003-01-30 14:50:25 +00:00
Poul-Henning Kamp
5d9aef3d8d 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
Poul-Henning Kamp
b04b95ab47 Build a file "boot" which consists of boot1 and boot2 concatenated.
There is little if any reason to treat the two components separately
and it will simplify disklabel(8) and libdisk if we didn't.
2003-01-26 13:33:57 +00:00
Yoshihiro Takahashi
dc5cb962f7 Use NDOSPART instead of NEXTDOSPART. 2003-01-21 13:59:53 +00:00
Yoshihiro Takahashi
5aca100a9e MFi386: revision 1.63. 2003-01-21 13:57:43 +00:00
Jake Burkholder
a438ad0718 Fix module dependency (pre)loading on sparc64 by relocating the variables
read from the raw kld files.

Submitted by:	Hartmut Brandt <brandt@fokus.gmd.de>
PR:		46870
Tested on:	alpha (obrien), i386, sparc64
2003-01-21 05:46:46 +00:00
Poul-Henning Kamp
63fc86da6f Use NEXTDOSPART instead of MAX_SLICES. 2003-01-20 11:15:12 +00:00
David E. O'Brien
90949c8331 Simplify the Makefile by just using our standard PROG variable. 2003-01-18 23:09:56 +00:00
Matthew N. Dodd
bf1446b754 Minimally document hw.syscons.sc_no_suspend_vtswitch.
Requested by:	 Nate Lawson <nate@root.org>
2003-01-15 05:26:10 +00:00
Warner Losh
b24431ad30 Save 4 more bytes by not initializing opts to 0. This moves it from
the data section to the bss section givig us initialization for free.

Noticed by: bde
2003-01-14 16:33:37 +00:00
Warner Losh
8e6206d943 Fix interactive booting:
o Revision 1.38 introduced the -n flag.  It conflicted with the
  RB_BOOTINFO flag, so was in effect always on.  Change the -n flag to
  be bit 0x1c instead of 0x1f.  This also had the consequence that a mal-formed
  /boot.config would render the system unbootable because the user was
  unable to enter anything at all on the command line.
o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit
  out and do not otherwise use it.

Reviewed by: jhb
MFC after: 3 days
2003-01-13 21:28:24 +00:00
Yoshihiro Takahashi
97a45538e4 Add SCSI MO device support.
Submitted by:	Kawanobe Koh <kawanobe@st.rim.or.jp>
2003-01-06 13:43:15 +00:00
Yoshihiro Takahashi
404a379e4a Rename the dos_partition structure for pc98 to pc98_partition. 2003-01-04 08:50:48 +00:00
David E. O'Brien
f62a945f30 RIP liloldr.
It is not complete (the LILO root= specification isn't passed to our
loader for instance), it has not been touched in over 2 years.  Linux has
moved on to GRUB, so this is OBE now.  If someone creeps up to work on it,
it could become a port.
2002-12-31 02:29:03 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
David E. O'Brien
cf47cae1f5 -mno-align-long-strings can make things smaller, so lets use it in hopes
that it does here.
2002-12-21 02:03:31 +00:00
Warner Losh
1e315c9022 Put back the casts to unsigned. While no strictly necessary for its
current uses, the name strcmp has strong connotations that shouldn't
lightly be discarded.  This doesn't cost us anything.

Submitted by: bde
2002-12-20 05:49:40 +00:00
Jake Burkholder
83110b06f8 Fix breakage from earlier inadvertant changes. 2002-12-20 04:32:10 +00:00
Jake Burkholder
7c6c018c0c Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c. 2002-12-19 19:34:59 +00:00
Marcel Moolenaar
414c998fba Add command `hcdp'. This command dumps the DIG64 HCDP table if one
exists.
2002-12-18 08:13:03 +00:00
Warner Losh
79cfd4b63b I didn't intend to delete this rm from the Makefile. It snuck in at
the last second before the commit.

# likely we can remove this hack now that gcc generates better aligned code
# in the align to word case.

Noticed by: bde
2002-12-18 07:13:53 +00:00
Warner Losh
1c584b760c Reduce diffs with Peter's expanded diffs:
1) Put back the keyboard printing printf, at the cost of 58 bytes.
2) Minor tweak to getstr at no apparent cost.
2002-12-17 22:00:06 +00:00
Warner Losh
2db4f48c6a Make both UFS1 and UFS2 fit on the same boot blocks. These are a
subset of Peter's patchs that are believed to be safe.

Makefile tweaks:
o -fomit-frame-pointer
o Change default to building both UFS1 and UFS2 bootblocks.

Lots of boot2 tweaks:
o lookup is only ever called with kname, so use it directly.
o inline memsize
o getstr are only ever called with cmd, so hardware that.
o tweaks to the parsing code to test after the conversion rather than
  before since we tested after anyways.
o eliminate support for %x in printf.
o eliminate a few bytes in printfs.
o Tweak the boot banner.
o eliminate support for wd and "  " devices (I might add wd back to
  keep bde happy).
o eliminate support for a few arguments.

This takes us from -162 bytes free to 67 bytes free.

I've tested this only on a few systems, so be careful when updating to
this change.

Submitted by: peter, imp, ian
2002-12-17 21:10:34 +00:00
David E. O'Brien
70e9a2fedd Remove unneeded casts. Add others to make WARNS=5 happy. 2002-12-15 02:15:19 +00:00
Poul-Henning Kamp
a3b5a4369c Employ the unused bytes after the disklabel in the second sector. This makes
it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the
traditional 16 sectors.

Remove assorted now unneeded hackery.

UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably
not within our reach, ever.
2002-12-14 19:44:13 +00:00
Poul-Henning Kamp
a22c4dc517 Remove unnecessary call to fsread(). 2002-12-14 19:40:35 +00:00
Poul-Henning Kamp
3429fab68d Restructure so we can compile UFS1_ONLY, UFS2_ONLY or UFS1_AND_UFS2
versions from the same basic function.
2002-12-14 19:39:44 +00:00
Poul-Henning Kamp
2bfe8dcc0a Always use the smaller GCC builtin memcpy 2002-12-14 19:15:27 +00:00
Poul-Henning Kamp
c176645976 Remove unused variable. 2002-12-14 19:09:37 +00:00