Commit Graph

2046 Commits

Author SHA1 Message Date
Marcel Moolenaar
aa08c7e56e Make this compile on EFI32. The EFI_PHYSICAL_ADDRESS type is always
64-bit, even when sizeof(void *) is 32-bit.
2006-11-03 04:19:31 +00:00
Marcel Moolenaar
11f8548a0d Properly calculate the checksum of the APIC table. 2006-11-03 04:04:19 +00:00
Ruslan Ermilov
000a0f2a71 Unbreak compile with ELF_VERBOSE defined, and fix format warnings. 2006-11-02 17:52:43 +00:00
Ruslan Ermilov
593bbd2195 Revert the last change. Masking only 2 MSBs of the virtual address
to get the physical address doesn't work for all values of KVA_PAGES,
while masking 8 MSBs works for all values of KVA_PAGES that are
multiple of 4 for non-PAE and 8 for PAE.  (This leaves us limited
with 12MB for non-PAE kernels and 14MB for PAE kernels.)

To get things right, we'd need to subtract the KERNBASE from the
virtual address (but KERNBASE is not easy to figure out from here),
or have physical addresses set properly in the ELF headers.

Discussed with:	jhb
2006-11-02 17:28:38 +00:00
Marcel Moolenaar
6576695766 Sync the EFI headers with version 1.10.14.62 of the Intel sample EFI
implementation. This re-introduces C99 style comments that previously
were replaced by original C comments.
2006-11-02 02:42:48 +00:00
Marcel Moolenaar
932d8c46a2 Extend struct devdesc with a unit field, called d_unit. Promote the
device (kind) specific unit field to the common field. This change
allows a future version of libefi to work without requiring anything
more than what is defined in struct devdesc and as such makes it
possible to compile said version of libefi for different platforms
without requiring that those platforms have identical derivatives
of struct devdesc.
2006-11-02 01:23:18 +00:00
Marcel Moolenaar
5cae408f81 Don't unconditionally compile-in the bcache code. It's only used on
i386/amd64 and pc98. Remove useless calls to bcache_init() from the
ia64 and sparc64 loaders, as well as from the OFW common code.
2006-11-02 00:26:45 +00:00
Marcel Moolenaar
ac2bbfc8cf o Make sure to clear f->f_devdata if d_dev->dv_open() fails. It
would otherwise cause devclose() to free() the memory again.
o  Refactor devopen() so that it's more readable.
2006-11-02 00:02:22 +00:00
Ruslan Ermilov
da6d4298b7 Because the BTX mini-kernel now uses flat memory mode and clients
are no longer limited to a virtual address space of 16 megabytes,
only mask high two bits of a virtual address.  This allows to load
larger kernels (up to 1 gigabyte).  Not masking addresses at all
was a bad idea on machines with less than >3G of memory -- kernels
are linked at 0xc0xxxxxx, and that would attempt to load a kernel
at above 3G.  By masking only two highest bits we stay within the
safe limits while still allowing to boot larger kernels.

(This is a safer reimplmentation of sys/boot/i386/boot2/boot.2.c
rev. 1.71.)

Prodded by:	jhb
Tested by:	nyan (pc98)
2006-10-29 14:50:58 +00:00
Ruslan Ermilov
50159fa216 Adopt comments borrowed from aout_freebsd.c. 2006-10-26 20:04:22 +00:00
Ruslan Ermilov
5a20bc0d54 Restore support for -c and -d that were treacherously murdered in
rev. 1.58.  (This only costs us four bytes.)

Prodded by:	bde
MFC after:	3 days
2006-10-26 19:41:02 +00:00
Ruslan Ermilov
5098c00abe Back out rev. 1.71 as it breaks directly loading (i386) kernels.
OK'ed by:	jhb
PR:		i386/96430, i386/104709
MFC after:	3 days
2006-10-26 19:15:54 +00:00
Warner Losh
ecaaf14497 Don't descend into at91 until we sort out the boot loader issues more generally 2006-10-23 00:05:28 +00:00
Warner Losh
ea8c4b451e MFp4: default to not loading the fpga 2006-10-21 22:51:21 +00:00
Warner Losh
7a7404e61a MFp4: Update to smaller code footprint. 2006-10-21 22:44:26 +00:00
Warner Losh
5c58ee12d5 MFp4: Move to smaller code footprint. 2006-10-21 22:43:39 +00:00
Warner Losh
9c99b493ea MFp4: Move to smaller code. This was somehow forgotten before. 2006-10-21 22:43:07 +00:00
Warner Losh
f8b97a442a There's no fpga.c, so omit it. 2006-10-20 16:57:30 +00:00
Warner Losh
184ed5f988 MFp4:
Massive update.  The highlights:
	o dramatically cut memory usage by writing better, less intertwingled
	  code.
	o implement booting off mmc/sd cards (sd only tested one at the moment)
	o start to split out board specific stuff for boot2.
2006-10-20 09:12:05 +00:00
Ruslan Ermilov
675e8ac08c Replace a rarely used "depuration" with "debugging".
PR:		docs/85127
Submitted by:	Gary W. Swearingen (partially)
MFC after:	3 days
2006-10-13 20:48:17 +00:00
Kip Macy
6e0c768ca7 more sun4v fallout - missed add
Approved by: rwatson (mentor)
2006-10-09 07:00:59 +00:00
Kip Macy
a9928b2f58 unbreak sparc64 loader build
re-add accidentally deleted asi value
remove sun4v only header include

Approved by: rwatson (mentor)
Reviewed by: jmg
2006-10-09 05:59:04 +00:00
Kip Macy
0209c79363 add sun4v support to the sparc64 boot loader
Approved by: rwatson (mentor)
Reviewed by: jmg
Tested by: kris, dwhite, and jmg
2006-10-09 04:43:07 +00:00
Pav Lucistnik
1cd46fae01 - Update URL of Intel documentation
Submitted by:	Rob <spamrefuse@yahoo.com> on freebsd-doc
MFC after:	3 days
2006-10-07 10:39:34 +00:00
John Baldwin
ce34bd6bca - Fix a couple of improper uses of leal in the previous space saving
commits.  For some reason I thought the scale factor was a shift count
  rather than the multiplicand (that is, I thought leal (%eax,%edx,4) was
  going to generate %eax + %edx << 4 rather than %eax + %edx * 4).  What
  I need is to multiply by 16 to convert a real-mode (seg, offset) tuple
  into a flat address.  However, the max multiplicand for scaled/index
  addressing on i386 is 8, so go back to using a shl and an add.
- Convert two more inter-register mov instructions where we don't need to
  preserve the source register to xchg instructions to keep our space
  savings.

Tested by:	Ian FREISLICH if at hetzner.co.za
MFC after:	1 week
2006-10-05 15:30:51 +00:00
Ariff Abdullah
f545d39274 Add module loading option for Intel High Definition Audio Controller
- snd_hda(4)
2006-10-01 14:58:30 +00:00
Alexander Leidinger
5fb623adda Add snd_envy24ht and remove the snd_ak4* module. 2006-09-30 18:07:26 +00:00
Ruslan Ermilov
cab4aede58 Fix WARNS=2 warnings. 2006-09-29 20:57:38 +00:00
Ruslan Ermilov
6dcf625c41 Fix most of the WARNS=2 warnings. 2006-09-29 20:27:41 +00:00
John Baldwin
f3088510e2 Oops, add return values for the smap command function. We must have the
warnings set weird or something because gcc didn't warn about this at all.

Submitted by:	ru
2006-09-29 20:07:16 +00:00
John Baldwin
d64e328e3c Tweak the code to handle intercepting BIOS calls to int 0x15 to shave
another 16 bytes off of BTX (and thus boot2):
- Compare against the value of %eax that is saved on the stack instead of
  loading it into %eax (which requires saving the current %eax on the
  stack).
- Use %ch to examine the keyboard flag state in the BIOS to see if
  Ctrl-Alt-Del is pressed instead of %al so we don't have to save %eax on
  the stack anymore.

MFC after:	1 week
2006-09-28 19:42:10 +00:00
John Baldwin
4b9657e974 Optimize the int 15/87 handler for space to shave another 16 bytes off of
BTX (and thus boot2):
- Don't bother saving %eax, %ebx, or %ecx as it is not necessary.
- Use a more compact sequence to load the base value out of a GDT entry
  by loading the contiguous low 24 bits into the upper 24 bits of %eax,
  loading the high 8 bits into %al, and using a ror to rotate the bits
  (2 mov's and a ror) rather than loading the pieces in smaller chunks
  (3 mov's and a shl).
- Use movzwl + leal instead of movl + movw + shll + addl.
- Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where
  it's ok to trash %eax.  xchgl %eax, foo is a 1-byte opcode whereas the
  mov is a 2-byte opcode.
- Use movzwl rather than xorl + movw.

MFC after:	1 week
2006-09-28 19:38:02 +00:00
John Baldwin
c4f7c44bb3 Add an 'smap' command that dumps out the BIOS SMAP.
MFC after:	1 week
2006-09-28 19:07:13 +00:00
John Baldwin
64786948cc Ignore a sub-topic match if it is inside the command description.
Otherwise, merge-help can get confused by a command description that
includes a word that starts with a capital S.

MFC after:	1 week
2006-09-28 19:06:20 +00:00
John Baldwin
add92b34d1 A couple of simple tweaks that trim BTX by 6 bytes. Since BTX is
16-byte aligned within boot2 however, this actually trims boot2 by 16
bytes.
2006-09-28 16:30:36 +00:00
Ruslan Ermilov
2d78e8c5f1 Add -march=i386 to fix amd64 build by generating the same code
as i386 would do.
2006-09-28 10:02:04 +00:00
John Baldwin
3ea944faa0 Emulate moving cr0, cr2, cr3, or cr4 into any i386 general register
rather than just emulating mov cr0, eax.  This fixes some Compaq/HP BIOS
with DMA (as the BIOS tried to read cr3 so it could translate addresses
if paging was enabled).

MFC after:	1 week
2006-09-27 19:32:26 +00:00
Tor Egge
a1e363f256 Add mnt_noasync counter to better handle interleaved calls to nmount(),
sync() and sync_fsync() without losing MNT_ASYNC.  Add MNTK_ASYNC flag
which is set only when MNT_ASYNC is set and mnt_noasync is zero, and
check that flag instead of MNT_ASYNC before initiating async io.
2006-09-26 04:15:59 +00:00
Ruslan Ermilov
b0e014af29 - Include <sys/reboot.h> to get the RB_* defines.
- Make the PROBE_KEYBOARD option better resemble the -P option in
  boot2, i.e., if keyboard isn't present then boot with both
  RB_SERIAL and RB_MULTIPLE set.

Reviewed by:	jhb
2006-09-05 19:28:03 +00:00
Ruslan Ermilov
23471380b5 Make the default "init_path" value breakable, so it fits on the
screen's width, thus eliminating a groff(1) warning.

Suggested by:	marck
2006-08-20 09:31:17 +00:00
Warner Losh
c3dec0b20d Copy powerpc ficl files sysdep files (maybe we need a common one) 2006-08-18 21:41:43 +00:00
Warner Losh
1e99975d1f Build at91 2006-08-18 21:37:27 +00:00
Warner Losh
7127c5f8f5 Support compiling as part of world 2006-08-18 20:26:54 +00:00
Christian Brueffer
b988495e7b Wordsmithing on the ixgb(4) and mxge(4) descriptions.
Suggested by:	ru (ixgb)
2006-08-18 19:03:28 +00:00
Christian Brueffer
a4ec0f47af Add more modules, correct alphabetical order. 2006-08-18 17:48:17 +00:00
Dmitry Morozovsky
6bf0d59557 kern.ipc.nmbclusters is sysctl, not compile-time option. Change Dv to Va.
Touch .Dd.

Pointed out by:	ru
MFC after:	1 week
2006-08-18 10:15:01 +00:00
Dmitry Morozovsky
86ddfd1205 Remove references to NMBCLUSTERS which is obsoleted.
PR:		100427
Approved by:	maxim
MFC after:	1 week
2006-08-18 08:03:06 +00:00
Warner Losh
aade86560a MFp4: changes since .s -> .S rename. Use correct header for size 2006-08-17 00:14:32 +00:00
Warner Losh
fc96acb9c7 MFp4: First cut at making spi and/or sd card booting work, needs work 2006-08-16 23:39:58 +00:00
Warner Losh
a2d68f2284 MFp4:
Tidy up a bit.  Make sure that the burned image matches the downloaded
one.
2006-08-16 23:18:07 +00:00
Warner Losh
5faf79cd4c MFp4:
Simplify life a little for such a simple program.
2006-08-16 23:14:52 +00:00
Christian Brueffer
03af12c1ac Several updates:
- Added missing file system/network/sound module entries
- Removed obsolete network module entries
- Capitalized (Fast|Gigabit) Ethernet

MFC after:	1 week
2006-08-14 18:04:01 +00:00
Warner Losh
100d8ed79b MFp4: Integrate a boatload of bug fixes from p4. We're right on the
8k boundary with this program still.

   text    data     bss     dec     hex filename
   7925       4    4476   12405    3075 bootiic.out

so we have like 293 bytes left before we have to play games.  There
may be ways to reduce that somewhat, but they start to be very board
specific.
2006-08-10 19:55:52 +00:00
Warner Losh
8440b5885d MFp4:
Reach over into the arm tree to grab some at91 definitions.
Better warnings
Lots of build tweaks
2006-08-10 18:22:56 +00:00
Warner Losh
20311a8e46 MFp4: remove obsolete files 2006-08-10 18:19:45 +00:00
Warner Losh
87ad01e6e3 MFp4:
Remove obsolete files in list
	Add spi flash reading routines
2006-08-10 18:14:35 +00:00
Warner Losh
d4a46cca62 MFp4: Numerous changes from p4 to try to improve tftp downloading,
reduce code footprint, etc.  While some problems still remain, the
reliability of tftp is much improved.
2006-08-10 18:11:22 +00:00
Warner Losh
cabd3e547a MFp4: consolidate #include files down to lib.h 2006-08-10 18:07:49 +00:00
Warner Losh
592c5848a6 MFp4: These will migrate to the boot specific directories because they
are too hard to share between the different boot loaders.
2006-08-10 18:07:01 +00:00
Warner Losh
98de821987 MFp4: Make it clearer that the address passed to the eeprom routines is
really an offset within the eeprom device, and not a IIC address.
2006-08-10 18:03:50 +00:00
Warner Losh
7492b55513 MFp4: Catchup with migration of some defines. 2006-08-10 18:02:27 +00:00
Warner Losh
5c35a13adf MFp4: Tweaks for our board. 2006-08-10 17:59:22 +00:00
Warner Losh
b51b3172ba MFp4: Increase character timeout to 10. Make it a #define for easier
changes in the future.  This helps with getting started and to
overcome the really sucky level of granuality this timeout has in
getc.  A timeout of 1 means 'wait until top of next second' rather
than 'wait for at least a second'.
2006-08-10 17:54:51 +00:00
Warner Losh
a1f26cebf0 Don't need to special case arm here anymore 2006-08-10 06:29:43 +00:00
Warner Losh
2e6c020cf2 Add a dummy makefile to keep build happy 2006-08-10 06:29:15 +00:00
Yaroslav Tykhiy
776fc0e90e Commit the results of the typo hunt by Darren Pilgrim.
This change affects documentation and comments only,
no real code involved.

PR:		misc/101245
Submitted by:	Darren Pilgrim <darren pilgrim bitfreak org>
Tested by:	md5(1)
MFC after:	1 week
2006-08-04 07:56:35 +00:00
Andrey A. Chernov
cfb1b19a60 Add snd_emu10kx_load 2006-07-26 12:59:42 +00:00
Pyun YongHyeon
68fbfb9241 Add an entry for the stge(4) module.
While I'm here remove a stale wx(4) entry which was removed 4 years,
9 months ago.
2006-07-25 01:02:22 +00:00
Warner Losh
08586b224d Don't descend into ${MACHINE} on the arm platforms. 2006-06-18 17:44:40 +00:00
Ian Dowse
9c0ce099e6 Increment the disk block offset after writing, not before. This
fixes filesystem corruption when nextboot.conf is located after
cylinder 1023. The bug appears to have been introduced at the time
bd_read was copied to create bd_write.

PR:		bin/98005
Reported by:	yar
MFC after:	1 week
2006-05-31 09:05:49 +00:00
Marius Strobl
07399d81d8 - Replace the entry for the no longer existing lnc(4) module with an
entry for the replacement le(4) module.
- Add an entry for the gem(4) module.
- Remove gratuitous whitespace in the description of the hme(4) entry.
2006-05-14 19:04:12 +00:00
Yoshihiro Takahashi
33cf0c5194 Add a bootable CD support. 2006-05-14 07:26:02 +00:00
John Baldwin
be5d6589e0 Remove more Alpha bits from the boot code including fixing several
stale comments.
2006-05-12 04:09:53 +00:00
John Baldwin
906d6c0eb1 Remove Alpha bits for ficl. 2006-05-12 04:07:42 +00:00
John Baldwin
67ab9fd759 First pass at removing Alpha kernel support. 2006-05-11 22:25:28 +00:00
Yoshihiro Takahashi
b42bfe1947 Fix build (s:pc98/cbus/cbus.h:pc98/pc98/pc98_machdep.h:)
Pointyhat to:	nyan
2006-05-09 14:20:17 +00:00
John Baldwin
cde0d87b26 Restore the pre-5.x behavior of only beeping if the user makes a bad
selection and not always beeping on startup.  The two bytes for the extra
'jmp' instruction were obtained by removing recognition of BSD/OS
partitions.

Requested by:	many
Tested by:	subset of many
Head nod:	imp, keramida
MFC after:	2 weeks
2006-05-03 13:43:46 +00:00
John Baldwin
b5fd832d94 Use PTOV() to convert physical addresses to appropriate virtual addresses
in the loader when searching for the ACPI RSDP.  (The loader runs in a flat
mode with va 0 == pa 0xa000.)
2006-04-25 18:42:22 +00:00
Warner Losh
7ea1357336 MFp4:
Make getc(0) polling (this has the happy side effect of saving
	8 bytes in the generated code).
2006-04-21 13:58:51 +00:00
Warner Losh
69f5220b21 MFp4: Loop forever getting characters... A kludge for now. 2006-04-21 13:56:26 +00:00
Warner Losh
750f97a294 MFp4: Integrate support for building tag support for linux booting. 2006-04-21 13:51:47 +00:00
Warner Losh
0cef210b08 MFp4:
Init eeprom here now that we don't init the eeprom in arm_init.s
	and read in the second 8k of the data.
	Tweak formatting.
2006-04-21 13:44:58 +00:00
Warner Losh
ca2c5ec68f Move from arm_init.s -> .S. #ifdef linux vs freebsd defaults for the
boot loader (linux booting helps regression testing).  No repo copy
because of limited history.
2006-04-21 13:40:26 +00:00
Warner Losh
9b062675f0 MFp4: formatting nits and minor style changes that likely won't matter. 2006-04-21 07:45:57 +00:00
Warner Losh
acc47bab5b Allow one to enable building tags. Check the size of the boot imag. 2006-04-21 07:41:36 +00:00
Warner Losh
ac1e0174a6 MFp4:
On the KB9202 go ahead and enable the flash controller so the boot
loader can access the parallel flash.
2006-04-21 07:29:14 +00:00
Warner Losh
42ed626f87 MFp4:
Make this compile, assuming that you have linux installed in a
sensible place.  tag_list is disabled by default, since we don't
distribute linux, but it is desirable to allow the boot loader to boot
Linux or FreeBSD (mostly for testing).
2006-04-21 07:19:22 +00:00
Warner Losh
9ac58632a3 MFp4:
Minor diffs to reduce diffs to p4.
2006-04-21 07:12:12 +00:00
Warner Losh
fe51f25d3f spi flash updating boot loader. upload this file for the recovery
xmodem download.  Then download the image you want in the flash.
This will burn the image into the flash.  You must then reset the
unit and the new flash image will be used for booting...
2006-04-21 06:51:08 +00:00
Warner Losh
776524db7d iic eeprom updating boot loader. upload this file for the recovery
xmodem download.  Then download the image you want in the eeprom.
This will burn the image into the eeprom.  You must then reset the
unit and the new eeprom image will be used for booting...
2006-04-21 06:48:52 +00:00
Warner Losh
ecade1c5b5 Add boot0iic and boot0spi. These are 'shortcut' boot loaders designed
to replace either a bad iic eeprom with one you download with xmodem,
or likewise with a spi flash.
2006-04-21 06:43:32 +00:00
Warner Losh
ae78672c56 MFp4 (checkpoint of work in progress):
o Use a directory layout that is more akin to the i386 boot layout.
o Create a libat91 for library routines that are used by one or more
  of the boot loaders.
o Create bootiic for booting from an iic part.
o Create bootspi for booting from an spi part.
o Optimize the size of many of these routines (especially emac.c).  Except
  for the emac.c optimizations, all these have been tested.
o eliminate the inc directory, libat91 superceeds it.
o Move linker.cfg up a layer to allow it to be shared.
2006-04-19 17:16:49 +00:00
Warner Losh
78fd9f198c Fix style nit noticed by bde. 2006-04-15 02:51:53 +00:00
Warner Losh
e43d852f65 Add commented out define for TSC board's boot0. 2006-04-13 17:44:05 +00:00
Warner Losh
e439ab9afe MFp4:
For 32-bit SDRAM systems, enable D16 to D31 in the PIO controller.
Otherwise they read back as 0xffff.

Shave 8 bytes from the object size by using AT91C_BASE_PIOA directly
and by not assigning PIO_BSR to 0 in the DBGU init.  That's a nop in
two ways (everything defaults to peripheral A, and writing 0 changes
nothing).
2006-04-13 17:39:34 +00:00
Warner Losh
8015f1dbb8 Merge from p4:
Many places used #define FOO ((unsigned int) 0x23) where a simpler
#define FOO 0x23u would have sufficed.  This practice is overly
verbose and has the disadvantage that you can't say

	#if FOO == BAR
	#endif

because the extra "unsigned int" tokens choke cpp's little brain.
Migrate to the latter style to allow use in preprocessor statements.
The two are the same semantically anyway in a C context (at least for
the uses they are put to presently, C gurus can explain to me how they
differ).
2006-04-13 17:34:23 +00:00
Warner Losh
3de060b996 Need at91rm9200_lowlevel.h for SDRAM_BASE definition. 2006-04-13 17:31:02 +00:00
Warner Losh
6e8aee768a Common register definition for AT91RM9200 2006-04-12 21:23:36 +00:00
Warner Losh
e06ca69b2f Recovery boot loader for the AT91 family of processors. Download it
via xmodem to the DBGU port when the AT91 comes up in recovery mode.
The recovery loader will then load your program via xmodem into SDRAM
at 1MB which can do its things.  It needs to be tweaked to the
specific board one is using, but it fits in < 1kB (all of Atmel's ARM
products have at least 8kb of SRAM that I can tell, so this should
work for them all).

Parts of this code were provided by Kwikbyte with copyright
specifically disclaimed.  I heavily modified it to act as a recovery
loader (before it was a bootstrap loader) and to optimize for size
(before I started the size was closer to 8k).

Bootstrap loaders for SPI and IIC to follow.
2006-04-12 21:22:44 +00:00
Maxim Sobolev
e101181393 Merge in timeout into A20-enable routine from cdboot/boot1.
MFC after:	1 day
2006-04-11 20:53:49 +00:00
John Baldwin
31062da1b0 Drop the gateA20() function in the loader as it is unused. All the other
boot loaders that load the loader already handle A20.  In fact, they are
required to do so in order to setup the environment that btxldr expects.
2006-04-11 20:11:30 +00:00
John Baldwin
a115c84d58 Minor whitespace tweak. 2006-04-11 20:09:42 +00:00
John Baldwin
3793634041 Tweak comment. 2006-04-11 17:36:08 +00:00
John Baldwin
70e040dfcf Use the proper condition to determine that we matched an filename.
Otherwise, we could match on a filename that had the wrong last character
(such as /boot/loaded instead of /boot/loader).

PR:		kern/95625
Submitted by:	Oliver Fromme <olli@secnetix.de>
MFC after:	1 month
2006-04-11 17:26:54 +00:00
Maxim Sobolev
cd86367a5a When enabling A20 put upper limit on amount of time we wait for the keyboard
controller to get ready (65K x ISA access time, visually around 1 second).
If we have wait more than that amount it's likely that the hardware is a
legacy-free one and simply doesn't have keyboard controller and doesn't
require enabling A20 at all.

This makes cdboot working for MacBook Pro with Boot Camp.

MFC after:	1 day
2006-04-11 04:39:29 +00:00
Scott Long
c2e1d5d04c Remove the USB keyboard hack now that KBDMUX is enabled by default. Allow
it to be disabled if Safe Mode is selected.
2006-03-31 21:36:17 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
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
Marcel Moolenaar
383bd4fd1e Remove ELF dynamic tag definitions that aren't used. Ideally,
those that are used should come from <machine/elf.h>.
2006-01-18 18:49:25 +00:00
Marcel Moolenaar
853b7411b6 s/R_IA64_/R_IA_64_/g as per the ia64 psABI. 2006-01-17 21:03:22 +00:00
Marius Strobl
e4846391da In moduledir_readhints() cast the value returned by sizeof() to ssize_t
when checking whether it's greater than a struct stat st_size in order
to also catch the case when st_size is -1. Previously this check didn't
trigger on sparc64 when st_size is -1 (as it's the case for a file on
a bzipfs, TFTP server etc.), causing the content of the linker hints
file to be copied to memory referenced by a null-pointer.

PR:		91231
MFC after:	1 week
2006-01-12 13:18:49 +00:00
Yoshihiro Takahashi
6fa7cb4445 MFi386: revisions 1.34 and 1.36. 2005-12-21 06:10:42 +00:00
Yoshihiro Takahashi
8b891b8d17 MFi386: revision 1.8. 2005-12-21 06:09:47 +00:00
Yoshihiro Takahashi
2d908c8204 MFi386: revision 1.46. 2005-12-21 06:09:09 +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
90ec8e27c3 Unbreak pc98 after my last changes to i386. 2005-12-20 08:54:30 +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
Marcel Moolenaar
757686b115 Make our ELF64 type definitions match standards. In particular this
means:
o  Remove Elf64_Quarter,
o  Redefine Elf64_Half to be 16-bit,
o  Redefine Elf64_Word to be 32-bit,
o  Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o  Use Elf_Size in MI code to abstract the difference between
   Elf32_Word and Elf64_Word.
o  Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks
2005-12-18 04:52:37 +00:00
Ariff Abdullah
964e14b04a Add kernel module loading option for snd_atiixp(4). 2005-12-01 03:10:12 +00:00
Ruslan Ermilov
4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Ruslan Ermilov
15be1e4be0 Catch up with loader_color -> loader_logo and document beastie_disable. 2005-11-15 21:26:49 +00:00
Pawel Jakub Dawidek
d941425873 Rename GEOM class kernel module g_md.ko to geom_md.ko for consistency
with the rest.

mdconfig.c:	Simplify mdmaybeload() function.
mdioctl.h:	Removed (now unused) #define.
loader.conf:	Sort GEOM classes properly.

OK'ed by:	phk
2005-11-11 11:31:23 +00:00
Pawel Jakub Dawidek
62e698b51d Add more GEOM classes to defaults/loader.conf. Add references to manual
pages to those already present.

Reviewed by:	brueffer
2005-11-11 10:48:30 +00:00
Ruslan Ermilov
6e7a7ba194 Consistently use OPT_* macros to test/set boot options. 2005-11-03 07:35:36 +00:00
Yoshihiro Takahashi
94ac50dbcb MFi386: Enable beastie.4th. 2005-10-30 15:59:08 +00:00
Scott Long
fe8388fec2 Add back some bits. 2005-10-30 05:41:42 +00:00
Scott Long
aa845d2dc1 Replace loader_color with loader_logo 2005-10-30 05:36:23 +00:00
Marius Strobl
3727af6a8b - Add a workaround for the fact that OFW doesn't guarantee that
devices can be opened multiple times simultaneously but we're
  expected to be able to do so by the rest of the loader.
  This fixes booting from disks attached to the on-board SCSI
  controller of Sun Ultra 1 (previously this triggered a trap)
  and probably also of AX1115 boards.
- While here, remove unused variables and add empty lines where
  style(9) requires such.

Tested on:	powerpc (grehan), sparc64
MFC after:	1 month
2005-10-25 12:51:49 +00:00
Marius Strobl
79aae78c89 In ofw_parsedev() check the return value of malloc() and protect
against a NULL pointer dereference when ofw_parsedev() is called
with a NULL path argument.

Tested on:	powerpc (grehan), sparc64
2005-10-25 12:49:56 +00:00
Marius Strobl
89189a9d8e Use an ihandle_t to store the instance handle of an opened device
instead of a phandle_t (package handle). Since both are typedefed
to unsigned int, this is more or less cosmetic.
2005-10-20 11:14:34 +00:00
Marius Strobl
e3ad728cf2 Remove unused variables. 2005-10-20 10:39:09 +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
Yoshihiro Takahashi
f51b0ce0ee MFi386: revision 1.33.
> 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-30 13:24:14 +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
Yoshihiro Takahashi
42244f27c2 Remove EPSON PC-386 note A/W/AE/WR support. 2005-09-14 12:39:06 +00:00
Yoshihiro Takahashi
abf04270da MFi386: revision 1.11. 2005-09-13 08:29:03 +00:00
Yoshihiro Takahashi
090559c76e MFi386: revisions 1.10 and 1.11.
- Add '-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3' to CFLAGS.
2005-09-13 08:27:38 +00:00
Gleb Smirnoff
a3a90a725c net.graph.ngqfreemax has been deprecated. 2005-08-31 10:51:55 +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
Marius Strobl
1b279bfb52 - Change the code that determines whether to use a serial console and
which serial device to use in that case respectively to not rely on
  the OFW names of the input/output and stdin/stdout devices. Instead
  check whether input and output refers to the same device and is of
  type serial (uart(4) was already doing this) and for the fallback
  to a serial console in case a keyboard is the selected input device
  but unplugged do the same for stdin and stdout in case the input
  device is nonexistent (PS/2 and USB keyboards) or has a 'keyboard'
  property (RS232 keyboards). Additionally also check whether the OFW
  did a fallback to a serial console in the same way in case the
  output device is nonexistent. While at it save on some variables
  and for sys/boot/sparc64/loader/metadata.c move the code in question
  to a new function md_bootserial() so it can be kept in sync with
  uart_cpu_getdev_console() more easily.
  This fixes selecting a serial console and the appropriate device
  when using a device path for the 'input-device' and 'output-device'
  OFW environment variables instead of an alias for the serial device
  to use or when using a screen alias that additionally denotes a
  video mode (like e.g. 'screen:r1024x768x60') but no keyboard is
  plugged in (amongst others). It also makes the code select a serial
  console in case the OFW did the same due to a misconfiguration like
  both 'input-device' and 'output-device' set to 'keyboard' or to a
  nonexisting device (whether the OFW does a fallback to a serial
  console in case of a misconfiguration or one ends up with just no
  console at all highly depends on the OBP version however).
- Reduce the size of buffers that only ever need to hold the string
  'serial' accordingly. Double the size of buffers that may need to
  hold a device path as e.g. '/pci@8,700000/ebus@5/serial@1,400000:a'
  exceeds 32 chars.
- Remove the package handle of the '/options' node from the argument
  list of uart_cpu_getdev_dbgport() as it's unused there and future
  use is also unlikely.

MFC after:	1 week
2005-08-15 20:58:36 +00:00
Kirill Ponomarev
a0eeda33e8 Add if_arl_load, if_axe_load, if_aue_load, if_cs_load, if_cue_load,
if_hme_load, if_nve_load, if_rue_load, if_udav_load to Networking
Drivers section.

Submitted by:	matteo
2005-08-07 09:41:53 +00:00
Kirill Ponomarev
4204e2fb6b Add if_ath_load (default NO) in Networking Drivers section.
PR:		conf/80870
Submitted by:	Hasan Cana <vpb at albabsd dot org>
2005-08-06 18:32:25 +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
Brian Somers
1b3b403e9b Fix a comparison that broke ``set console=vidconsole'' and even the
loader.conf line ``console="vidconsole"''.

Sponsored by:	ActiveState/Sophos
MFC after:	1 week
2005-07-29 12:47:42 +00:00
Brian Somers
07998bfffc Mention that console= can set multiple consoles.
Relate boot_ options to their kernel command line flags and make it clear
how kenv(1) is used.

Sponsored by:	ActiveState/Sophos
MFC after:	1 week
2005-07-29 12:41:37 +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
John-Mark Gurney
2fd290094e remove a pointless comment with a more helpful one...
Submitted by:	Tobias Roth
MFC after:	5 days
2005-07-25 17:18:25 +00:00
Peter Grehan
2fcb4181ad Make code match comment: make the smallest unit of page allocation
from OpenFirmware be 16 pages to avoid fragmentation in the list
of mappings returned when the kernel requests it in pmap_bootstrap.

This allows a static buffer to be used when obtaining the existing
mappings - very useful on the G5 when random physical pages can't
be grabbed because they can't be BAT-mapped.

MFC after:	3 days
2005-07-22 23:22:29 +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
Ruslan Ermilov
6c059e67a9 Improved markup, fixes some spelling and grammar.
Approved by:	re (blanket)
2005-06-14 08:49:14 +00:00
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
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
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
John Baldwin
2d41a4e5c0 Whitespace. 2005-05-31 21:22:01 +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
David E. O'Brien
2ba8e9a61b Ensure GCC does not use FP registers in integer code.
I really don't like cluttering up the compiler invocation,
but this bigger hammer will fix reported problems for now.
2005-05-31 18:13:29 +00:00
Ruslan Ermilov
2e79aad4c7 Markup nits. 2005-05-30 12:33:04 +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
Peter Grehan
530d1c7646 Since the BAT mapping was removed a long time back, it can't
be assumed that modules are contiguous in memory (they're not)
so don't blindly __syncicache start/end. In fact, don't bother
syncing the icache for modules since the kernel will do it after
fixing up relocations.

This fixes the trap when loading modules at boot time.

Reported by:	orlando at break dot net
2005-05-24 21:43:49 +00:00
Philippe Charnier
f942457007 Remove unused variables. Remove prototype for function that does not exist. 2005-05-20 13:14:18 +00:00
Maxim Sobolev
4d87b291ad Extend `autoboot_delay' handling - is this variable is set to -1 don't allow
user to interrupt autoboot process at all. Currently, even when
`autoboot_delay' is set to 0, loader(8) still allows autoboot process to be
interrupted by pressing any key on the console when the loader reads kernel
and modules from the disk. In some cases (i.e. untrusted environment) such
behaviour is highly indesirable and user should not be allowed to interfere
with the autoboot process at all.

Sponsored by:	PBXpress Inc.
MFC after:	3 days
2005-05-19 23:03:02 +00:00
Peter Grehan
a9f9f6ce08 Change ofw_readin/ofw_copyin to map the entire region before
copying, rather than a page at a time. This was creating far
too many single-page mappings, and eventually OFW overflowed
some internal data structure and refused to map any more.
The new algorithm creates far less mappings and fixed a bug
where multiple mappings for the same page would be created.

'Twas known this was a problem, but only became urgent when the
install CD's mfs_root grew large enough to cause the overflow.
2005-05-19 07:21:46 +00:00
Maxim Sobolev
faf0d4eb71 Whitespace only: kill trailing spaces. 2005-05-19 05:15:08 +00:00
Yoshihiro Takahashi
d1725ef7ff Change a directory layout for pc98.
- Move MD files into <arch>/<arch>.
  - Move bus dependent files into <arch>/<bus>.
Rename some files to more suitable names.

Repo-copied by:	peter
Discussed with:	imp
2005-05-10 12:02:18 +00:00
Yoshihiro Takahashi
769f92857b Remove ifdef PC98. 2005-05-08 14:17:28 +00:00
Yoshihiro Takahashi
d03f4aa4fe Merged from libi386/biosdisk.c revisions 1.37 and 1.41. 2005-05-08 13:30:14 +00:00
Yoshihiro Takahashi
ad42c2a5fd Use DOSMID_386BSD rather than DOSPTYP_386BSD. 2005-05-08 11:15:38 +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
Yoshihiro Takahashi
fa1650c0c8 MFi386: revision 1.20. 2005-04-14 14:12:54 +00:00
Stefan Farfeleder
94bd92c387 Fix 'implicit int' instance. 2005-04-09 14:07:13 +00:00
Warner Losh
722cb08d74 Fix buidling of boot blocks for pc98 with new links.
Submitted by: nyan@
2005-04-03 04:58:15 +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
Stefan Farfeleder
ea8b0ab337 Don't try to use 'typedef struct foo' if just 'struct foo' makes more sense
and works on all compilers.  This also removes the need for
__CC_SUPPORTS_FORWARD_REFERENCE_CONSTRUCT in <sys/cdefs.h>.

OK'ed by:	marcel, dfr
2005-03-07 15:38:37 +00:00
Stefan Farfeleder
0eca8743b8 Fix typos in a comment. 2005-03-06 13:53:05 +00:00
Joerg Wunsch
a5f50ef9e4 netchild's mega-patch to isolate compiler dependencies into a central
place.

This moves the dependency on GCC's and other compiler's features into
the central sys/cdefs.h file, while the individual source files can
then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to
refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.

By now, GCC and ICC (the Intel compiler) have been actively tested on
IA32 platforms by netchild.  Extension to other compilers is supposed
to be possible, of course.

Submitted by:	netchild
Reviewed by:	various developers on arch@, some time ago
2005-03-02 21:33:29 +00:00
Marius Strobl
9e2b417bfd Remove unused variables. 2005-03-02 20:12:27 +00:00
Dag-Erling Smørgrav
b32a1f4405 Document the new default init_path.
Reminded by:	ru
MFC after:	2 weeks
2005-02-17 11:14:45 +00:00
Dag-Erling Smørgrav
f3f4baf099 Add /rescue/init to the default init_path, before /stand/sysinstall.
MFC after:	2 weeks
2005-02-17 10:00:10 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +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
Robert Watson
98d13cb3ff Insert an explicit McAfee license, as we use a stock two-clause BSD
license rather than the slightly custom licence in ufsread.c.
2005-01-30 14:58:00 +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
Warner Losh
6a0fd84b50 Start each of the license/copyright comments with /*- 2005-01-05 22:16:58 +00:00
Warner Losh
48ffcc8658 Remove obsolete note about the boot loader not being ready for stable.
It has been in stable for at least 5 years now.
2005-01-05 22:16:10 +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
Warner Losh
6550c6569b The 'start' command processes loader.conf variables, not loader.rc.
Fix comment to match.
2004-12-06 05:30:31 +00:00
Scott Long
e522e6e988 Fix a bunch of stack leaks. These were theoretically harmless, except that
they would leave enough elements on the stack that if you escaped to the
loader prompt and then typed 'setenv', it would pull in all of the leaked
junk and cause an exception in the environment.  There still seems to be
3 leaked elements, but they don't appear to be coming from this file.
2004-12-01 07:17:57 +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
Scott Long
a63e88df60 Instead of just not defining a bunch of words when TESTMAIN is set, provide
stubs that at least handle the stack correctly.  This makes it much easier to
experiment with loader scripts from userland.
2004-11-30 11:35:30 +00:00
Yoshihiro Takahashi
cafe28f16a MFi386: revisions 1.77 and 1.78. 2004-11-29 11:55:14 +00:00
Yoshihiro Takahashi
028d40a592 MFi386: revision 1.38. 2004-11-29 11:54:42 +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
Marcel Moolenaar
f3beed66fa o Introduce efimd_va2pa() to translate addresses in efi_copy{in|out}()
and efi_readin(). This removes MD code from copy.c.
o  Don't unconditionally add pal.S to SRCS. It's specific to ia64.
2004-11-28 00:30:22 +00:00
Marcel Moolenaar
b81a1f533f Add efimd.c. This file contains MD code used by the EFI library. While
changing the Makefile, fail the creation of loader.efi when there are
unresolved symbols in loader.sym. This avoids silently creating a
faulty EFI binary.
2004-11-28 00:26:11 +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
Marcel Moolenaar
21321a3432 This file was repocopied to src/sys/boot/ia64/efi. 2004-11-23 18:55:24 +00:00
Marcel Moolenaar
7cb1eb1b27 Unhook the loader subdirectory. The ia64 EFI loader is now build
under ../ia64/efi.
2004-11-23 06:04:51 +00:00
Marcel Moolenaar
25cd518860 Hookup the efi subdirectory. 2004-11-23 06:03:03 +00:00
Marcel Moolenaar
9bf99aadf9 This file was repocopied from src/sys/boot/efi/loader.
Updated for the new build location.
2004-11-23 06:02:03 +00:00
Marcel Moolenaar
5b1f181a89 Visit the efi subdirectory before we visit the machine-specific
subdirectory so that the library built there can be used by the
machine specific boot code.
2004-11-23 05:52:00 +00:00
Marcel Moolenaar
2ba0042660 Remove struct ia64_itir and use a plain old uint64_t instead. 2004-11-21 21:40:08 +00:00
Ruslan Ermilov
fccc3fcfc2 There's no reason for "read" and "echo" commands to not
appear in the online command list.
2004-11-13 17:04:55 +00:00
Ruslan Ermilov
e631c74b1d Pass the "?" command output through the pager.
(This doesn't quite work as this command is overridden by Forth,
and some Forth commands are appended to the output.)
2004-11-12 13:27:49 +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
Kirill Ponomarev
fe368b40bf Document "loader_color" variable.
PR:		conf/73396
Submitted by:	Aleksander Fafula <alex at fafula dot com>
Approved by:	scottl
2004-11-07 17:01:08 +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
Brooks Davis
923a1dc3d1 Add a loader menu option to set hint.atkbd.0.flags=0x1 which allows USB
keyboards to work if no PS/2 keyboard is attached.  The position in the
menu was chosen to avoid moving option 6 (loader prompt).  This should
be a no-op on non-i386/amd64 machines.
2004-10-30 13:45: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
Ruslan Ermilov
39ebd90532 Collapse several adjacent .if's into .if/.elif. 2004-10-24 12:32:41 +00:00
Yoshihiro Takahashi
222be03974 ELF64 support is not needed on pc98. 2004-10-24 12:18:11 +00:00
Yoshihiro Takahashi
c25984c97c MFi386: revision 1.4. 2004-10-24 12:16:18 +00:00
Yoshihiro Takahashi
3ad0b93804 MFi386: Set bi_basemem and bi_extmem variables.
Respect RB_MULTIPLE flag.
2004-10-24 12:15:07 +00:00
Yoshihiro Takahashi
8c3c8ed197 MFi386: Add support for preloading ELF relocatable object format modules. 2004-10-24 12:14:05 +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
Warner Losh
99e085d9a8 document host_start_mem.
# feel free to wordsmith.

Suggested by: ru@
2004-10-15 06:59:07 +00:00
Ruslan Ermilov
7a49c8b37d Polish the last change. 2004-10-15 06:44:13 +00:00
Warner Losh
71a77eda7d Document hw.{pci,acpi}.host_start_mem
Requested by: ru@
2004-10-15 00:15:07 +00:00
Pawel Jakub Dawidek
8d02a378aa Back out changes which were introduced to delay mounting root file system.
Those changes were made on gmirror needs, but now gmirror handles this
by itself.
2004-10-05 11:26:43 +00:00
Stefan Farfeleder
08c7cd06b9 Use the correct printf specifier.
PR:	47187
2004-10-03 16:34:01 +00:00
Ruslan Ermilov
886ea9fc5c Document MD commands. 2004-10-01 19:44:42 +00:00
Ruslan Ermilov
c09be59eb6 The "autoboot" command also has a third (optional) parameter. 2004-10-01 00:15:13 +00:00
Ruslan Ermilov
3075c18308 Don't give instructions on how to disable ACPI in the MI section.
For novice users, beastie.4th can just do it.  Expert users can
read ACPI instructions by typing "help ACPI".
2004-09-30 21:57:16 +00:00
Ruslan Ermilov
ab737c5f07 Setting "kernel" to an absolute path is a bad idea because
after loading such a kernel, "module_path" will be set to
an insane value.  Fixed example by providing an equivalent
setting.  For the record, when automatically loading a
kernel (commands "boot" and "boot-conf"), the following is
tried, in this order:

	path=/boot/${kernel} file=${bootfile}
	path=/boot/${kernel} file=${kernel}
	path=${kernel} file=${bootfile}
	path=${kernel} file=${kernel}
	path=${module_path} file=${kernel}
2004-09-30 21:48:51 +00:00
Ruslan Ermilov
a0a87f4d13 Bring this file more up to date. 2004-09-30 20:02:07 +00:00
Ruslan Ermilov
bc19e3ee42 Retire now useless userconfig_script_*. 2004-09-30 18:23:35 +00:00
Ruslan Ermilov
9fd3ae4889 The value of $interpret is "OK", in uppercase. 2004-09-30 17:12:05 +00:00
Ruslan Ermilov
25d34c013f Fixed the default value of the $prompt variable, document what
happens if $prompt is unset.
2004-09-30 17:11:26 +00:00
Ruslan Ermilov
ced68b5b2c Setting dump device from loader(8) has not been supported since 2002. 2004-09-30 15:27:37 +00:00
Ruslan Ermilov
818d0cba7f The default value of "bootfile" has been "kernel" since 2000. 2004-09-30 14:06:03 +00:00
Ruslan Ermilov
a9ad4b2bc7 Mention "help index" in the online help, and provide a help for
the `?' command.
2004-09-30 13:47:30 +00:00
Ruslan Ermilov
cf52f7c4de Added support for the -D boot option. 2004-09-30 13:11:55 +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
Ruslan Ermilov
af9cb375e8 `?' is not the same as "help index". 2004-09-30 12:16:23 +00:00
Ruslan Ermilov
4d0cb59f0f Fixed exiting from pager using the `q' key while paging
"help index" or "help <topic>" with list of subtopics.
2004-09-29 13:43:55 +00:00
Pawel Jakub Dawidek
12f5309d62 Document vfs.root.mountdelay value.
Reminded by:	ru
2004-09-24 09:33:48 +00:00
Marcel Moolenaar
759e38dbbe Remove. This file was repocopied to ../ski. 2004-09-24 04:49:32 +00:00
Marcel Moolenaar
8da69dadbe Replace misuse of NULL with 0UL. 2004-09-24 04:40:28 +00:00
Marcel Moolenaar
9ba97f7322 Remove the dependency on the Intel EFI headers in sys/boot/efi. Instead
use <machine/efi.h> for the necessary definitions. This makes the EFI
code in sys/boot/efi totally unused, except for pure EFI loaders. As
such, maintenance and porting (to IA-32) of the EFI code is made as easy
as possible.
2004-09-24 04:35:07 +00:00
Marcel Moolenaar
7886b298bf Unhook libski and skiload and hook up ski. 2004-09-24 04:21:14 +00:00
Marcel Moolenaar
cf1dd2e903 Post repocopy build fixes. 2004-09-24 04:06:22 +00:00
Marcel Moolenaar
f3a21ad7c6 Redefine a PTE as a 64-bit integral type instead of a struct of
bit-fields. Unify the PTE defines accordingly and update all
uses.
2004-09-23 18:37:36 +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
Marcel Moolenaar
6e2faf455e Remove useless include of <machine/fpu.h>. 2004-09-18 21:18:44 +00:00
John Baldwin
ca9b2364c3 A long, long time ago in a CVS branch far away (specifically, HEAD prior
to 4.0 and RELENG_3), the BTX mini-kernel used paging rather than flat
mode and clients were limited to a virtual address space of 16 megabytes.
Because of this limitation, boot2 silently masked all physical addresses
in any binaries it loaded so that they were always loaded into the first
16 Meg.  Since BTX no longer has this limitation (and hasn't for a long
time), remove the masking from boot2.  This allows boot2 to load kernels
larger than about 12 to 14 meg (12 for non-PAE, 14 for PAE).

Submitted by:	Sergey Lyubka devnull at uptsoft dot com
MFC after:	1 month
2004-09-18 02:07:00 +00:00
Yoshihiro Takahashi
cede9ec016 MFi386: revision 1.56 (Add -fno-unit-at-a-time to CFLAGS). 2004-09-18 00:12:04 +00:00
Ken Smith
a6406834da Back out v1.24. v1.40 of sys/sparc64/sparc64/bus_machdep.c fixes the
problem this hack was put in place for.

MFC to be done if the fix to bus_machdep.c is MFC-ed.
2004-09-08 12:52:45 +00:00
Ian Dowse
941fdb393b Add the loader side of support for preloading ELF relocatable object
format modules, which are currently only used on the amd64 platform.
This initial implementation just parses enough of the module to
allow it to extract dependencies and load all the bits into the
right place in memory, so the kernel must still do the full relocation
and linking. The details of the loaded sections are passed to the
kernel by supplying a copy of the ELF section header table as module
metadata with the MODINFOMD_SHDR tag.
2004-08-29 00:48:42 +00:00
Ian Dowse
45b8d7c46e Separate out the ELF relocation code from the ELF loader, and add
better relocation support for the amd64 and i386 platforms. This
should not result in any change in functionality, but moves a step
towards supporting the relocatable object file modules on amd64.

The same hack/trick as load_elf*.c uses is used here to simultaneously
support both elf32 and elf64 on amd64 and i386.
2004-08-28 23:03:05 +00:00
Ian Dowse
c0b43624d5 Add a few helper functions for zeroing kernel space and reading
from specified file offsets. Make use of these in load_elf.c.
2004-08-28 14:57:34 +00:00
Yaroslav Tykhiy
a30e1135b4 Don't be too smart, just try packet mode of INT13 first.
This way of operation is more robust than the "AI" used
before.

Add flags to mbr accessible from make.conf as BOOT_MBR_FLAGS.
Only one flag is defined now, "allow using packet mode", which
is 0x80 in accord with the rest of i386 boot code.  The "packet"
flag is on by default.

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:39:35 +00:00
Yaroslav Tykhiy
57888b4c83 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
Yaroslav Tykhiy
9e4211a1b8 B1FLAGS -> BOOT_BOOT1_FLAGS, which is consistent with
naming of other boot-related make vars.
2004-08-27 15:01:56 +00:00
David E. O'Brien
8ae136ae71 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 Konovalov
d4c8cbf109 Trim EOL white spaces. 2004-08-22 08:57:05 +00:00
Maxim Konovalov
022c9a28ee 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 Moolenaar
fa1fc9094a 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 Moolenaar
dc2492d303 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
Ken Smith
7a4cf071fc 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
Peter Grehan
523c8e33e4 Remove NOMAN so loader man pages are installed.
Noticed by:	ru
2004-08-18 11:31:00 +00:00
Maxim Konovalov
4233992afa Bump the manpage date.
Noticed by:	ru
2004-08-18 09:39:24 +00:00
Maxim Konovalov
ac92ad1b5d Retire hw.pci.allow_unsupported_io_range.
PR:		bin/70533
Submitted by:	Gavin Atkinson
2004-08-18 09:25:55 +00:00
Marius Strobl
39513fa664 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 Moolenaar
0797d69c78 Catch up with change to <machine/pte.h>. 2004-08-10 02:08:57 +00:00
John-Mark Gurney
bd8fc733cb 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
Alexander Kabaev
2939c8a0b9 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
Peter Grehan
1f302e5357 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
Peter Grehan
d4a57a3131 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
Yoshihiro Takahashi
c80f54d479 Fix new compiler error (s/bcopy/memcpy/). 2004-07-30 09:42:04 +00:00
Alexander Kabaev
3cd25b7e7b 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
Alexander Kabaev
1bc32c1ffc Clean up local memcpy implementation to take void * parameters. 2004-07-30 00:33:09 +00:00
Ceri Davies
4529da5f33 Correct a documentation bug.
Approved by:	jhb
2004-07-29 20:09:25 +00:00
Ceri Davies
b2e74e8249 Correct typo in a comment.
Approved by:	jhb
2004-07-29 20:08:40 +00:00
Alexander Kabaev
d9eedfd93c Define our own memcpy here instead of relying on GCC to provide one. 2004-07-28 06:03:27 +00:00
Marcel Moolenaar
1701be6ed4 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 Moolenaar
8af8df6452 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
Seigo Tanimura
10ad45d2fc Rename snd_pcm as sound. 2004-07-16 07:24:20 +00:00
Brian Somers
0ac4013324 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 Somers
59e1ebc9b5 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
Peter Grehan
744b9a014d 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
Peter Grehan
79c8d45fce 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
Peter Grehan
c727d17006 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
Peter Grehan
ff6e6584fc 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
Peter Grehan
4bb04ec4eb 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
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Stefan Farfeleder
5908d366fb 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
Ruslan Ermilov
69cc5b91a0 Fixed what appeared to be a hard sentence break. 2004-07-02 21:49:22 +00:00
Paul Saab
b7c29ad503 When building a kernel or the loader, let the hostname be overridden 2004-07-01 06:40:12 +00:00
Josef El-Rayes
06fc89cc3a Remove the entry for configuring pcm0 mixer channels.
This is accomplished via device.hints now.
2004-06-24 17:49:18 +00:00
Christian Brueffer
c3a2ac100e Throw out pfsync and pflog, the modules were removed 2004-06-22 22:57:13 +00:00
John Baldwin
becfd988a3 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
John Baldwin
3c077ec681 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 El-Rayes
a8c51f82b1 Document the possibility of setting default values for
mixer channels via boot loader.
2004-06-20 15:58:24 +00:00
Poul-Henning Kamp
d33ccadc81 Save a couple of bytes for the SIO case. 2004-06-17 12:02:25 +00:00
Poul-Henning Kamp
1400886b92 Fix another beak.
Seen by:	pjd
2004-06-17 11:44:05 +00:00
Poul-Henning Kamp
ad165b6f6d Unspam sys/boot, the dev_t commit should not have touched these.
Spotted by:	peter
2004-06-16 18:21:22 +00:00
Poul-Henning Kamp
0e69b1a1c7 My new keyboard can't spell. 2004-06-16 17:03:18 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
Poul-Henning Kamp
4ee9ad6b13 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
Poul-Henning Kamp
f89485e2b1 Merge boot0 and boot0sio so they behave the same. 2004-06-11 09:45:18 +00:00
Poul-Henning Kamp
d7d485798f 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
Nate Lawson
2c0d74e8e8 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
Ruslan Ermilov
f8aa392b11 Markup fixes. 2004-05-16 22:51:36 +00:00
Olivier Houchard
9049715ff9 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
Ruslan Ermilov
237266b2e6 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
Ruslan Ermilov
b09ce52594 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
Olivier Houchard
b791f3fb91 Do not attempt to build anything in sys/boot for arm. 2004-05-14 13:34:53 +00:00
John Polstra
15a3ddef19 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
Ruslan Ermilov
3c96564d00 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
Yoshihiro Takahashi
dd4d0b14e8 MFi386: revisions from 1.15 to 1.17. 2004-04-29 08:24:57 +00:00
Yoshihiro Takahashi
798f9e7fa0 MFi386: revisions from 1.16 to 1.18. 2004-04-29 08:24:30 +00:00
Ruslan Ermilov
848c1050ee 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
Ruslan Ermilov
dfca089741 Properly merge boot0sio.s and boot0.s into boot0.S. 2004-04-28 21:14:40 +00:00
Ruslan Ermilov
df1a364da7 Switch to using C99 comments in assembler preprocessed with cpp(1). 2004-04-28 20:55:01 +00:00
Ruslan Ermilov
69dd73b976 - 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
Ruslan Ermilov
6886d8ff2a Temporary precaution measure until repocopy requests are
processed: don't forget to clean generated .s sources.
2004-04-28 16:16:16 +00:00
Ruslan Ermilov
edfa817773 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
Ruslan Ermilov
1e104f00e7 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
Ruslan Ermilov
d1974eb1c5 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
Ruslan Ermilov
4b35719adf 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
Ruslan Ermilov
37e931894e - 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
Ruslan Ermilov
c9be1bb2f8 Removed now redundant CLEANFILES assignments.
Not read enough of my patch by:	obrien ;)
2004-04-27 19:45:16 +00:00
Poul-Henning Kamp
f025129b8a 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
David E. O'Brien
a606451bd2 Use a more compact syntax for passing the "binary" options to 'ld'. 2004-04-25 20:36:44 +00:00
David E. O'Brien
a50d1c0876 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
David E. O'Brien
d2f313a8ae Fix a last second typo in 'vi' that caused a problem. 2004-04-20 13:34:18 +00:00
David E. O'Brien
a3ab3e07c5 White space style cleanup. 2004-04-20 03:15:59 +00:00
David E. O'Brien
6773834a49 MFp4: merge version #5 of the 2-sector boot0 from the "jhb boot" branch. 2004-04-19 19:31:48 +00:00
Colin Percival
851c07559f 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