Commit Graph

911 Commits

Author SHA1 Message Date
fenner
5c86756d5c Initialize first to -1; this will create a (nearly) empty file on failure,
instead of looping until the disk is full.  This kind of failure can
especially happen when a version of awk that doesn't support POSIX
character classes is used.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-07 17:53:25 +00:00
jhb
a4e77dae6a Remove a few more debugging bits and turn on twiddle output while reading
from the CD.  This turns off the dual console output to COM1.
2001-11-07 01:20:33 +00:00
iwasaki
37688d6327 Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.
- Add S4BIOS sleep implementation.  This will works well if MIB
   hw.acpi.s4bios is set (and of course BIOS supports it and hibernation
   is enabled correctly).
 - Add DSDT overriding support which is submitted by takawata originally.
   If loader tunable acpi_dsdt_load="YES" and DSDT file is set to
   acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml),
   ACPI CA core loads DSDT from given file rather than BIOS memory block.
   DSDT file can be generated by iasl in ports/devel/acpicatools/.
 - Add new files so that we can add our proposed additional code to Intel
   ACPI CA into these files temporary.  They will be removed when
   similar code is added into ACPI CA officially.
2001-11-06 15:00:30 +00:00
nyan
f6200bb4f8 MFi386: sys/boot/i386/loader/main.c revision 1.25 2001-11-06 12:31:56 +00:00
nyan
0975bb0246 MFi386: sys/boot/i386/libi386/Makefile revision 1.21 2001-11-06 12:31:05 +00:00
jhb
c719e36f58 - If we are booted via cdboot, use bc_add() to instantiate the cd0 device
from the loader.
- Cleanup extract_currdev() some and add support for setting the currdev
  to cd0 when booted via cdboot.
2001-11-05 19:03:01 +00:00
jhb
a4fb7c0967 Hook up the bioscd driver and the cd9660 filesystem. 2001-11-05 18:59:13 +00:00
jhb
094cb29b11 Add a device driver for the BIOS device for CD-ROM's booted via El Torito
no emulation mode.  Unlike other BIOS devices, this device uses 2048 byte
sectors.  Also, the bioscd driver does not have to worry about slices
or partitions.
2001-11-05 18:58:33 +00:00
jhb
c077e35a66 Add a DEVT_CD type for CD drivers. 2001-11-05 18:51:47 +00:00
jhb
1c85c21111 Trim all the extra debugging output including hexdumps, debug messages,
etc.  The only bit of debugging left is performing dual output to both
the screen and COM1.  Also, the twiddle is still disabled since it seems
to do weird things to the serial dump.  cdboot now has 880 bytes to spare.
2001-11-04 03:51:59 +00:00
jhb
b95616aa58 Axe the old cdldr. 2001-11-04 03:28:10 +00:00
jhb
677b4a24d6 Use the new cdboot instead of cdldr. 2001-11-04 03:27:06 +00:00
jhb
2515f10902 This is a new CD bootstrap utility designed to replace cdldr. According
to the El Torito standard for CD booting, a CD may boot in "No emulation"
mode without using a floppy image.  In this mode, the BIOS loads a program
off of the CD into memory and creates a BIOS device using 2048 byte sectors
for the CD.  According to the standard, this program can be up to 0xFFFF
virtual (512-byte) sectors long.  The old cdldr depended on this by having
the BIOS load the entire loader and the small cdldr stub as one binary
similar to pxeboot so that cdldr didn't have to read the CD to find the
loader.  However, the NT no emulation loader just uses 1 disk sector
(4 virtual sectors), so it seems that at least some BIOS writers just did
enough to get NT to boot by only loading 1 sector and ignoring the sector
count.  Thus, while cdldr should have worked in theory, it doesn't in
practice.  This replacment fits entirely in 1 sector and includes simple
ISO 9660 support.  It looks for /boot/loader on the CD and loads it up
using the BIOS.  This allows us to not have to depend on the limited size
of floppy images but use a full GENERIC kernel for CD-ROM installs in the
future, among other things.

This version of cdboot is a bit bloated as it includes some useful
debugging routines that people can pull to use in other x86 assembly
modules.  Even with all the debugging cruft, we still have 272 bytes to
spare.
2001-11-04 03:24:16 +00:00
jhb
c22f597592 Print out 'foo devices:' as the line before displaying a group of
devices in 'lsdev' output rather than printing out a pointer to the
print function since the user really could care less about the pointer
value.  Perhaps this was intended to be a debugging printf?
2001-11-04 02:58:39 +00:00
jhb
7079074a9c Whoops, missed these bits in the previous commit. 2001-11-03 22:21:21 +00:00
jhb
a4df14b208 Add support for sending messages to the serial console which is helpful
when debugging boot problems.  It is not on by default but is enabled via
the BTX_SERIAL variable.  The port and speed can be set via the same
variables used by boot2 and the loader.
2001-11-03 22:09:30 +00:00
jhb
f40c8aa82e Add support for outputting multiple lines when dumping memory during the
register dump.  Change the default to bump 2 lines of output (32 bytes)
instead of 1 line (16 byte).
2001-11-03 21:53:46 +00:00
jhb
008cbb2dde Add support for trace traps by returning from them just as for breakpoint
traps rather than halting.  Ideally, we should avoid printing the
'BTX halted' message for debug register dumps.
2001-11-03 21:42:25 +00:00
jhb
6bee569517 Output a newline at the end of a dump so that there are blank lines between
dumps when using breakpoints or tracing.
2001-11-03 21:40:47 +00:00
obrien
9bd91d26be Revert rev 1.3 which moved us away from POSIX character classes.
The community feels our base AWK must handle them.
2001-11-03 01:35:07 +00:00
obrien
8e8327cb31 Revert rev 1.7 which moved us away from POSIX character classes.
The community feels our base AWK must handle them.
2001-11-03 01:33:12 +00:00
mike
3df91ed4db o Add new header <sys/stdint.h>.
o Make <stdint.h> a symbolic link to <sys/stdint.h>.
o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99.
o Remove <sys/inttypes.h>.
o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h
  to reflect new location of integer types in <sys/stdint.h>.
o Remove previously symbolicly linked <inttypes.h>, instead create a
  new file.
o Add MD headers <machine/_inttypes.h> from NetBSD.
o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and
  include <machine/_inttypes.h> in <inttypes.h>, to fill in the
  remaining requirements for <inttypes.h>.
o Add additional integer types in <machine/ansi.h> and
  <machine/limits.h> which are included via <sys/stdint.h>.

Partially obtain from:	NetBSD
Tested on:		alpha, i386
Discussed on:		freebsd-standards@bostonradio.org
Reviewed by:		bde, fenner, obrien, wollman
2001-11-02 18:05:43 +00:00
nyan
40808c1936 Fixed sioreg.h path. 2001-11-02 15:15:09 +00:00
obrien
112eea5338 Substitute "[:space:]" with the character constants it expands to.
This was a silent 'failure' when using Bell-Labs awk.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-01 19:14:16 +00:00
obrien
3be11f77da Bell-Labs AWK does not support POSIX "bracket expressions" (POSIXese for
"character classes", basically).  So change them to their character
representation.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-01 07:16:35 +00:00
peter
364766b6e6 Fix the ILLEGAL fdisk table that is there for supporting "dangerously
dedicated" mode.  This was specifying that there are 256 (illegal!)
heads on the disk.  If bioses store that in a byte, and it gets truncated
to 0, then that almost certainly causes the infamous divide-by-zero
nightmare.

This is also most likely the reason why the Thinkpad T20/A20 series
were locking up when FreeBSD was installed.  This is also the most likely
reason why a boot1 being present causes an IA64 box to lock up at boot.
(removing the "part4" stuff from boot1.s fixes the IA64 boxes and would
most likely have fixed the T20/A20 and some TP600E series thinkpads)
2001-11-01 06:19:32 +00:00
jake
cf11e2a00d Add code to copy the enironment and loader metadata into kernel space. 2001-10-30 06:37:36 +00:00
jake
db9bc81630 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
2fe78b0a1e 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
36e649fc50 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
ff26515539 Set RB_MULTIPLE (multiple console support) if the kernel is booted
with the -D flag.
2001-10-29 01:11:40 +00:00
ru
591b34de05 Just use ${MACHINE}, it's already special-casing pc98. 2001-10-25 09:05:47 +00:00
dfr
ec791e2f38 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
dfr
1455d39753 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
dfr
eb865e7656 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
jlemon
fa5eeb011c Set RB_MULTIPLE (multiple console support) if the kernel is booted
with the -D flag.
2001-10-23 20:27:48 +00:00
jlemon
66b3b14455 Allow the RBX_DUAL flag to appear in bootinfo. 2001-10-23 20:27:05 +00:00
nyan
4bff7137a2 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
nyan
ee5a768271 Merged from sys/boot/i386/libi386/vidconsole.c revisions 1.16, 1.17 and 1.18. 2001-10-17 14:41:50 +00:00
nyan
bc3aadffa1 fix style(9) 2001-10-17 14:17:11 +00:00
nyan
097a07c676 Merged from sys/boot/i386/loader/Makefile revision 1.54. 2001-10-17 14:13:36 +00:00
robert
c9e9bef4c3 Add a prototype for OF_alloc_phys. 2001-10-15 14:43:38 +00:00
robert
ffc6df5e2b Fix some warnings. 2001-10-15 14:40:36 +00:00
robert
c710d21b7e Add the FreeBSD/sparc64 boot loader source files. 2001-10-15 14:35:39 +00:00
robert
7c8b327153 Make the ofw_reg structure and ofw_alloc_heap 64-bit save. 2001-10-15 12:16:20 +00:00
robert
d4a2167afc Add a Makefile for the sparc64 boot loader. 2001-10-15 10:36:35 +00:00
robert
ceb5e8e962 Do not include openfirm.h; it is now included by libofw.h. 2001-10-15 09:52:38 +00:00
robert
0d8645d083 - 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
239df19262 - 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
8e79c738e5 - 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