Commit Graph

1634 Commits

Author SHA1 Message Date
yar
736cef795a Try packet mode of INT13 on a hard disk first if not prohibited by
the flag, fall back to the old INT13/AH=02 function if that fails.
This way of operation is less likely to fail with modern BIOSes and
large disks of strange geometries.

PR:		i386/70241
Submitted by:	Valentin Nechayev <netch <@> netch.kiev.ua> (inital version)
Discussed with:	jhb (by Valentin Nechayev)
Tested on:	bochs (with EDD turned on or off by patching the BIOS), PCs
2004-08-28 08:32:23 +00:00
yar
dd8d6f138f B1FLAGS -> BOOT_BOOT1_FLAGS, which is consistent with
naming of other boot-related make vars.
2004-08-27 15:01:56 +00:00
obrien
878483bef2 In conjunction with having boot0cfg(8) default boot0 to packet mode.
Submitted by:	Tor.Egge@cvsup.no.freebsd.org
2004-08-27 00:18:03 +00:00
maxim
c29bdb1cc8 Trim EOL white spaces. 2004-08-22 08:57:05 +00:00
maxim
42b3943c2d Check a return code from read(2) correctly.
PR:		kern/70815
Submitted by:	info [at] haakh.de
2004-08-22 08:56:01 +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
kensmith
b9fe831ef7 Temporary bandaid to help sparc64 systems with ATA disks boot. Recent
changes to the ATA driver cause a kernel crash, no fault of the ATA
code.  Work is in progress to add the necessary feature to the sparc64
kernel and this commit will be backed out when it is complete.  This
bandaid is being put in mostly in the interests of getting the first
release snapshot done and out the door.

Tested on:	Ultra-10 exhibiting the insta-panic.
MFC:		Real Soon
2004-08-19 20:13:31 +00:00
grehan
1c04a15714 Remove NOMAN so loader man pages are installed.
Noticed by:	ru
2004-08-18 11:31:00 +00:00
maxim
5ea2d5f70f Bump the manpage date.
Noticed by:	ru
2004-08-18 09:39:24 +00:00
maxim
6cce53d202 Retire hw.pci.allow_unsupported_io_range.
PR:		bin/70533
Submitted by:	Gavin Atkinson
2004-08-18 09:25:55 +00:00
marius
24ad8a9842 Instead of "OpenFirmware", "openfirmware", etc. use the official spelling
"Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).

Ok'ed by:	tmm
2004-08-16 15:45:27 +00:00
marcel
fdaf05cb90 Catch up with change to <machine/pte.h>. 2004-08-10 02:08:57 +00:00
jmg
4141c80005 remove /boot/kernel from the default path.. There is already code that
will prepend the current kernel booting...  This prevents a problem of
loading /boot/kernel's modules when a different kernel has no modules,
but you left your module_load="YES" in loader.conf...

Reviewed by:	dcs (minus the help part)
2004-08-06 15:06:06 +00:00
kan
cd532d497e Move boot2 BSS zeroing into btx startup code out of boot1. boot1 does not
have clear idea on boot2 BSS size and leaves portion of it not zeroed out.
btxcsu.s is in much better position for this job.

Obtained from: DragonflyBSD (with minor adjustments)
2004-08-05 06:00:05 +00:00
grehan
bed31da747 Add PowerPC bridge instruction flag to the assembler to help out
with test code written in the loader.
2004-08-02 03:06:21 +00:00
grehan
19020b09b6 G5 support: handle the case where the OpenFirmware memory array uses
64 bits for the phys address, but only 32 for the virtual address.
2004-08-02 03:05:09 +00:00
nyan
07b5593d23 Fix new compiler error (s/bcopy/memcpy/). 2004-07-30 09:42:04 +00:00
kan
1386d0ec02 Compile boot2 with -fno-unit-at-a-time. GCCs aggressive optimization
breaks boot in spectacular ways otherwise.
2004-07-30 04:27:20 +00:00
kan
59d6b73b4b Clean up local memcpy implementation to take void * parameters. 2004-07-30 00:33:09 +00:00
ceri
4f3c9ce761 Correct a documentation bug.
Approved by:	jhb
2004-07-29 20:09:25 +00:00
ceri
461920a620 Correct typo in a comment.
Approved by:	jhb
2004-07-29 20:08:40 +00:00
kan
908c4ab709 Define our own memcpy here instead of relying on GCC to provide one. 2004-07-28 06:03:27 +00:00
marcel
e8e2b20db9 o Support the REL32LSB relocation. It's in the ELF file from which
we construct the EFI image. It doesn't seem to actually end up
   in the EFI image, AFAICT.
o  Replace .quad, .long and .short with data8, data4 and data2 resp.
   The former are gnuisms.
o  Redefine _start_plabel as a data16 with @iplt(_start) as its
   value. This is the preferred way to create user PLT entries.
2004-07-20 07:11:14 +00:00
marcel
8b3a02d853 Fix the creation of EFI images that got broken by the import of
binutils 2.15. The linker now creates a .rela.dyn section for
dynamic relocations, while our script created a .rela section.
Likewise, we copied the .rela section to the EFI image, but not
the .rela.dyn section. The fix is to rename .rela to .rela.dyn
in the linker script so that all relocations end up in the same
section again. This we copy into the EFI image.
2004-07-20 07:01:02 +00:00
tanimura
b3fe9262b8 Rename snd_pcm as sound. 2004-07-16 07:24:20 +00:00
brian
aae31dbf32 Change the following environment variables to kernel options:
bootp -> BOOTP
    bootp.nfsroot -> BOOTP_NFSROOT
    bootp.nfsv3 -> BOOTP_NFSV3
    bootp.compat -> BOOTP_COMPAT
    bootp.wired_to -> BOOTP_WIRED_TO

- i.e. back out the previous commit.  It's already possible to
pxeboot(8) with a GENERIC kernel.

Pointed out by: dwmalone
2004-07-08 22:35:36 +00:00
brian
2821a50eaa Change the following kernel options to environment variables:
BOOTP -> bootp
    BOOTP_NFSROOT -> bootp.nfsroot
    BOOTP_NFSV3 -> bootp.nfsv3
    BOOTP_COMPAT -> bootp.compat
    BOOTP_WIRED_TO -> bootp.wired_to

This lets you PXE boot with a GENERIC kernel by putting this sort of thing
in loader.conf:

    bootp="YES"
    bootp.nfsroot="YES"
    bootp.nfsv3="YES"
    bootp.wired_to="bge1"

or even setting the variables manually from the OK prompt.
2004-07-08 13:40:33 +00:00
grehan
e445d539ba Use a linker script for the loader. This avoids issues with
command-line options, such as misaligning the data segment.
Exposed by the limited PearPC OFW ELF loader, but a good thing in
general.
2004-07-08 12:52:35 +00:00
grehan
c22bebde69 Remove cache flush, 256Mb 1:1 BAT mapping, and BAT clearing. This doesn't
work on a G5 (no BAT registers) or on PearPC (dBAT3 used for mapping
the framebuffer and BATs not re-inited on OpenFirmware calls).

 It also hid a number of bugs.
2004-07-08 06:13:05 +00:00
grehan
6001ea5291 All hell breaks loose if the loader image is released before
jumping to the kernel. Another bug exposed by removing the
1:1 BAT mapping. Sparc64 doesn't do this either.

Compile tested on: panther (sparc64). Code built, but not used, on sparc64.
2004-07-08 06:09:22 +00:00
grehan
9063ace8b4 Correctly calculate size of memory to be mapped when copying. Removal
of the 256Mb 1:1 BAT mapping exposed this as copying into memory that
hadn't been claimed from OpenFirmware.

compiled-tested on: panther (sparc64). Code built, but not used, on sparc64
2004-07-08 06:06:56 +00:00
grehan
ebf9bdd548 Extract entry point from elf header before releasing the heap.
This caused a data-miss trap when the BAT init code was removed
on PPC.

Compile tested on: panther (sparc64). Code built, but not used, on sparc64.
2004-07-08 06:04:45 +00:00
ru
9f45c1d92e mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
stefanf
9dea8aeba1 Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
ru
42b6f36397 Fixed what appeared to be a hard sentence break. 2004-07-02 21:49:22 +00:00
ps
268ac8d0b8 When building a kernel or the loader, let the hostname be overridden 2004-07-01 06:40:12 +00:00
josef
6b22b66f1c Remove the entry for configuring pcm0 mixer channels.
This is accomplished via device.hints now.
2004-06-24 17:49:18 +00:00
brueffer
5775a3d418 Throw out pfsync and pflog, the modules were removed 2004-06-22 22:57:13 +00:00
jhb
030ae438f9 Update the copyright to use a 3 clause BSD license rather than one that
is less clear about allowing redistribution of modified copies.

Requested by:	Tom Cosgrove tom dot cosgrove at arches-consulting dot com
2004-06-22 21:55:22 +00:00
jhb
a2fca5d60c Remove a bogus increment of %di when scanning the list of loader paths.
%di will already point to the character after the nul char when the
'repnz scasb' terminates.

Submitted by:	Tom Cosgrove tom dot cosgrove at arches-consulting dot com
2004-06-22 21:52:20 +00:00
josef
e7c4cf7270 Document the possibility of setting default values for
mixer channels via boot loader.
2004-06-20 15:58:24 +00:00
phk
cac15e3814 Save a couple of bytes for the SIO case. 2004-06-17 12:02:25 +00:00
phk
0cf3d6f050 Fix another beak.
Seen by:	pjd
2004-06-17 11:44:05 +00:00
phk
78e719f581 Unspam sys/boot, the dev_t commit should not have touched these.
Spotted by:	peter
2004-06-16 18:21:22 +00:00
phk
7a09e3e482 My new keyboard can't spell. 2004-06-16 17:03:18 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
phk
67632d242d Premptively fix GCC3.4 issue: add break; after empty default: clauses.
PR:	65493
Submitted by:	Pawel Worach <sajd@telia.com>
2004-06-16 08:12:06 +00:00
phk
31644ac9d8 Merge boot0 and boot0sio so they behave the same. 2004-06-11 09:45:18 +00:00
phk
85f8b889c5 Some embedded platforms have no keyboard controller. Give up waiting
for it to react after a timeout.
2004-06-02 09:38:32 +00:00
njl
a26da2bf55 Use the correct location of the EBDA for searching for the RSDP.
The EBDA is the 1 KB area addressed by the 16 bit pointer at 0x40E.

Pointed out by:	robert.moore AT intel.com
2004-05-25 05:52:48 +00:00
ru
dd2f259ab8 Markup fixes. 2004-05-16 22:51:36 +00:00
cognet
fa3c563dae Try harder not to compile anything in sys/boot for arm.
I wonder how buildworld ever worked for me...
2004-05-16 00:19:12 +00:00
ru
9d75d5e3a5 Back out last revision that unnecessarily changed valid assembler
line comments and damaged the CVS history.

Prompted by:	bde, jhb
2004-05-14 20:29:30 +00:00
ru
81741e7e6d Partly back out last revision that unnecessarily changed valid
assembler line comments and damaged the CVS history.

Prompted by:	bde, jhb
2004-05-14 20:28:31 +00:00
cognet
90fc99220c Do not attempt to build anything in sys/boot for arm. 2004-05-14 13:34:53 +00:00
jdp
49e7c87fde Fix a potential stack buffer overflow on systems whose ACPI OEMID
fills its field (6 characters).  In that case the OEMID is not
null-terminated, and the sprintf that was used would copy up to the
next null byte, which could be pretty far away.
2004-05-14 01:29:21 +00:00
ru
da3845c766 Convert block comments into C-style that is understood by cpp(1).
Keep line comments in assembler style.  A few lines that match
the '^[[:space:]]+#' regexp still need to be fixed, somehow.

OK'ed by:	bde, jhb
2004-04-29 18:58:38 +00:00
nyan
3640f633e3 MFi386: revisions from 1.15 to 1.17. 2004-04-29 08:24:57 +00:00
nyan
b56709bbf0 MFi386: revisions from 1.16 to 1.18. 2004-04-29 08:24:30 +00:00
ru
d6a9edf5bf Thanks to David's patches, we can now simplify these makefiles
further, and just use PROG directly (without FILES).

Suggested by:	bde
2004-04-28 21:31:21 +00:00
ru
7285dd0c50 Properly merge boot0sio.s and boot0.s into boot0.S. 2004-04-28 21:14:40 +00:00
ru
34a1e6ae25 Switch to using C99 comments in assembler preprocessed with cpp(1). 2004-04-28 20:55:01 +00:00
ru
e8beb8e0d4 - Properly merge boot0sio.s and boot0.s into boot0.S.
boot0sio.s was repo-copied to boot0.S.

- Rename boot0ext.s to boot0ext.S, to stay consistent
  with other preprocessed asm files around here, and
  for better portability.

Repocopied by:	joe
2004-04-28 20:49:17 +00:00
ru
c09b1207a4 Temporary precaution measure until repocopy requests are
processed: don't forget to clean generated .s sources.
2004-04-28 16:16:16 +00:00
ru
7094a911cb After talking to Bruce Evans and reading more standards specs,
switch to using C99-style comments everywhere in preprocessed
assembler.  The reason is that lines starting with the regexp
'^[[:space:]]#' are treated as preprocessing directives, and
while it seems to work now with GCC, it's not necessarily has
to work.  Use C99 comments `//' for the trailing comments to
save whitespace.
2004-04-28 14:31:44 +00:00
ru
e97d62405b MFi386: Use C (and CPP) style comments for assembler-with-cpp
sources, for lines that start with a comment.
2004-04-28 10:15:31 +00:00
ru
f8aacf49b8 Use C (and CPP) style comments for assembler-with-cpp sources,
for lines that start with a comment.
2004-04-28 10:09:21 +00:00
ru
affbd94101 Use C (and CPP) style comments for assembler-with-cpp sources,
for lines that start with a comment.
2004-04-28 09:57:12 +00:00
ru
66956eb45e - Use C (and CPP) style comments for assembler-with-cpp sources,
for lines that start with a comment.
- Preserve as(1) style comments for the rest.
2004-04-28 09:49:22 +00:00
ru
ccbc6f1994 Removed now redundant CLEANFILES assignments.
Not read enough of my patch by:	obrien ;)
2004-04-27 19:45:16 +00:00
phk
0a30683aaf Change from '#' to "//" comment character to allow CPP preprocessing.
Merge boot0.s and boot0sio.s into boot0_512.s controlled by "#ifdef SIO".

Add Makefile magic to generate boot0.s and boot0sio.s from boot0_512.s.

The compile boot0 and boot0sio have unchanged MD5 checksums.
2004-04-27 19:07:35 +00:00
obrien
8d22d067c8 Use a more compact syntax for passing the "binary" options to 'ld'. 2004-04-25 20:36:44 +00:00
obrien
05ba732e14 Simplify the building of our i386 'binary' boot components by directly
producing them using 'ld' options rather than post-processing with 'objcopy'.

Idea by:	Ryan Sommers <ryans@gamersimpact.com>
2004-04-25 19:50:20 +00:00
obrien
333a9bb254 Fix a last second typo in 'vi' that caused a problem. 2004-04-20 13:34:18 +00:00
obrien
9305b3ea2a White space style cleanup. 2004-04-20 03:15:59 +00:00
obrien
53aab25bce MFp4: merge version #5 of the 2-sector boot0 from the "jhb boot" branch. 2004-04-19 19:31:48 +00:00
cperciva
70f9067e41 s/atspeaker/speaker/
cf. revision 1.2 of src/sys/modules/speaker/Makefile

PR:		conf/65195
Submitted by:	daichi
2004-04-15 12:12:15 +00:00
imp
b49b7fe799 Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 20:46:16 +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
marcel
e7ecc9ae6f To quote the submitter:
"...If "keyboard" is the selected input-device and "screen" the
output-device (both via /options) but the keyboard is unplugged,
OF automatically switches to ttya for the console, it even prints
a line telling so on "screen". Solaris respects this behaviour and
uses ttya as the console in this case and people probably expect
FreeBSD to do the same (it's also very handy to temporarily switch
consoles)..."
"...I changed the comparison of the console device with "ttya" ||
"ttyb" to "tty" because on AXe boards all 4 onboard UARTs end in
SUB-D connectors (ttya and ttyb being 16550 and ttyc and ttyd a
SAB82532) and there's no Sun keyboard connector (but PS/2). If one
plugs a serial card in a box there also can be more than just ttya
and ttyb available for a console..."

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Has no doubt that the change is correct: marcel
2004-04-04 05:24:13 +00:00
le
de80619ec3 mdoc fix: put the end-of-list macro after the last list element.
Approved by:   grog (mentor)
2004-04-03 12:14:30 +00:00
obrien
9c19d495cc Bring back jhb's two sector (1024 bytes) 'boot0' [rev 1.22] as 'boot0ext'. 2004-03-26 18:46:31 +00:00
jhb
00ea003e16 Enable splitfs in the Alpha boot loaders. 2004-03-25 20:36:57 +00:00
nyan
557a78cc43 MFi386: revision 1.29. 2004-03-14 09:43:15 +00:00
nyan
7027b3a093 MFi386: revision 1.76. 2004-03-14 09:41:57 +00:00
bde
fd86ab2df2 Fixed misspellings of 0 as NULL. 2004-03-14 05:48:04 +00:00
trhodes
dfcfecd6e4 These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.

Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.

Additional changes:
 - in_cksum.[ch]:
   * use a generic C version instead of the assembly version in the !gcc
     case (ASM code breaks with the optimizations icc does)
     -> no bad checksums with an icc compiled kernel
     Help from:		andre, grehan, das
     Stolen from: 	alpha version via ppc version
     The entire checksum code should IMHO be replaced with the DragonFly
     version (because it isn't guaranteed future revisions of gcc will
     include similar optimizations) as in:
        ---snip---
          Revision  Changes    Path
          1.12      +1 -0      src/sys/conf/files.i386
          1.4       +142 -558  src/sys/i386/i386/in_cksum.c
          1.5       +33 -69    src/sys/i386/include/in_cksum.h
          1.5       +2 -0      src/sys/netinet/igmp.c
          1.6       +0 -1      src/sys/netinet/in.h
          1.6       +2 -0      src/sys/netinet/ip_icmp.c

          1.4       +3 -4      src/contrib/ipfilter/ip_compat.h
          1.3       +1 -2      src/sbin/natd/icmp.c
          1.4       +0 -1      src/sbin/natd/natd.c
          1.48      +1 -0      src/sys/conf/files
          1.2       +0 -1      src/sys/conf/files.amd64
          1.13      +0 -1      src/sys/conf/files.i386
          1.5       +0 -1      src/sys/conf/files.pc98
          1.7       +1 -1      src/sys/contrib/ipfilter/netinet/fil.c
          1.10      +2 -3      src/sys/contrib/ipfilter/netinet/ip_compat.h
          1.10      +1 -1      src/sys/contrib/ipfilter/netinet/ip_fil.c
          1.7       +1 -1      src/sys/dev/netif/txp/if_txp.c
          1.7       +1 -1      src/sys/net/ip_mroute/ip_mroute.c
          1.7       +1 -2      src/sys/net/ipfw/ip_fw2.c
          1.6       +1 -2      src/sys/netinet/igmp.c
          1.4       +158 -116  src/sys/netinet/in_cksum.c
          1.6       +1 -1      src/sys/netinet/ip_gre.c
          1.7       +1 -2      src/sys/netinet/ip_icmp.c
          1.10      +1 -1      src/sys/netinet/ip_input.c
          1.10      +1 -2      src/sys/netinet/ip_output.c
          1.13      +1 -2      src/sys/netinet/tcp_input.c
          1.9       +1 -2      src/sys/netinet/tcp_output.c
          1.10      +1 -1      src/sys/netinet/tcp_subr.c
          1.10      +1 -1      src/sys/netinet/tcp_syncache.c
          1.9       +1 -2      src/sys/netinet/udp_usrreq.c

          1.5       +1 -2      src/sys/netinet6/ipsec.c
          1.5       +1 -2      src/sys/netproto/ipsec/ipsec.c
          1.5       +1 -1      src/sys/netproto/ipsec/ipsec_input.c
          1.4       +1 -2      src/sys/netproto/ipsec/ipsec_output.c

          and finally remove
            sys/i386/i386        in_cksum.c
            sys/i386/include     in_cksum.h
        ---snip---
 - endian.h:
   * DTRT in C++ mode
 - quad.h:
   * we don't use gcc v1 anymore, remove support for it
   Suggested by:	bde (long ago)
 - assym.h:
   * avoid zero-length arrays (remove dependency on a gcc specific
     feature)
     This change changes the contents of the object file, but as it's
     only used to generate some values for a header, and the generator
     knows how to handle this, there's no impact in the gcc case.
   Explained by:	bde
   Submitted by:	Marius Strobl <marius@alchemy.franken.de>
 - aicasm.c:
   * minor change to teach it about the way icc spells "-nostdinc"
   Not approved by:	gibbs (no reply to my mail)
 - bump __FreeBSD_version (lang/icc needs to know about the changes)

Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by:	-arch
Submitted by:	netchild
2004-03-12 21:45:33 +00:00
bde
c4ea3a2d24 Fixed a misspelling of 0 as NULL. 2004-03-11 10:09:01 +00:00
marcel
4c2f4222e3 Reset the text attributes when initializing the console. The EFI
loader typically doesn't do this so that we end up booting the
with whatever the EFI loader has set it to last.
2004-03-09 04:00:33 +00:00
des
9bdabdf198 While I'm here, add linprocfs (but not pseudofs, since it is no use on
its own)
2004-03-01 18:42:16 +00:00
des
df5a85e9ba Add acpi_video_load (default NO) in the ACPI section 2004-03-01 18:13:00 +00:00
ru
84b2428dd3 For some reason crt0.o needs to be linked first for pxeboot(8) to
work.  This is odd because loader(8) doesn't suffer from this problem.
Perhaps pxeboot bootstrap can be fixed to handle this better.
Anyway, PXE booting should work again.
2004-02-27 14:10:09 +00:00
mlaier
428f1c9a0f Tweak existing header and other build infrastructure to be able to build
pf/pflog/pfsync as modules. Do not list them in NOTES or modules/Makefile
(i.e. do not connect it to any (automatic) builds - yet).

Approved by: bms(mentor)
2004-02-26 03:53:54 +00:00
ru
7309f777b6 Re-add sio.S, and properly deal with assembler files.
Repocopied by:	joe
2004-02-17 07:13:04 +00:00
obrien
aa6fd8453d Fix the AMD64 build: this file shouldn't exist. 2004-02-16 23:47:02 +00:00
simon
725402dfa3 mdoc(7) janitor:
- Fix hard sentence breaks.
- Quote argument to the Nd macro.
- Use Pa for filenames.
2004-02-15 00:42:08 +00:00
njl
67995bef83 Fix hw.acpi.os_name by renaming it to hw.acpi.osname. The "_name" suffix
is reserved by the loader, and thus any tunable name with that suffix will
be silently discarded.

Document this in the header and man page so that other developers do not
develop so many bumps on the head after banging it against the wall.

Detective work by:	Mark Santcroos, grehan
2004-02-14 03:17:30 +00:00
nyan
bd3ac210d0 MFi386: Get rid of unnecessary use of m4(1) by using cpp(1) instead.
Repocopied by:	joe
2004-02-13 15:39:59 +00:00
nyan
a91b5512c4 MFi386: revisions 1.74 and 1.75.
- kzip(8) is long dead.
  - Clean CLEANFILES.
2004-02-13 15:26:22 +00:00
nyan
42af991cad MFi386: revision 1.20 (don't strip kgzldr.o) 2004-02-13 15:24:25 +00:00
marcel
275a1bc68b Don't create a mapfile during link. It's not needed for the build. 2004-02-13 04:45:41 +00:00
marcel
9ce72c836f o Don't build with -fpic. It's not needed and inconsistent with how
other constributions are compiled.
o  Remove powerpc specific additions to CFLAGS.
2004-02-13 04:43:41 +00:00
ru
e929b29355 Fixed the fatal bug introduced in previous commit: don't strip
kgzldr.o -- kgzipping with such a loader produces bad images.
2004-02-12 22:06:33 +00:00
ru
bf0d7ad29c Clean CLEANFILES. 2004-02-12 21:43:50 +00:00
ru
29e2565062 Tidy up makefiles.
Tested by:	marcel
2004-02-12 08:10:34 +00:00
ru
4532fb12ba kzip(8) is long dead. 2004-02-11 22:25:25 +00:00
ru
bd660fe15b Overhaul makefiles. 2004-02-11 22:01:17 +00:00
ru
55ee7cd486 _start.S -> _start.s as the latter is pure asm file.
Repocopied by:	joe
2004-02-11 21:17:04 +00:00
ru
d9a003dbc9 Get rid of unnecessary use of m4(1) by using cpp(1) instead.
(John tells me there were problems when trying this before,
but it appears to be safe these day.)

OK'ed by:	jhb
Repocopied by:	joe
2004-02-11 08:42:38 +00:00
ru
8497e02ddd Since loader(8) on SPARC64 is a pure ELF executable (as opposed
to other architectures), there is no reason not to strip(1) it.

Tested by:	kensmith
2004-02-10 22:11:36 +00:00
grehan
6b6e533f7e Loader makefile cleanup.
Submitted by:  ru
2004-02-09 21:54:54 +00:00
nyan
95fdeae578 MFi386: Factor out -nostdlib and use PROG. 2004-02-09 16:01:45 +00:00
ru
7d2a30ec45 MFi386.
- Factor out common settings and put them in an upper level Makefile.inc.
- Properly use PROG for real programs, not their products.
- Further reduce diffs to i386 versions.

Tested on:	sparc64 (panther)
2004-02-09 14:17:02 +00:00
ru
5d659b9c91 - Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib
  better, and has a notion of an "internal" program, use PROG
  where possible.  This has a good impact on the contents of
  .depend files and causes programs to be linked with cc(1).

XXX: boot2 couldn't be converted as it's actually two programs.

Tested on:	i386, amd64
2004-02-09 14:11:58 +00:00
ru
f53bd8d5bd Argh, unbreak "make depend" for AMD64.
Reported by:	kris
2004-02-07 23:30:45 +00:00
ru
cf59eef9c2 MFi386: Removed -elf and duplicate -ffreestanding. 2004-02-07 14:35:33 +00:00
ru
db4c9bf67f - Removed -elf which is not a valid gcc(1) option anymore.
- Removed -ffreestanding; it's enforced by ../Makefile.inc.
2004-02-07 14:32:06 +00:00
ru
aff53081b3 Generate .depend file. 2004-02-07 13:38:47 +00:00
nyan
a1e0ad4bf3 MFi386: Cleanups to sys/boot makefiles. 2004-02-07 12:19:44 +00:00
ru
9d856a43dc Style: use the defined() expression explicitly. 2004-02-07 11:05:10 +00:00
ru
c12bb13bb3 Untangle building of AMD64 boot code.
Tested on:	amd64 (sledge)
2004-02-07 08:10:07 +00:00
ru
21fda7ee48 First round of cleanups to sys/boot/ makefiles:
- do not use PROG for what's not a real C program,
- use sys.mk transformation rules where possible,
- only create the "machine" symlink on AMD64,
- removed MAINTAINER lines in individual makefiles,
- added the LIBSTAND defitinion to <bsd.libnames.mk>,
- somewhat better contents in .depend files.

Tested on:	i386, amd64
Prodded by:	bde
2004-02-06 21:58:32 +00:00
ru
3ef89b60eb Inherit BINDIR from a parent Makefile.inc. 2004-02-06 12:58:32 +00:00
ru
0ff02d8b33 Only include ../Makefile.inc once in loader/Makefile. 2004-02-06 12:45:27 +00:00
nyan
65ade16200 MFi386: revision 1.33
PR:	kern/62005
2004-01-28 04:15:31 +00:00
schweikh
cdb4a0e4a5 Sync with Oxford Dictionary. Style (add missing full stops) while I'm here. 2004-01-27 22:15:03 +00:00
des
8b1373b33e Rename the kern.vm.kmem.size tunable to the more logical vm.kmem_size. To
assure backward compatibility (conditional on !BURN_BRIDGES), look it up
by its old name first, and log a warning (but accept the setting) if it
was found.  If both the old and new name are defined, the new name takes
precedence.

Also export vm.kmem_size as a read-only sysctl variable; I find it hard to
tune a parameter when I don't know its default value, especially when that
default value is computed at boot time.
2004-01-27 15:59:38 +00:00
jhb
5690dee266 If a transfer to or from a floppy disk crosses a 64k boundary, we have to
use a bounce buffer for the actual transfer to avoid crossing a 64k
boundary.  To do this, we malloc a buffer twice as big as we need and then
find an aligned block within that buffer to do the transfer.  The check
to see which part of the block we use used the wrong variable for part of
the condition meaning that in certain edge cases we would ask the BIOS to
cross a 64k boundary.  The BIOS request would then fail resulting in file
transfers that just magically fail in the middle without any apparent
reason.  Specifically, my tests for the splitfs boot floppies managed to
trigger this edge case.

MFC after:	1 week
X-MFC-info:	along with fixes to libstand filesystems
2004-01-21 23:22:29 +00:00
nyan
3120ff152e PC98 uses the different frame code. 2004-01-18 04:13:27 +00:00
nyan
ab57384aff Fix to support KANA and graphics characters which code are over 0x80. 2004-01-18 04:10:45 +00:00
jhb
ee6a0c1737 - Use constant for shift when converting file length in bytes to a sector
count.
- Fix the twiddle output so that it actually spins.
- Save %cx around BIOS calls to read in sectors from the disc as at least
  one BIOS trashes %cx when called to read off of a USB CD-ROM drive.

Submitted by:	Martin Nilsson <martin@gneto.com>
MFC after:	1 week
2004-01-12 20:34:42 +00:00
scottl
74ee4557d3 Disable the APIC when selecting the 'Safe Mode' option of the loader. This
will disable both APIC interrupt routing and SMP.
2004-01-09 19:20:47 +00:00
obrien
2a49481bc7 Allow one to specify the com port settings for boot0sio. 2004-01-06 18:46:35 +00:00
obrien
84dcced1d5 Convert to __FBSDID. 2004-01-04 23:30:47 +00:00
obrien
c73a98e05a Convert to __FBSDID. 2004-01-04 23:21:18 +00:00
grehan
696ff2b7c4 - Add ':' as a separator between the OpenFirmware device space and
the file path. Commonly used on Macs e.g. "hd:9".
- Update the ofw_setcurrdev routine to match libstand setenv prototype

Not objected to by: sparc64
2003-12-21 12:38:25 +00:00
grehan
92ec82003e Make __elfN(ofw_loadfile) match parameter declaration for file_format
in boot/common/bootstrap.h. Having a 32-bit size when a 64-bit param
is declared wreaks havoc on PPC.

Not objected to by: sparc64
2003-12-21 12:27:01 +00:00
grehan
94a666f7b7 Only print out an error if returned data size is < 0. A value of 0
happens almost every time at the end of a file when using NFS.

No objection by: sparc64
2003-12-21 12:19:38 +00:00
grehan
35ca817f49 Use daddr_t instead of u_long for byte offset in strategy
routine to avoid >4G truncation on 32-bit systems.

no objection by: sparc64
2003-12-21 12:16:58 +00:00
grehan
5fe386cc27 - use correct pointer arithmetic in heapsize calculation
- handle multiple Ofw memory regions when determining mem size
- allow currdev to be set as a loader command-line option.
  parse() is used to allow future options to be processed.
2003-12-21 12:11:31 +00:00
jhb
634207c606 - Change the lookup() function to report success or failure using the carry
flag rather than explicitly halting if a lookup failed.
- Add a loop around the call to lookup() to traverse an array of
  nul-terminated strings for possible paths to the boot loader.  A double
  nul character denotes the end of the list.
- Add a new message to say that the boot failed if all of the path lookups
  for a boot loader file failed.
- Add '/boot/loader' as a second boot path.  If you build an ISO using
  risky options to mkisofs such as -U then the loader will be called
  '/boot/loader' rather than '/BOOT/LOADER;0'.  This allows cdboot to work
  with such risky ISO images.
- Bump version to 1.2 to denote added functionality.

The basic idea as well as some of the code were provided by the submitter,
but I added some extra code to use a loop rather than hard-code just 2
possible paths.

PR:		misc/43543
Submitted by:	kientzle
MFC after:	1 week
2003-12-11 22:42:50 +00:00
jhb
e5794e7451 Properly fix a typo that the previous revision made even worse. 2003-12-11 20:40:12 +00:00
jhb
9935d1f62b Fix typo in comment. 2003-12-10 19:08:09 +00:00
grehan
b3a72fb411 Enable FICL build on powerpc 2003-12-10 09:18:42 +00:00
grehan
4b8cd92555 Update libstand filesystems to be in-line with tier-1 platforms. 2003-12-10 09:17:01 +00:00
grehan
2ae731fbef - Bring Makefile up to rev with sparc64 in terms of config options and rules
- Move loader relocation up to 0x1C00000. This is in line with OSX bootx,
  and allows more space for boot-time modules/ramdisks without conflicting
  with OpenFirmware's use of RAM
2003-12-10 09:16:22 +00:00
grehan
a9f09ccdea Disable floating point on PowerPC for the ficl library. 2003-12-10 09:10:54 +00:00
grehan
47a0ac1bfe Define 'arch-powerpc' 2003-12-10 09:09:38 +00:00
grehan
a6662294bc FICL system-dependent files for powerpc. Taken from the i386 versions,
which were the most relevant.
2003-12-10 09:05:08 +00:00
marcel
bca6895fb7 Fix the build of libski now that we use the "official" MADT table
definitions. Those are slightly different than the ones we used
before ACPI-CA 20031203 got imported. No structural or functional
change.
2003-12-09 08:35:17 +00:00
obrien
6715f14a30 Sync these two files. 2003-12-09 05:40:06 +00:00
obrien
d24f4b67b9 Hook boot0sio to the build. Use 'boot0cfg -b /boot/boot0sio' to use. 2003-12-08 19:02:06 +00:00
bms
653689474e Add a serial console capable version of the FreeBSD boot manager. This has
been lying around my tree(s) for the past year or so. It could do with TLC.

Requested by:	obrien
Sponsored by:	Weyland-Yutani Corporation
2003-12-08 17:51:39 +00:00
dcs
6858333ecf With the beastie menu a problem was introduced in which selecting a
different kernel to boot with kernel="NAME" would load the kernel and
loader.conf-selected modules from /boot/NAME, but it would not change
module_path. So, for instance, the automatically loaded acpi.ko would come
from /boot/kernel/acpi.ko, *always*.

Mind you, this happened for unassisted boot. If you interrupted, typed
"unload" and then "boot NAME", it would Do The Right Thing.

The source of the problem is the double initialization with beastie's
loader.rc. One would happen inside "start", and would load the kernel. The
next one would happen later in the loader.rc script, resetting module_path.

Because module_path is set to the Right Value by the functions in support.4th
that actually load the kernel, when beastie.4th proceeded to boot
module_path would remain wrong, as the kernel was already loaded.

This can be corrected by removing either initialization, and also by changing
the command used by beastie.4th from "boot" to "boot-conf", which makes sure
you use the right kernel and modules.

I chose to remove the second initialization, since this let you interrupt
(or confirm) boot before beastie even comes up. I avoid also doing the
boot-conf change because that would simply cause the kernel and modules to
be loaded twice (in fact, that was my original patch, until, in writing this
very commit message, I saw the error of my ways).

This commit changes the semantics of module loading when using the beastie
menu. Now it does what one would expect it to, but not what it was actually
doing, so something may break for unusual setups depending on broken
behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-)

Approved by:	re (scottl)
2003-11-21 19:01:02 +00:00
jhb
a546add4a3 Update the size of the OS string table that wasn't updated in the previous
commit that removed the UNIX entry.

Submitted by:	Rudolf Cejka <cejkar@fit.vutbr.cz>
Approved by:	re (rwatson)
2003-11-20 20:28:18 +00:00
phk
6aa1ea6e61 When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
While we end up the same place, we end up with two different CS register
values after the jump and 0xf000 is compatible with the hardware reset
value.

This makes a difference if the BIOS does a near jump before a far jump.

Detective work and patch by:	 Adrian Steinmann <ast@marabu.ch>
2003-11-16 18:24:23 +00:00
nyan
58e80adfe3 MFi386: revision 1.13. 2003-11-15 12:25:47 +00:00
bde
e44f1268ea Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old
value as reserved for internal use in boot blocks, because RB_PAUSE
broke binary compatibility by usurping the RB_DUAL flag.  Probably no
one except me has boot blocks for which this matters, since most boot
blocks based on biosboot including pc98's boot2 can't boot elf kernels,
and /boot/loader doesn't properly pass flags set by the previous stage.

reboot.h:
Also mark the historical RB_PROBEKBD flag (0x80000) as reserved for
internal use in boot blocks.

boot2.c:
Added comments to inhibit usurping of other flags.

Approved by:	guido, imp
MFC after: 	1 week
2003-11-15 10:04:06 +00:00
jake
db726f026b Set RB_SERIAL in boothowto if the firmware output-device is ttya or ttyb.
This ensures that uart gets a higher console priority than syscons when
a serial console is being used.  Testing against the "console" environment
variable doesn't make sense since we only have one loader console driver.
2003-11-11 18:01:44 +00:00
bde
a1d40b05dc Include <sys/reboot.h> the definition of RB_BOOTINFO. The previous
commit broke the world because it depended on namespace pollution that
was only in my version of <machine/bootinfo.h>.  The include was removed
in rev.1.63 after the last reference to it went away in rev.1.61.
2003-11-11 06:27:34 +00:00
bde
4eec3808af Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrong
comment about this flag in rev.1.61.  It is not historical like the
comment said; it is the flag that says that most of what is laboriously
put in the bootinfo struct is actually there.  Newer kernels were
bootable by even the broken boot2 without losing anything except the
symbol table, but older kernels need at least the memory sizes.

Restoring the "|" with RB_BOOTINFO that was lost in rev.1.43 costs 5
bytes.  The fix can be done in only 4 bytes by fixing some code that
was removed in rev.1.61 (put RB_BOOTINFO back in in the initial value
of "opts" and fix RBX_MASK to not clobber it.)
2003-11-10 19:06:09 +00:00
marcel
9cbd7fa025 Implement PAL_HALT_LIGHT now that the kernel halts the processor
when idle. All we have to do is return.
2003-11-09 07:42:16 +00:00
marcel
f8d7139835 Do not strip skiload when installed. The stripped binary does not load
in the simulator.
2003-11-09 06:53:37 +00:00
jhb
e28905d4a5 Fix an incorrect quote character in an M4 test conditon. Basically, one
of the verbose print statements that BTXLDR_VERBOSE enables wasn't properly
enabled.
2003-11-06 21:33:17 +00:00
iedowse
a7ae26004a Override the root server address if an IP address is specified in
the root path. This is reported to make non-PXE netbooting, such as
is used on sparc64 systems, work correctly when the TFTP server is
not the same as the root server.

PR:		kern/57328
Submitted by:	Per Kristian Hove <Per.Hove@math.ntnu.no>
2003-11-03 19:45:05 +00:00
scottl
208696733a Directly call the 'reboot' word instead of indirectly evaluating it. 2003-10-28 17:18:42 +00:00
scottl
bf1f504459 Directly call the 'boot' word instead of indirectly evaluating it.
Submitted by: dcs
2003-10-27 16:39:49 +00:00
bde
615334a7b1 Don't repeat selected defines from ns16550.h or sioreg.h. Just
include ns16550.h.  The missing installation of ns16550.h was fixed
long ago and the misplaced defines in sioreg.h were fixed recently.
2003-09-16 11:24:23 +00:00
scottl
95f4f93f32 Apply Aleksander Fafula's crayons to the beastie. Add the this line to
/boot/loader.conf to see the pretty colors =-)

loader_color="YES"
2003-09-13 18:35:01 +00:00
obrien
ed9debd5e8 Use __FBSDID().
Also some minor style cleanups.
2003-09-08 09:11:32 +00:00
phk
fc9a441e3e Add BOOT_PXELDR_ALWAYS_SERIAL option which forces serial console. 2003-09-03 08:12:20 +00:00
obrien
062c960d1b Use __FBSDID().
Also some minor style cleanups.
2003-08-25 23:30:41 +00:00
obrien
2b8c9f2e64 Use __FBSDID().
Also some minor copyright style cleanups.
2003-08-25 23:28:32 +00:00
imp
9213e54d95 Many newer CF do not handle having the entire track read from them at
boot time.  Instead, read it a sector at a time.  While this sounds
like a significant slowdown, I've not been able to measure any
signficant difference.

Submitted by: luigi
Reviewed by: jhb, sam (both a while ago)
MFC After: 3 days
2003-08-22 01:59:28 +00:00
obrien
48df5c2fbb FICL doesn't build on PowerPC yet, so disable. 2003-08-16 02:48:20 +00:00
jhb
37641f86f1 Consistently use the BSD u_int and u_short instead of the SYSV uint and
ushort.  In most of these files, there was a mixture of both styles and
this change just makes them self-consistent.

Requested by:	bde (kern_ktrace.c)
2003-08-07 15:04:27 +00:00
njl
b6d11e962f Null terminate the OEM hint. This rids my laptop of the smiley face that
would follow the 6 valid chars of the table entry.
2003-08-07 14:53:14 +00:00
grehan
6620306b94 Fix asm string newlines to keep gcc3.3 happy. Use register prefixes
to make the asm a bit more readable.
2003-08-05 11:30:18 +00:00
marcel
108e5926e2 Don't hardcode unit 0 for the current device if we're loaded from an
EFI file system. When booting from a CD and there's already an EFI
system partition on the disk, setting the current device to unit 0
will select the harddisk. This invariably breaks installing FreeBSD
when other operating systems have been installed before.

We obviously want to do the same when we're booting over the network.
Maybe later.

Based on a patch (from memory) from: arun
2003-08-02 08:22:03 +00:00
marcel
61fdb320d8 Fix the ski loader, broken by the gcc upgrade. Update the linker
script to match the one for the EFI loader and rewrite __start()
in assembly to have gp defined without getting in the way of the
compiler.
2003-07-17 01:49:59 +00:00
marcel
492a0ca73b Have the linker script look more like the default linker script
on ia64. This fixes the breakage caused by the gcc upgrade that
resulted in a broken executable.
2003-07-17 00:32:08 +00:00
njl
17dd0864eb Add include file so this builds with new acpica
Reported by:	Kevin Oberman <oberman@es.net>
2003-07-13 22:54:53 +00:00
nyan
4521e2ba57 Fixed build error with GCC 3.3.1 2003-07-13 08:13:52 +00:00
tmm
60d66be3df NFS support should be conditional on LOADER_NFS_SUPPORT, not
LOADER_NET_SUPPORT.
2003-07-11 16:12:50 +00:00
ru
8b64e29694 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
ru
074981f0b9 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
ru
a56c4fce1e 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
brueffer
d6dcd05335 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
ru
c068a33b94 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
ru
afcf98e92a Switch to using bsd.prog.mk; this gives us back the standard
.s.o transformation rule.
2003-06-30 14:10:58 +00:00
ru
02ef41d822 MFi386: revision 1.16. 2003-06-30 00:20:28 +00:00
ru
8fec58f4cc 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
brueffer
a9748f6066 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
289e79b907 Build on amd64. Yes, I know this isn't particularly nice. 2003-06-26 03:51:57 +00:00
iedowse
1c34d301c1 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
fc203320de Remember to release the loader's heap.
Reviewed by:	tmm
2003-06-15 19:16:43 +00:00
scottl
c26dd94755 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
nyan
bb19d0fd54 Add help file for pc98. 2003-06-08 03:34:49 +00:00
nyan
0f3c3b73b2 Enable new boot menu. 2003-06-08 03:20:35 +00:00