Commit Graph

591 Commits

Author SHA1 Message Date
Jung-uk Kim
07b4d1cc39 Export SMBIOS serial numbers by default. To turn it off, use
'BOOT_HIDE_SERIAL_NUMBERS' knob.

Suggested by:	ceri
2006-03-14 19:02:00 +00:00
Jung-uk Kim
1c9e617c34 Micro-optimize invalid UUID check. 2006-03-10 23:33:27 +00:00
Jung-uk Kim
65796b26b3 - Implement serial numbers, UUID, and asset tag (turned off by default).
Use 'BOOT_SENSITIVE_INFO=YES' variable to turn them on.
- Use 'uint*_t' instead of 'u_int*_t', correct compilation warnings, and
update copyright while I am here.
2006-03-09 22:49:44 +00:00
Maxim Sobolev
e4f5866fd5 For the cases when loading bzip2-compressed kernels enabled use last
3MB of physical memory for heap instead of range between 1MB and 4MB.
This makes this feature working with PAE and amd64 kernels, which are
loaded at 2MB. Teach i386_copyin() to avoid using range allocated by
heap in such case, so that it won't trash heap in the low memory
conditions.

This should make loading bzip2-compressed kernels/modules/mfs images
generally useable, so that re@ team is welcome to evaluate merits
of using this feature in the installation CDs.

Valuable suggestions by:	jhb
2005-12-21 02:17:58 +00:00
Maxim Sobolev
f668cd5df7 If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB range to
provide enough room for decompression (up to 2.5MB is necessary). This
should be safe to do since we load i386 kernels after 8MB mark now, so
that 16MB is the minimum amount of RAM necessary to even boot FreeBSD.

This makes bzip2-support  practically useable.
2005-12-19 09:26:42 +00:00
Maxim Sobolev
915dad0e92 Long-long time ago, when the trees were large and memory expensive amount of
memory directly available to loader(8) and friends was limited to 640K on i386.
Those times have passed long time ago and now loader(8) can directly access
up to 4GB of RAM at least theoretically. At the same time, there are several
places where it's assumed that malloc() will only allocate memory within
first megabyte.

Remove that assumption by allocating appropriate bounce buffers for BIOS
calls on stack where necessary.

This allows using memory above first megabyte for heap if necessary.
2005-12-19 09:00:11 +00:00
Ruslan Ermilov
6e7a7ba194 Consistently use OPT_* macros to test/set boot options. 2005-11-03 07:35:36 +00:00
Scott Long
fe8388fec2 Add back some bits. 2005-10-30 05:41:42 +00:00
Jung-uk Kim
529bc4bf80 Export processor socket information. New environment variables are:
smbios.socket.enabled:		number of enabled sockets
smbios.socket.populated:	number of populated sockets
2005-10-18 20:03:31 +00:00
Maxim Sobolev
a9c76d92d2 Re-implement rev.1.76 with respect to the code size. 2005-10-16 20:22:36 +00:00
Maxim Sobolev
6267ee870d Backout previous commit - for some reason it overflows space constrains on
amd64. Better version will follow.
2005-10-16 19:49:44 +00:00
Maxim Sobolev
50d89fc56a Add new option `q', which makes second stage loader quiet unless autoboot
is disabled or fails.

MFC after:	1 week
2005-10-16 01:55:35 +00:00
Ruslan Ermilov
fddd9c1d2f Cause all flags passed by boot2 to set the respective loader(8)
boot_* variable.  The end effect is that all flags from boot2
are now passed to the kernel.
2005-09-22 15:14:13 +00:00
Ruslan Ermilov
4750e08f7b Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:
"boot_dfltroot", "boot_mute", and "boot_pause" respectively.
2005-09-22 15:06:58 +00:00
Ruslan Ermilov
5272ce4796 - RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000
to 0x100000 in rev. 1.67.

- NOPT wasn't updated (decremented) in previous revision.
2005-09-22 11:20:33 +00:00
Ian Dowse
4832a19173 Add a "comconsole_speed" loader variable that can be used to change
the serial console speed (i386 and amd64 only). If the previous
stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE)
then the default speed is determined from the current serial port
speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED
at compile time.

This makes it possible to set the serial port speed once in
/boot.config and the setting will propagate to boot2, loader and
the kernel serial console.
2005-08-18 01:39:43 +00:00
Ian Dowse
a00a259113 Add the ability to specify the boot2 serial console speed in
/boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
and required a few other small changes to limit the size impact.
This changes only affects boot2; there are further loader changes
to follow.
2005-08-18 00:42:45 +00:00
Suleiman Souhlal
1446d11a9b The kernel is usually at /boot/kernel/kernel nowadays.
PR:	i386/81756
Submitted by:	trasz <trasz@buziaczek.pl>
2005-08-06 00:33:42 +00:00
Jung-uk Kim
fd95fd457f Simplify SMBIOS loader variables and drop `hint.smbios.0.enabled'.
They are not real hints.

Reported by:	des
Pointed out by:	peter
Approved by:	anholt (mentor)
2005-07-27 19:11:10 +00:00
Andrey A. Chernov
63ecaee8d6 Add -mno-sse3 for prescott/nocona 2005-07-15 12:22:14 +00:00
Jung-uk Kim
3e709972e1 Scan static SMBIOS structures and export the following environment
variables to loader:

hint.smbios.0.enabled		"YES" when SMBIOS is detected

hint.smbios.0.bios.vendor	BIOS vendor
hint.smbios.0.bios.version	BIOS version
hint.smbios.0.bios.reldate	BIOS release date

hint.smbios.0.system.maker	System manufacturer
hint.smbios.0.system.product	System product name
hint.smbios.0.system.version	System version number

hint.smbios.0.planar.maker	Base board manufacturer
hint.smbios.0.planar.product	Base board product name
hint.smbios.0.planar.version	Base board version number

hint.smbios.0.chassis.maker	Enclosure manufacturer
hint.smbios.0.chassis.version	Enclosure version

These strings can be used to detect hardware quirks and to set appropriate
flags.  For example, Compaq R3000 series and some HP laptops require

	hint.atkbd.0.flags="0x9"

to boot.  See amd64/67745 for more detail.

Note: Please do not abuse this feature to resolve general problem when it
      can be fixed programmatically.  This must be used as a last resort.

PR:		kern/81449
Approved by:	anholt (mentor)
2005-07-14 19:52:22 +00:00
David E. O'Brien
659e382f5b Temperarly disable building in the bzip2 support by default so we can fit
on the i386 floppies.  Sigh, I hate floppies.
2005-06-01 15:32:57 +00:00
David E. O'Brien
264d3e6b45 Put bzip2 support on equal footing with gzip support.
Enable bzip2 support by default, set LOADER_NO_BZIP2_SUPPORT to disable it.

Pointy hat to:	sobomax
2005-05-31 21:16:50 +00:00
John Baldwin
8b7c03a7a4 - Add support to the loader for multiple consoles.
- Teach the i386 and pc98 loaders to honor multiple console requests from
  their respective boot2 binaries so that the same console(s) are used in
  both boot2 and the loader.
- Since the kernel doesn't support multiple consoles, whichever console is
  listed first is treated as the "primary" console and is passed to the
  kernel in the boot_howto flags.

PR:		kern/66425
Submitted by:	Gavin Atkinson gavin at ury dot york dot ac dot uk
MFC after:	1 week
2005-05-27 19:31:00 +00:00
John Baldwin
9389b62e52 Fix a warning by adding a missing 'const'.
MFC after:	1 week
2005-05-27 19:28:04 +00:00
John Baldwin
5b09b18204 Print out the commands from /boot.config after parsing them so that they
output is sent to the correct console(s).

PR:		kern/66425
Submitted by:	Gavin Atkinson gavin at ury dot york dot ac dot uk
MFC after:	1 week
2005-05-27 19:26:11 +00:00
Philippe Charnier
f942457007 Remove unused variables. Remove prototype for function that does not exist. 2005-05-20 13:14:18 +00:00
Ruslan Ermilov
e2bc0fb2ea Allow BOOT_BOOT0_COMCONSOLE_SPEED to be derived from BOOT_COMCONSOLE_SPEED
at compile time.
2005-04-25 17:41:35 +00:00
Garrett Wollman
98576a6485 Pass the hostname we got from DHCP to the kernel so that machines can
share a read-only NFS root.
2005-04-17 21:38:22 +00:00
Nate Lawson
2626a56934 Extend a local buffer to prevent an overflow of the XSDT address.
Submitted by:	Joerg Sonnenberger
Obtained from:	DragonflyBSD
MFC after:	1 day
2005-04-16 17:38:24 +00:00
Stefan Farfeleder
94bd92c387 Fix 'implicit int' instance. 2005-04-09 14:07:13 +00:00
David E. O'Brien
0ed36875f4 Ensure GCC does not use FP registers in integer code.
I think all we really need is -fno-sse2.
I really don't like cluttering up the compiler invocation,
but this bigger hammer will fix reported problems for now.
2005-03-15 18:43:36 +00:00
Alexander Kabaev
721d5bfe2e Allow kernels loaded by pxeboot, which was compiled with LOADER_TFTP_SUPPORT,
to stll be able to mount NFS root as prescribed by DCHP configuration. Since
pxeboot is using TFTP to get to the files, pxeboot can not rely on NFS to
provide it a root directory hande as a side effect. pxeboot has to  make RPC
mount call itself.
2005-03-12 21:26:53 +00:00
Dag-Erling Smørgrav
d04928f224 Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS). 2005-02-08 20:43:04 +00:00
Peter Edwards
5c33db12dc Only update the boot sector when there is a valid drive number provided.
(After squeezing a few more bytes out of boot0)

Discussed With: jhb, julian
PR: 66248
Submitted By: Hans Petter Selasky
MFC After: 1 week
2005-01-09 23:30:35 +00:00
Ruslan Ermilov
cbbdcac72a NOFORTH -> NO_FORTH 2004-12-21 12:32:15 +00:00
Ruslan Ermilov
83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Scott Long
05d0bf79ed Remove the last vestiges of the userconfig option. None of this actually
did anything, so this commit should be considered a NO-OP.
2004-12-01 04:59:33 +00:00
Ruslan Ermilov
ddfd677a57 Pick up loader.rc from its old home. 2004-11-29 09:31:04 +00:00
Scott Long
700f9eef96 Disable the beastie menu. It offends some and annoys everyone else, and I'm
frankly tired of the controversy.  When people ask me why FreeBSD isn't user-
friendly, I'll tell them that I tried.  RIP.
2004-11-29 01:32:10 +00:00
John Baldwin
4e38f13b5b - If the COMSPEED is set to 0, then don't try to initialize the serial port
and assume that the BIOS has set it up for us.  This allows folks with a
  serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to
  just use the existing settings.
- Purge some gratuitous cpp comments as per style(9).

Submitted by:	Danny Braniss danny at cs dot huji dot ac dot il (1)
MFC after:	1 month
2004-11-24 15:39:04 +00:00
John Baldwin
8b8d44db27 Fix comments for serial I/O function prototypes that were broken in the
assembler to cpp(1) comment conversions.  This allows btx to compile again
when BTX_SERIAL is defined.

Reported by:	Danny Braniss danny at cs dot huji dot ac dot il
MFC after:	1 month
2004-11-24 14:54:33 +00:00
Peter Wemm
cf0c439f9d Remove a pre-tier-1 kernel compatability helper. This means a 6.x loader
won't boot a pre-5.1 development amd64 kernel.  That's no big loss though.
2004-11-08 23:59:44 +00:00
Giorgos Keramidas
550b156641 Clean up the comments, rewording, adding missing punctuation
and other minor nits.

Approved by:	jhb
2004-11-06 06:13:13 +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
Hidetoshi Shimokawa
6ee737aae3 Respect RB_MULTIPLE flag. 2004-10-22 14:57:28 +00:00
Hidetoshi Shimokawa
167938e1e7 - Add FireWire subclass and OHCI interface.
- Add some PCI BIOS function calls.
	(find_devclass, read_config, write_config)
2004-10-22 14:56:23 +00:00
Ruslan Ermilov
69a02bda38 Document boot_cdrom, boot_multicons, and boot_serial.
Reduce diffs between help.common and loader(8).
Mention that boot_userconfig is currently a no-op.
2004-09-30 13:09:00 +00:00
Wes Peters
ecaf63f715 Trap invalid sector size 0 in disk probe, refusing to add such a
device to the list.  This prevents crashes on /0 errors in 'lsdev'
et al.

Reviewed-by:	jhb@
MT5 after:	RE approval
2004-09-21 06:46:44 +00:00