Jake Burkholder
8be89d4719
Add code to copy the enironment and loader metadata into kernel space.
2001-10-30 06:37:36 +00:00
Jake Burkholder
a237ed036e
Add definitions for network support, doesn't work yet.
...
Pass the right arguments to the kernel.
Replace magic numbers with symbolic constants.
Pass the real openfirmware entry point to OF_init.
2001-10-30 06:31:45 +00:00
Jake Burkholder
073e92a52c
Use ENTRY() for defining functions in asm.
...
Remove asm functions to call the openfirmware and kernel entry points;
we can just call them directly.
Don't use the stack pointer for an intermediate result in setx.
Put the stack in the bss.
2001-10-30 06:27:34 +00:00
Jake Burkholder
eea923d7f8
Make the openfirmware entry point function pointer non-static so that it
...
can be passed to the kernel.
2001-10-30 06:23:32 +00:00
Marcel Moolenaar
997313be99
Set RB_MULTIPLE (multiple console support) if the kernel is booted
...
with the -D flag.
2001-10-29 01:11:40 +00:00
Ruslan Ermilov
ff0c93cc0e
Just use ${MACHINE}, it's already special-casing pc98.
2001-10-25 09:05:47 +00:00
Doug Rabson
4abfff1e2e
Call ExitBootServices and disable interrupts before we start hacking
...
the VM registers. This ought to make things slightly more reliable here.
2001-10-25 08:53:39 +00:00
Doug Rabson
7d5af294dc
Add the two sections used for PLT entries to the text and sdata sections
...
respectively. This makes IPLTLSB relocations work properly (these are
generated for weak symbols, particularly for _longjmp).
2001-10-25 08:50:14 +00:00
Doug Rabson
88f5f7ac50
Try to get the self-relocator to work with IPLTLSB relocations. Doesn't
...
work right though - I can't figure out why.
2001-10-24 20:14:49 +00:00
Jonathan Lemon
22dc069c24
Set RB_MULTIPLE (multiple console support) if the kernel is booted
...
with the -D flag.
2001-10-23 20:27:48 +00:00
Jonathan Lemon
c80bd6e378
Allow the RBX_DUAL flag to appear in bootinfo.
2001-10-23 20:27:05 +00:00
Yoshihiro Takahashi
aa0abed214
Use a array to convert from a attribute for AT to one for PC98.
...
(merged from sys/pc98/pc98/scvtbpc98.c)
2001-10-17 15:15:01 +00:00
Yoshihiro Takahashi
f49ccfe990
Merged from sys/boot/i386/libi386/vidconsole.c revisions 1.16, 1.17 and 1.18.
2001-10-17 14:41:50 +00:00
Yoshihiro Takahashi
2967d8485e
fix style(9)
2001-10-17 14:17:11 +00:00
Yoshihiro Takahashi
60e0796757
Merged from sys/boot/i386/loader/Makefile revision 1.54.
2001-10-17 14:13:36 +00:00
Robert Drehmel
aa5bde88b1
Add a prototype for OF_alloc_phys.
2001-10-15 14:43:38 +00:00
Robert Drehmel
8414482077
Fix some warnings.
2001-10-15 14:40:36 +00:00
Robert Drehmel
2727d8ffc8
Add the FreeBSD/sparc64 boot loader source files.
2001-10-15 14:35:39 +00:00
Robert Drehmel
7081e52987
Make the ofw_reg structure and ofw_alloc_heap 64-bit save.
2001-10-15 12:16:20 +00:00
Robert Drehmel
fc06896610
Add a Makefile for the sparc64 boot loader.
2001-10-15 10:36:35 +00:00
Robert Drehmel
d729d0aa31
Do not include openfirm.h; it is now included by libofw.h.
2001-10-15 09:52:38 +00:00
Robert Drehmel
66631c00de
- Use the cell_t type definition for Open Firmware arguments in
...
combination with requisite casts as this avoids fatal side
effects on 64-bit architectures.
- Add the OF_alloc_phys function.
2001-10-15 09:51:09 +00:00
Robert Drehmel
1da9b140b7
- Fill dummy functions with code to read from disk using Open
...
Firmware.
- Add a temporary disklabel header to boot off a NetBSD/sparc64
partition. This file can be deleted when we have got a FCode
bootblock.
The disklabel header was obtained from NetBSD.
2001-10-15 09:35:40 +00:00
Robert Drehmel
7ff1bab73b
- Include openfirm.h for phandle_t.
...
- Add some necessary members to the ofwdisk structure.
- Add a prototype for ofw_parseofwdev.
2001-10-15 09:28:07 +00:00
Robert Drehmel
cdfc68815b
Add a function for parsing an Open Firmware boot path into the
...
ofw_devdesc structure.
2001-10-15 09:25:30 +00:00
Robert Drehmel
8716f26121
- Add an ifdef guard.
...
- Use unsigned types for the (32-bit) Open Firmware device handles
to avoid sign extension on 64-bit architectures.
- Add a standard type definition for Open Firmware arguments.
2001-10-15 09:02:03 +00:00
Doug Rabson
65601f6da8
Fix typo in comment.
2001-10-11 13:47:20 +00:00
Marcel Moolenaar
8daca20f62
s/alpha/${MACHINE_ARCH}/g
2001-10-08 01:41:45 +00:00
Benno Rice
225845627b
Whitespace fixes.
2001-10-07 13:27:27 +00:00
Benno Rice
a6bfff4582
Add new files needed by previous commit.
2001-10-07 13:24:56 +00:00
Benno Rice
cae2c81dc2
Mega-patch for OpenFirmware loader support.
...
- Flesh out ofw_readin routine.
- Add OpenFirmware load and exec routines.
- Make sure memory allocation for the kernel is done correctly.
- Change the way the heap is allocated so as to make it easier to deallocate
when we hand over.
- Add a command to print memory maps similar to the one for ia64.
With this patch, I can now load and hand over to a kernel on my iMac. There
are some problems with OpenFirmware routines failing after the hand over that
still need to be addressed.
2001-10-07 13:22:25 +00:00
John Baldwin
69ad5bdd3f
Whitespace fixes.
2001-10-04 10:18:00 +00:00
Kazutaka YOKOTA
82fe828980
Fix the ANSI color escape sequence \E[m.
...
- Corretly map the ansi color number to a PC BIOS color.
- Handle multiple arguments to the escape sequence.
2001-10-02 13:11:35 +00:00
Kazutaka YOKOTA
4238458ba2
Fix the local macro: isvisible().
...
- The space char (0x20) IS a visible char :-)
2001-10-02 09:13:07 +00:00
Mike Silbersack
0742c2bb67
grammar fix: to -> too
2001-10-01 23:41:13 +00:00
Kazutaka YOKOTA
b827a63aa6
Fix the function CD(): "Clear to the end of the screen".
...
- When the video BIOS is called to clear the region (x, y)-(79, 24)
(by scrolling), the slashed region in Fig.1 is cleared. CD() is
supposed to clear the region shown in Fig.2.
x x
+-------+ +-------+
| | | |
y| ////| y| ////|
| ////| |///////|
| ////| |///////|
+-------+ +-------+
Fig.1 Fig.2
- Don't move the cursor during this operation.
2001-10-01 11:48:02 +00:00
Kazutaka YOKOTA
6c8e596705
This is white-space only change. No functional difference.
...
- Be consistent about placing spaces around keywords and
operators; don't mix statements like "if(A==B)" and "if (X == Y)",
"return(0)" and "return (-1)", "P=10" and "Q = 0", etc.
- Consitently indent lines. It's not good to indent by 8 columns
in one part of the file, and by 4 columns in the other part.
2001-10-01 11:42:25 +00:00
Peter Wemm
4d7552180d
Make this 'make obj' safe
2001-09-26 00:13:08 +00:00
Doug Rabson
5f802bfc9f
Calculate the valid flag for ITRs and DTRs correctly. Also fix a couple
...
of minor problems and remove some debugging code.
2001-09-25 19:44:19 +00:00
Doug Rabson
9164a3125a
Add commands to dump the itrs and dtrs.
2001-09-24 19:39:34 +00:00
Doug Rabson
bc14d41c7e
Return the mapkey which EFI gave us when we read the memory map - we need
...
it to call ExitBootServices.
2001-09-24 19:37:44 +00:00
Doug Rabson
6544e18249
Tidy up a little - don't try to print anything or enable interrupts after
...
we start changing translation registers. Also, call ExitBootServices
before we jump into the kernel.
2001-09-24 19:36:45 +00:00
Doug Rabson
6dd44dacaa
Pick up pal.s from the kernel sources.
2001-09-24 19:31:44 +00:00
Doug Rabson
0f34719cf5
Add commands to dump the configuration tables and the SAL System Table.
2001-09-23 10:28:01 +00:00
Doug Rabson
e565888bc5
Add EFI network support.
2001-09-22 19:12:30 +00:00
Doug Rabson
1271403685
* Flesh out elf_exec and bootinfo.
...
* Add EFI network support.
2001-09-22 19:10:56 +00:00
Doug Rabson
f066622bdd
Add getsecs() for the libstand network code.
2001-09-22 18:33:09 +00:00
Doug Rabson
81d63063b1
Add a twiddle meter when reading from files. Gives me something to look
...
at when a kernel is loading from a floppy.
2001-09-22 18:31:02 +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
Maxim Sobolev
0f2c85b335
Add support for loading bzip2-compressed kernels and modules. This support
...
is turned off by default and could be enabled by defining LOADER_BZIP2_SUPPORT
make variable. Also make gzip support optional (turned on by default) -
it could be turned off via LOADER_NO_GZIP_SUPPORT make variable.
Please note, that due to limit on the amount of memory available to the
loader(8), it is possible to load modules/kernels compressed with the smallest
block size supported by the bzip2 - 100k (`-1' bzip2(1) option), however
even in this mode bzip2(1) usually provides better compression ratio than
gzip(1) in its best compression mode.
MFC after: 1 month
2001-09-18 14:52:36 +00:00
Yoshihiro Takahashi
8017b4dceb
MFi386: sys/boot/i386/loader/main.c revision 1.24.
2001-09-16 05:22:51 +00:00
Yoshihiro Takahashi
cd8b058539
MFi386: sys/boot/i386/libi386/Makefile revision 1.20.
2001-09-16 05:22:27 +00:00
Doug Rabson
c5620b0763
Add a fake memory descriptor for the I/O port space.
2001-09-15 18:29:42 +00:00
Doug Rabson
8b43a51e12
Fill in the bootinfo's memory map.
2001-09-15 09:53:56 +00:00
Doug Rabson
fb63a84609
Remove dead code.
2001-09-15 08:25:16 +00:00
Doug Rabson
28d7d2f0a0
Plug in ELF backend.
2001-09-14 08:28:17 +00:00
Doug Rabson
327b34100f
Add ELF backend to the build.
2001-09-14 08:27:49 +00:00
Doug Rabson
f19fa0b627
Make this do the right thing (mostly). We should still reserve the pages
...
that the kernel loads into using the EFI AllocatePages call.
2001-09-14 08:26:00 +00:00
Doug Rabson
f0f40e4c2a
Update code which creates bootinfo.
2001-09-13 12:49:02 +00:00
Doug Rabson
908e8cb5be
A command file for SKI which runs the loader up to the first instruction
...
of the loaded kernel.
2001-09-12 15:08:49 +00:00
Ruslan Ermilov
188cdfac56
Create backup copies using install(1).
2001-09-12 10:25:50 +00:00
Doug Rabson
9b36a30ee4
Build ficl on all architectures.
2001-09-12 08:35:05 +00:00
Doug Rabson
3a19b480c8
Add a version of the loader which runs under SKI, the HP ia64 simulator.
...
This loader is quite functional and can load and run kernels. The kernels
don't quite work right after loading but that should be easily fixable.
2001-09-12 08:34:27 +00:00
Peter Wemm
505222d35f
Implement the long-awaited module->file cache database. A userland
...
tool (kldxref(8)) keeps a cache of what modules and versions are inside
what .ko files. I have tested this on both Alpha and i386.
Submitted by: bp
2001-09-11 01:09:24 +00:00
Doug Rabson
9d2535d919
Add missing entry to memory type name table and adjust field widths.
2001-09-08 12:32:12 +00:00
Doug Rabson
3146b2d65c
Add a command 'memmap' to print out the EFI memory map.
2001-09-08 12:21:37 +00:00
Doug Rabson
96bf6ac71e
Hook up the native EFI filesystem reader.
2001-09-07 08:52:53 +00:00
Doug Rabson
fc2b065c41
Set currdev and loaddev variables.
2001-09-07 08:52:26 +00:00
Doug Rabson
f77b61980e
Add a libstand filesystem for accessing EFI native filesystems.
2001-09-07 08:51:48 +00:00
Doug Rabson
b827e60e65
Reformat.
2001-09-07 08:49:47 +00:00
Doug Rabson
76897a893f
Merge linker set relocations with the rest.
2001-09-05 13:36:41 +00:00
Doug Rabson
8e8dc221a6
Enable bootforth.
2001-09-04 14:48:59 +00:00
Doug Rabson
1a4f097e7a
Avoid an alignment fault on 64bit architectures.
...
Reviewed by: dcs
2001-09-04 13:13:12 +00:00
Doug Rabson
772d958c9f
Make sure we copy over the linker set sections to the EFI executable.
2001-09-04 08:59:38 +00:00
Doug Rabson
350ee9804b
Add definition for arch-ia64.
2001-09-04 08:51:15 +00:00
Doug Rabson
10357ecd95
Add ia64 system dependancies.
2001-09-04 08:50:23 +00:00
Bruce Evans
573e0948ea
Don't clobber the default for CFLAGS.
...
Reviewed by: dfr
2001-08-31 11:01:20 +00:00
Mike Smith
595aba526e
Mention that the ACPI module load can be disabled by unsetting $acpi_load
2001-08-30 01:05:28 +00:00
Mike Smith
ad41f9a8f7
Teach the loader how to find the system ACPI information, and autoload
...
the ACPI module if the system apperars to be ACPI compliant.
This is an initial cut; the load should really be done by Forth support
code, and we should check both the BIOS build date and a blacklist.
2001-08-30 00:42:12 +00:00
Benno Rice
035dbc3cb5
Pass NULL instead of MAXPHYS to the DMA allocation method. Be a bit more
...
verbose if we fail to allocate the DMA buffer.
2001-08-26 07:07:47 +00:00
Peter Wemm
94ad1d3eb7
OK, now I am scared of pxeldr. It had /boot/loader appended onto
...
the end of it and decoded the headers.
Submitted by: jhb
2001-08-22 08:02:01 +00:00
Peter Wemm
89ea00a7d8
Generate an ELF /boot/loader instead of fake a.out. The fake a.out wrapper
...
did not work with old a.out-only bootblocks anyway. :-(
2001-08-22 05:29:25 +00:00
Ruslan Ermilov
3faf1df3a7
mdoc(7) police: markup nits.
2001-08-20 08:55:07 +00:00
Matthew Dillon
2f9e4e8025
Limit the amount of KVM reserved for the buffer cache and for swap-meta
...
information. The default limits only effect machines with > 1GB of ram
and can be overriden with two new kernel conf variables VM_SWZONE_SIZE_MAX
and VM_BCACHE_SIZE_MAX, or with loader variables kern.maxswzone and
kern.maxbcache. This has the effect of leaving more KVM available for
sizing NMBCLUSTERS and 'maxusers' and should avoid tripups where a sysad
adds memory to a machine and then sees the kernel panic on boot due to
running out of KVM.
Also change the default swap-meta auto-sizing calculation to allocate half
of what it was previously allocating. The prior defaults were way too high.
Note that we cannot afford to run out of swap-meta structures so we still
stay somewhat conservative here.
2001-08-20 00:41:12 +00:00
Ruslan Ermilov
c5e7e03a14
Spell "FreeBSD" with "F" and "BSD" in uppercase.
2001-08-13 16:33:00 +00:00
David E. O'Brien
9fd2cfcc2f
Style cleanup.
2001-08-10 22:31:05 +00:00
Ruslan Ermilov
94ba280c59
mdoc(7) police: join split punctuation to macro calls.
2001-08-10 17:35:21 +00:00
Mark Peek
7684ab55c6
Allow for text section alignment to properly align the "end" symbol at the
...
actual end of the section. The new gas (binutils) puts in additional padding
which was misaligning the concatenated btx loader.
Reported by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>,
Harti Brandt <brandt@fokus.gmd.de>
Tested by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>,
David Wolfskill <dhw@whistle.com>, ps
Reviewed by: jhb
MFC after: 1 day
2001-08-09 20:47:58 +00:00
John Baldwin
8b42d7fc11
Trim trailing whitespace.
2001-08-09 18:07:45 +00:00
John Baldwin
b0606ca15f
Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect
...
the first sector of the emulated floppy to contain a valid MS-DOS BPB that
it can modify. Since boot1 is the first sector of boot.flp, this resulted
in the BIOS overwriting part of boot1: specifically the function used to
read in sectors from the disk.
Submitted by: Mark Peek <mark@whistle.com>
Submitted by: Doug Ambrisko <ambrisko@ambrisko.com>
PR: i386/26382
Obtained from: NetBSD, OpenBSD (the example BPB)
MFC after: 1 month
2001-07-31 19:50:09 +00:00
Kris Kennaway
56bded8a29
s/adress/address/
...
Inspired by: OpenBSD
MFC After: 1 week
2001-07-23 12:05:27 +00:00
Robert Nordier
816aa3c0b5
Unset MAINTAINER.
2001-07-21 14:32:47 +00:00
Dima Dorfman
02c4d9cff7
Remove whitespace at EOL.
2001-07-15 08:21:37 +00:00
Doug Rabson
ecab3d453e
Make this build again after breakage from previous commits.
2001-07-10 16:18:20 +00:00
Dima Dorfman
70d51341bf
mdoc(7) police: remove extraneous .Pp before and/or after .Sh.
2001-07-09 09:54:33 +00:00
David Malone
5e209ca776
Get rid of some constness warnings.
2001-06-24 12:08:47 +00:00
KATO Takenori
b6da22604e
Merged from sys/boot/i386/btx/btx/btx.s revision 1.25.
2001-06-23 08:04:14 +00:00
Peter Wemm
47f1082c4f
Remove -DNEW_LINKERSET, it is not used here anymore. This is now native.
2001-06-21 00:08:23 +00:00
Peter Wemm
5c9321595d
Convert the elf loader to the new linker set layout for elf files.
...
This should make dependencies at load time work like before. Oops.
Noticed by: markm
2001-06-19 07:41:07 +00:00