Commit Graph

55 Commits

Author SHA1 Message Date
Jung-uk Kim
2be4e4713a Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
Marcel Moolenaar
0463b4a2fb Major rework of the ia64 loaders. The two primary objectives are:
1. Make libefi portable by removing ia64 specific code and build
   it on i386 and amd64 by default to prevent regressions. These
   changes include fixes and improvements over previous code to
   establish or improve APIs where none existed or when the amount
   of kluging was unacceptably high.
2. Increase the amount of sharing between the efi and ski loaders
   to improve maintainability of the loaders and simplify making
   changes to the loader-kernel handshaking in the future.

The version of the efi and ski loaders are now both changed to 1.2
as user visible improvements and changes have been made.
2006-11-05 22:03:04 +00:00
Marcel Moolenaar
11f8548a0d Properly calculate the checksum of the APIC table. 2006-11-03 04:04:19 +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
John Baldwin
be5d6589e0 Remove more Alpha bits from the boot code including fixing several
stale comments.
2006-05-12 04:09:53 +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
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
Warner Losh
6a0fd84b50 Start each of the license/copyright comments with /*- 2005-01-05 22:16:58 +00:00
Ruslan Ermilov
cbbdcac72a NOFORTH -> NO_FORTH 2004-12-21 12:32:15 +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
cf52f7c4de Added support for the -D boot option. 2004-09-30 13:11:55 +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
cf1dd2e903 Post repocopy build fixes. 2004-09-24 04:06:22 +00:00
Marcel Moolenaar
6e2faf455e Remove useless include of <machine/fpu.h>. 2004-09-18 21:18:44 +00:00
Warner Losh
9e127f523c Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core
2004-04-05 23:41:29 +00:00
Marcel Moolenaar
317872f26c Don't create a mapfile during link. It's not needed for the build. 2004-02-13 04:45:41 +00:00
Ruslan Ermilov
5c8f32a869 Tidy up makefiles.
Tested by:	marcel
2004-02-12 08:10:34 +00:00
Marcel Moolenaar
0bf2a7190a Fix the build of libski now that we use the "official" MADT table
definitions. Those are slightly different than the ones we used
before ACPI-CA 20031203 got imported. No structural or functional
change.
2003-12-09 08:35:17 +00:00
Marcel Moolenaar
2e55d247a6 Implement PAL_HALT_LIGHT now that the kernel halts the processor
when idle. All we have to do is return.
2003-11-09 07:42:16 +00:00
Marcel Moolenaar
84408cc05c Do not strip skiload when installed. The stripped binary does not load
in the simulator.
2003-11-09 06:53:37 +00:00
David E. O'Brien
7d4724590e Use __FBSDID().
Also some minor style cleanups.
2003-09-08 09:11:32 +00:00
Marcel Moolenaar
c770dc0b63 Fix the ski loader, broken by the gcc upgrade. Update the linker
script to match the one for the EFI loader and rewrite __start()
in assembly to have gp defined without getting in the way of the
compiler.
2003-07-17 01:49:59 +00:00
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
Marcel Moolenaar
117f919160 Remove `#ifndef lint' left behind after previous change. 2003-04-04 02:12:56 +00:00
David E. O'Brien
8368cf8f75 Use __FBSDID rather than rcsid[]. 2003-04-03 21:36:33 +00:00
David E. O'Brien
a8896ec82d Consistently use NOFORTH to control the usage of ficl. 2003-02-26 06:18:52 +00:00
Marcel Moolenaar
344c6212b8 Simplify page alignment. 2003-02-20 06:47:54 +00:00
Marcel Moolenaar
dc00c828e3 Remove special casing for running in the simulator from the kernel
and instead add platform, firmware and EFI stubs to the loader.
The net effect of this change is that besides a special console and
disk driver, the kernel has no knowledge of the simulator. This has
the following advantages:
o  Simulator support is much harder to break,
o  It's easier to make use of more feature complete simulators.
   This would only need a change in the simulator specific loader,
o  Running SMP kernels within the simulator. Note that ski at this
   time does not simulate IPIs, so there's no way to start APs.

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

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

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

Tested with: ski (version 0.943 for linux)
2003-02-01 22:50:09 +00:00
Marcel Moolenaar
56eefde13d SSC calls use break immediate 0x80000. 0x80001 only works for
break.i. Ski is rather broken in this respect.
2003-02-01 21:38:36 +00:00
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
Peter Wemm
c692fbe091 At great personal risk, add a __packed and __aligned(x) define that
expand to __attribute__((packed)) and __attribute__((aligned(x)))
respectively.  Replace the handful of gcc-ism's that use
__attribute__((aligned(16))) etc around the kernel with __aligned(16).

There are over 400 __attribute__((packed)) to deal with, that can come
later.  I just want to use __packed in new code rather than add more
gcc-ism's.
2002-09-23 05:55:10 +00:00
Peter Wemm
92caa29d8e Add boot_serial and boot_multicons variables to set RB_SERIAL and
RB_MULTIPLE since this seems to be the easiest way to add these flags
for non-forth loaders etc.
2002-06-20 06:29:42 +00:00
Marcel Moolenaar
23c12a63cf o Remove namespace pollution from param.h:
-  Don't include ia64_cpu.h and cpu.h
   -  Guard definitions by  _NO_NAMESPACE_POLLUTION
   -  Move definition of KERNBASE to vmparam.h

o  Move definitions of IA64_RR_{BASE|MASK} to vmparam.h
o  Move definitions of IA64_PHYS_TO_RR{6|7} to vmparam.h

o  While here, remove some left-over Alpha references.
2002-05-19 04:42:19 +00:00
David E. O'Brien
d1bdfb40fd -ffreestanding is the word.
(also resort some CFLAGS such that the more "important" value are first so
they are easier to see)
2002-05-10 09:26:35 +00:00
Peter Wemm
1e7e1ea54d Set BINDIR 2002-04-07 04:26:42 +00:00
Peter Wemm
01c0b884af Make it a bit closer to the EFI build and tie up some loose ends. 2002-04-06 04:33:53 +00:00
Peter Wemm
402e50591a Do not add the ficl/alpha subdir to the ia64 include path. Try ficl/ia64
instead.
2002-04-06 04:16:58 +00:00
Marcel Moolenaar
cd2c8e3ef6 Pass the address of the bootinfo block to the kernel in register
r8. Keep it at the hardwired address for now. Bump the version.
2002-03-30 23:52:34 +00:00
Marcel Moolenaar
ede9f03a1a Fix the beforeinstall target. We install ${PROG}.help if loader.help
exists, otherwise we install it anyway. I interpret this as a very
high desire to install ${PROG}.help. Alas, ${PROG}.help doesn't exist
at the moment and neither does loader.help, so in practice this just
doesn't work, no matter how you interpret it. The compromise is to
install ${PROG}.help IFF it exists. I realize we lost creativity with
this commit, but style should have been preserved, AFAICT :-)
2002-03-29 22:53:56 +00:00
Marcel Moolenaar
b0d9287123 Duplicate the logic used elsewhere to define LIBSTAND. 2002-03-28 06:52:10 +00:00
Peter Wemm
1d7914a5bd Add -ffreestanding to avoid printf/puts/putchar conversions 2002-03-19 10:51:57 +00:00
Peter Wemm
de76c8189e Remove bootinfo.bi_kernel. It isn't used by the kernel. struct bootinfo
should go away on ia64, we should be loader metadata based since that is
the only way we can boot (loader, skiload).
2001-11-19 07:05:10 +00:00
Peter Wemm
a812f645bc Fix a dependency violation, same as in libefi/elf_freebsd.c a while back. 2001-11-19 06:59:53 +00:00
Peter Wemm
4d7552180d Make this 'make obj' safe 2001-09-26 00:13:08 +00:00
Doug Rabson
68176c8544 Add definition of SSC_GET_RTC. 2001-09-20 08:22:56 +00:00
Doug Rabson
447a0851af Implement time(). 2001-09-19 12:12:12 +00:00
Doug Rabson
c5620b0763 Add a fake memory descriptor for the I/O port space. 2001-09-15 18:29:42 +00:00