Commit Graph

457 Commits

Author SHA1 Message Date
David E. O'Brien
9b8d527fef Add ${AFLAGS} to 'as' invocation. 2003-06-07 17:42:26 +00:00
David E. O'Brien
9ad6ff5596 Don't use a C compiler to assemble a pure asm file. 2003-06-07 08:03:19 +00:00
Jun Kuriyama
5b63e8fcf0 Tweak make values and targets not to build kgzldr.o at
installation stage.

Reviewed by: bde
2003-06-06 13:49:51 +00:00
David E. O'Brien
9f2636a8cf Don't use a C compiler to assemble a pure asm file. 2003-06-02 02:37:27 +00:00
David E. O'Brien
3c5dad6ef0 Accpet '1'..'5' in place of F1..F5 for serial console users.
Reviewed by:	Bruce M Simpson <bms@spc.org>
2003-06-01 20:41:04 +00:00
Scott Long
832bb1e2d0 Enable the new bootloader for i386 only. The new loader.rc is will only
be installed if an old one does not exist, i.e. only during install, not
during upgrades.

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

Approved by:	re
2003-05-30 09:29:24 +00:00
Peter Wemm
728ec271c1 Fix a bug in the AMD64 trampoline. I misunderstood the implicit
32->64 bit zero extend.  This changes a movl to an orq.

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

Approved by:	re (amd64 stuff)
2003-05-11 22:42:29 +00:00
Peter Wemm
a5bd71a96d Argh. This was broken by the last-minute elf32/elf64/"elf kernel" changes. 2003-05-01 04:31:33 +00:00
Peter Wemm
2f0eeb54eb Nuke; repocopied to elf32_freebsd.c where it lives on. 2003-05-01 03:57:19 +00:00
Peter Wemm
48a0b96a50 Enable the i386 loader to load and run an amd64 kernel. If this puts
things over floppy size limits, I can exclude it for release builds or
something like that.  Most of the changes are to get the load_elf.c file
into a seperate elf32_ or elf64_ namespace so that you can have two
ELF loaders present at once.  Note that for 64 bit kernels, it actually
starts up the kernel already in 64 bit mode with paging enabled.  This
is really easy because we have a known minimum feature set.

Of note is that for amd64, we have to pass in the bios int 15 0xe821
memory map because once in long mode, you absolutely cannot make VM86
calls.  amd64 does not use 'struct bootinfo' at all.  It is a pure loader
metadata startup, just like sparc64 and powerpc.  Much of the
infrastructure to support this was adapted from sparc64.
2003-05-01 03:56:30 +00:00
Peter Wemm
d6d3ae55c3 ACPI will always be present on AMD64 - it will never be an autodetect
module.
2003-04-30 22:02:39 +00:00
Nate Lawson
51773ddf47 Support functions for the new ACPI import.
* AcpiOsDerivePciId(): finds a bus number, given the slot/func and the
    acpi parse tree.
  * AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to
    override the value for _OS.

Ideas from:	takawata, jhb
Reviewed by:	takawata, marcel
Tested on:	i386, ia64
2003-04-29 18:50:34 +00:00
Poul-Henning Kamp
197e5e73ef Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>

Move i386/pc98 specific bits from <sys/reboot.h> to
<i386/include/bootinfo.h> as well.

Adjust includes in sys/boot accordingly.
2003-04-04 16:35:16 +00:00
Ruslan Ermilov
e478cf0a5a Fixed CLEANFILES.
Submitted by:	cron
2003-02-25 15:41:49 +00:00
Poul-Henning Kamp
b04b95ab47 Build a file "boot" which consists of boot1 and boot2 concatenated.
There is little if any reason to treat the two components separately
and it will simplify disklabel(8) and libdisk if we didn't.
2003-01-26 13:33:57 +00:00
Poul-Henning Kamp
63fc86da6f Use NEXTDOSPART instead of MAX_SLICES. 2003-01-20 11:15:12 +00:00
David E. O'Brien
90949c8331 Simplify the Makefile by just using our standard PROG variable. 2003-01-18 23:09:56 +00:00
Warner Losh
b24431ad30 Save 4 more bytes by not initializing opts to 0. This moves it from
the data section to the bss section givig us initialization for free.

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

Reviewed by: jhb
MFC after: 3 days
2003-01-13 21:28:24 +00:00
David E. O'Brien
f62a945f30 RIP liloldr.
It is not complete (the LILO root= specification isn't passed to our
loader for instance), it has not been touched in over 2 years.  Linux has
moved on to GRUB, so this is OBE now.  If someone creeps up to work on it,
it could become a port.
2002-12-31 02:29:03 +00:00
David E. O'Brien
cf47cae1f5 -mno-align-long-strings can make things smaller, so lets use it in hopes
that it does here.
2002-12-21 02:03:31 +00:00
Warner Losh
1e315c9022 Put back the casts to unsigned. While no strictly necessary for its
current uses, the name strcmp has strong connotations that shouldn't
lightly be discarded.  This doesn't cost us anything.

Submitted by: bde
2002-12-20 05:49:40 +00:00
Jake Burkholder
7c6c018c0c Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c. 2002-12-19 19:34:59 +00:00
Warner Losh
79cfd4b63b I didn't intend to delete this rm from the Makefile. It snuck in at
the last second before the commit.

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

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

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

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

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

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

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

Remove assorted now unneeded hackery.

UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably
not within our reach, ever.
2002-12-14 19:44:13 +00:00
Poul-Henning Kamp
a22c4dc517 Remove unnecessary call to fsread(). 2002-12-14 19:40:35 +00:00
Poul-Henning Kamp
2bfe8dcc0a Always use the smaller GCC builtin memcpy 2002-12-14 19:15:27 +00:00
Poul-Henning Kamp
c176645976 Remove unused variable. 2002-12-14 19:09:37 +00:00
Poul-Henning Kamp
03fff82196 Don't fill in the table with the BIOS idea about disk-geometry, we don't
use it.  This saves a surprising number of bytes.
2002-12-14 17:34:28 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Poul-Henning Kamp
fb8b107e52 Correctly recognize both bogus and genuine BSD disklabels.
Don't expect me to participate in a discussion which is which.

Sponsored by:	DARPA & NAI Labs.
2002-11-03 21:47:55 +00:00
John Baldwin
66648a06a0 Revert MEM_USR back to 0xa000 for BTX clients. Instead, adjust boot2
to run at 0xc000 by changing its virtual start address from 0x1000 to
0x2000.

Tested by:	phk
2002-10-08 18:19:02 +00:00
Poul-Henning Kamp
c80ba0ad1b Now that ufsread.c doesn't do 64bit divide remainder operations,
don't bother with libkern.

Sponsored by:	DARPA & NAI Labs.
2002-10-08 15:49:35 +00:00
Poul-Henning Kamp
26baf05377 Save a couple of bytes by not returning ints nobody care about.
Sponsored by:	DARPA & NAI labs
2002-10-08 15:48:43 +00:00
Brian Feldman
3cfeca5326 Reinstate rev 1.36 with an important line that got missed. Note this
also improves the "random undocumented offsets into various memory
spaces" a little bit.
2002-10-08 12:09:16 +00:00
Poul-Henning Kamp
ae02ceb621 Remove unused TYPE_WD and TYPE_WFD. 2002-10-08 10:17:16 +00:00
Poul-Henning Kamp
ed025d6983 Correctly calculate dmadat: We need to take the address of _end, it's
contents is irrelevant and likely to be zero;

This doesn't change the resultant value, but it does save a couple of bytes
because &_end is constant.
2002-10-08 10:15:42 +00:00
Poul-Henning Kamp
a201162d71 Unbreak boot2 by backing out rev 1.36 to Makefile, which does not
work as advertised:

	bang# pwd
	/bang/src/sys/boot/i386/boot2
	bang# make clean >& /dev/null
	bang# cvs -q update -r 1.35 Makefile >& /dev/null
	bang# make >& /dev/null
	bang# cat /usr/obj/`pwd`/boot2.h
	#define XREADORG 0x725
	bang# cvs -q update -r 1.36 Makefile > & /dev/null
	bang# make clean > & /dev/null
	bang# make > & /dev/null
	bang# cat /usr/obj/`pwd`/boot2.h
	#define XREADORG 0x25
	bang#
2002-10-08 07:52:28 +00:00
Poul-Henning Kamp
68541f7c16 Save four bytes by shortening a string two chars.
Sponsored by:	DARPA & NAI Labs.
2002-10-08 07:06:24 +00:00
Brian Feldman
6c598ff615 Correct a bug in adding 0x700 to a number. 2002-10-07 22:21:16 +00:00
Poul-Henning Kamp
15cfc1833c Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.
Conditionalize the "XX bytes left" checks reference on UFS1/UFS12.

Conditionally build the necessary 64bit math for boot2 if UFS12.

Sponsored by:	DARPA & NAI Labs.
2002-10-07 21:36:06 +00:00
Poul-Henning Kamp
b410146034 Change the comment character from # to // in boot1.s and run
it through CPP so we can conditionalized things.

Sponsored by:	DARPA & NAI Labs
2002-10-07 20:56:09 +00:00
Poul-Henning Kamp
10aabd9039 Correctly adjust for moved start address.
It seems that the existence of a "depend" target in src/sys/boot is not
to be taken as an indication that it actually does what one would expect,
at least it clearly threw my testing off.

Apologies to:	jhb
2002-10-07 19:12:36 +00:00
Poul-Henning Kamp
dfaf0d8cf1 Correctly compensate for both offset and unoffset on-disk BSD disklabels.
Sponsored by:	DARPA & NAI Labs.
2002-10-07 13:11:28 +00:00