Commit Graph

294 Commits

Author SHA1 Message Date
drochner
dd0ed4267b add prototype 1999-04-14 11:19:23 +00:00
drochner
2d1e6a1f5a add prototypes, slight formatting changes 1999-04-14 11:17:04 +00:00
drochner
ffd8d7c6d0 add prototypes
being here, format ala KNF
1999-04-14 10:57:59 +00:00
drochner
7d5e1f9211 fix error handling: almost all errors were ignored 1999-04-09 20:12:57 +00:00
drochner
552f55e726 Call bi_getbiosgeom() after loadfile() returned successfully. This avoids
a memory leak if loadfile() gets an error.
1999-04-08 18:21:15 +00:00
drochner
0ead10436a define VERSIONFILE, from John Darrow <John.P.Darrow@wheaton.edu>
per PR port-i386/7336
1999-04-08 10:23:23 +00:00
drochner
5d86b86370 #ifdef out the last change for the branch 1999-04-01 19:36:09 +00:00
drochner
3497f157fd On serious boot errors, dont lock the machine. Instead, wait 3 seconds
and call the ROM BASIC vector. This might behave differently on different
machines, but normally it allows to reboot without power-cycling.
1999-04-01 17:07:54 +00:00
drochner
99a84ef740 sync to changed biosdisk interface again 1999-04-01 16:09:49 +00:00
fvdl
fb1b0e7a0b Shifting ecx without explicit prefix in real mode won't work. 1999-03-30 22:35:21 +00:00
drochner
17de7b2576 adapt to set_geometry change: we don't have to correct the geometry
anymore
1999-03-30 17:58:05 +00:00
drochner
62031ff978 fix some disk handling problems introduced in the last commits:
-read retries were botched, use the right sector count
-read-ahead buffer was effectively unused
-concentrate the handling of the weird BIOS geometry report at one place
-fallback for old floppies left cylinder count uninitialized
1999-03-30 17:55:48 +00:00
drochner
4feae58ec1 sync to changed geometry handling in the standalone code 1999-03-30 11:51:35 +00:00
fvdl
b815df141c Only use the total number of sectors information field from the EDD if
the bit is set that declares the geometry valid. The spec itself says
that this field isn't covered by the "geometry valid" bit, but at
least one BIOS implements it that way.
1999-03-28 19:41:27 +00:00
sommerfe
82f8a7dee9 Turn off biosboot_ser until makefile issues get worked out.. 1999-03-14 05:50:38 +00:00
fvdl
35d517b9f1 Hack to make biosboot_ser work.
XXX The makefile structure in src/sys/arch/i386/stand is very bad.
1999-03-14 00:04:06 +00:00
tron
32e0182e15 $(OBJS) -> ${OBJS} 1999-03-13 20:58:25 +00:00
sommerfe
fc47c0c742 Also build serial bootblocks by default, installing into
/usr/mdec/biosboot_ser.sym
Change Makefile.booters to not assume `version' file is in source directory.
1999-03-12 16:07:57 +00:00
sommerfe
df8e0043e3 Fix compile warning in getcomaddr() 1999-03-12 04:14:37 +00:00
fvdl
8371eb7a88 Clean up the BIOS disk matching code a bit (better naming, one structure
and sysctl to export to userland). Also, only use total number of sectors
given in the extended parameters if the physical chs geometry is
marked invalid. Hopefully fixes a problem where BIOSs would not correctly
fill in this field.
1999-03-12 01:01:41 +00:00
fvdl
bc38bb1052 Declare nhd to be unsigned char, as we're only copying one byte to it.
From Matthias Drochner.
1999-03-11 12:34:36 +00:00
drochner
b477d700f2 add support for 3c905b TX 1999-03-10 10:37:38 +00:00
fvdl
bdb770bc34 Create a list of native disks too, and make it retrievable. It contains
all matching BIOS disks per entry, so that we have complete match info.
Enable the matching code.
1999-03-10 01:28:24 +00:00
drochner
743494ae88 add a function to pass the "memory map" ie the outcome of INT15/0xe820,
to the kernel
1999-03-08 21:44:48 +00:00
drochner
0cb921e61e change the interface for getmementry() to hold the iterator in an
argument and to return success or error explicitely.
Now we can "error" and "end of list" cleanly; this should fix the
problem where the last list element was ignored.
1999-03-08 21:38:28 +00:00
fvdl
f8e221511b * query BIOS geometry information, possibly using the int 13 extensions.
* pass them on to the kernel
* print a message if the 2nd stage bootloader returns (i.e. fails)
  instead of just hanging.
1999-03-08 00:09:24 +00:00
he
e9f9c1625e Add handling of OMAGIC files, where exec header isn't part of the
text segment.  Needed for woring installboot, since biosboot.sym is OMAGIC.
1999-03-07 20:03:44 +00:00
fvdl
5a32d4bb8b Make bootblocks really work this time. From Christos. 1999-03-05 20:33:08 +00:00
christos
4b494ca224 Fix the symbol reading problem... 1999-03-04 20:46:23 +00:00
simonb
1397fd691b fix spel. 1999-03-01 12:46:16 +00:00
drochner
d57c7b76ca replace ENTRY() label in data segment which broke the code completely 1999-02-28 11:45:44 +00:00
drochner
9e8c9e9594 -pull in exec.c, needed since loadfile.c
-don't pull in tftp.c anymore, it's in libsa now
1999-02-24 19:38:17 +00:00
drochner
f1d1de8c7a moved to mi lib/libsa 1999-02-24 19:32:34 +00:00
drochner
eac4e51111 redirect the linker's stderr to the protocol file too 1999-02-19 19:53:01 +00:00
drochner
cb2e02af94 Make this compile and work again after the assembler update.
The new assembler doesn't allow 16-bit relocations involving arithmetics
with 32-bit variables. (The old one did silently truncate, which was
the right thing in our case.) Further, the new assembler uses to scatter
size prefixes around if the size of the operation is not explicitely
specified, even if the result is nonsense, eg for moves to segment
registers or control registers.
Add some debugging code (generating printouts) and comments.
Remove the !BOOTROM code which was intended for a DOS harness but isn't
that useful anymore.
Some cleanup and formatting to make it more similar to the other
startup code variants.
1999-02-19 19:48:06 +00:00
drochner
fd3ad59373 make the ethernet address an unsigned char array to avoid sign extension
when it is printed
1999-02-19 19:30:46 +00:00
drochner
0ce9e35aae add boot ROM support for the DMA-only 3com network adapters, tested with
3c900b-Combo only for now
1999-02-19 19:22:52 +00:00
dean
6dc3d1eae8 Put back bsd.own.mk and added comment explaining why it must be included. 1999-02-14 02:56:19 +00:00
lukem
dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
dean
c372a9b915 Remove bsd.own.mk include 1999-02-12 23:48:46 +00:00
cjs
8a3ac60bb8 Change NOMAN to MKMAN. 1999-02-12 05:15:35 +00:00
cjs
3e90f302b6 Don't give exit() a parameter, as libstand version doesn't take one. 1999-02-12 05:14:22 +00:00
tron
2fefe24803 Remove "lib" directory only during "make cleandir" so that ".depend"
doesn't get nuked during "make clean".
1999-02-07 18:25:54 +00:00
tron
08c7376961 Remove "lib" directory created during build process while doing
"make clean" or "make cleandir".
1999-02-07 13:39:36 +00:00
christos
736a561afb Add my name in the copyright, since the code looks very different now. 1999-01-30 17:51:52 +00:00
christos
5699d1ab3d Remove exec.c from here. I want to make it obvious that it has to be built
with different flags from dosboot and biosboot. Although right now this
does not make a difference because we are building the libraries twice,
it can make a difference when we share the builds.
1999-01-30 17:46:53 +00:00
christos
07b1febfb8 - Use MARK_ENTRY instead of MARK_START.
- ELF changes. Now an ELF installboot installs ELF bootblocks properly.
1999-01-30 17:45:42 +00:00
christos
371363a158 Add exec.c here and bump version for elf.
XXX: This code has not been tested!
1999-01-30 17:44:10 +00:00
christos
25fc1fa758 Add exec.c here... 1999-01-30 17:43:38 +00:00
christos
ad9c7a287c Remove exec.o, and make necessary changes for elf. 1999-01-30 17:43:10 +00:00
thorpej
191dab44fa Um, last rev was kind of backwards... actually build exec.o so that
the boot block links.
1999-01-29 22:13:42 +00:00
christos
e58bb79483 Merge XMS changes from exec_fromdos.c 1999-01-29 18:49:08 +00:00
christos
e25e5c88f9 Both booters need exec.o now. 1999-01-29 18:47:58 +00:00
christos
35ca0db06c Revert, wrong place for this. 1999-01-29 18:47:24 +00:00
christos
6cadeb1ea6 Add exec.c here. 1999-01-29 18:46:15 +00:00
christos
3c7776f1b6 exec.c has all the info now. 1999-01-29 18:45:34 +00:00
christos
89cc672d98 Jason forgot to make the disklabel_mbr.h changes for this and ows me 5 hours
of debugging.
1999-01-29 18:45:12 +00:00
christos
722d35a400 Add the ability to get the size of the loaded image without actually
loading. This is useful for dos loading and installboot.
1999-01-29 18:44:09 +00:00
christos
7a7391de52 Simplify by using new feature of getting the load size. 1999-01-29 18:43:11 +00:00
christos
1e39fefac4 Remove -g accidental addition 1999-01-29 18:41:50 +00:00
christos
74d863263c Use loadfile() to load the bootblocks, so that we are going to be able
eventually to load boot blocks with this. Unfortunately the elf assembler
chokes currently on our bootblocks, so the ELF portion does not work (yet).
1999-01-28 22:47:25 +00:00
christos
f1fd49f426 Add support for selectively loading sections, and make this compile in
userland with -DINSTALLBOOT
1999-01-28 22:45:06 +00:00
christos
9fa73628c9 Minor changes to prototypes. 1999-01-28 20:22:31 +00:00
christos
63546de24a Remove a.out loading code and use loadfile.c for everything.
Populate the btinfo_symtab structure.
1999-01-28 20:21:24 +00:00
christos
0fcf083702 Add loadfile.c (stolen from Jason's alpha/stand/common/loadfile.c)
loadfile.h contains macros that are supposed to be MD, but loadfile.c is now MI.
Fixes:
- a.out support
- pass information values via an array not global variables
- don't assume that you can access memory directly.
- remove MD parts
- remove some printfs.
XXX:  loadfile.c needs to be moved somewhere where other ports can use it.
XXX2: read() routines on the i386 don't appear to set errno on failure.
1999-01-28 20:18:31 +00:00
christos
408aa9a669 Bump number to 2.6 and say ELF works!
But, this is not selfhosting yet. I need to fix the installboot crap.
[i.e. you need the a.out tools to build it and install it].
1999-01-28 20:12:49 +00:00
thorpej
f077362c41 Use the MI <sys/disklabel_mbr.h>, not our own machine-dependent
definitions.
1999-01-27 20:54:56 +00:00
thorpej
6ead44025b Fixup some usage of _C_LABEL(). 1999-01-22 22:43:44 +00:00
he
30cc2d95cb Actually handle small boot blocks (<=15 blocks) correctly in the ffs case. 1999-01-17 18:16:16 +00:00
he
4155434b1c Fix uninitialized `inode' variable in save_ffs(), fixing port-i386/6682. 1999-01-16 18:26:47 +00:00
kleink
657d577aeb Pull in <errno.h> instead of <sys/errno.h> for declaration of errno. 1999-01-11 22:21:30 +00:00
he
bdafd9591e Add "ustarfs" as a recognized boot file system type, and bump version number. 1998-12-19 19:44:56 +00:00
he
2cfee96f35 Implement -b option, similar to on alpha, required for ustar floppy support. 1998-12-19 19:17:23 +00:00
drochner
be595f36c4 document support for Intel 82557/82558 1998-12-12 15:51:49 +00:00
drochner
6f71e420f3 add support for the Intel 82557/82558 fast ethernet chip 1998-12-12 15:47:05 +00:00
drochner
1c0cc94837 Update for INT13 support.
XXX We can't easily emulate this here due to the 16-bit-pointer
call interface.
1998-11-22 15:44:03 +00:00
ws
18f9174133 Some BIOSs insist on patching the Bios Parameter Block for some drives
(e.g. LS-120).  Make room for this.
1998-11-11 16:46:38 +00:00
ws
2791cf041a Fix a thinko which still prevented this to run on non-int13-ext machines.
Thanks to entropy@zippy.bernstein.com for pointing this out and testing the fix.
1998-10-30 12:16:59 +00:00
ws
6463d10c79 Fix typo which prevented this from working
on disks without int13-extension support.
1998-10-27 14:08:55 +00:00
ws
a541c86a76 Update version number and mention int13 extension support
(sorry, forgot this on the recent commit of the above).
1998-10-27 12:59:02 +00:00
ws
d65dc0de3b Make ourseg visible to the outside similar to bootsect/start_bootsect.S
(Thanks to hannken@eis.cs.tu-bs.de for pointing this out).
1998-10-16 18:07:35 +00:00
ws
f82918b49b Add int13 extension support 1998-10-15 15:28:22 +00:00
ws
3e28defef4 No point in making the fake partition that large.
This smaller one will (hopefully) make 0-start
installations work on more machines.
1998-10-08 14:25:42 +00:00
lukem
c9db84ecc9 distclean is a synonym for cleandir 1998-09-05 15:15:14 +00:00
drochner
5e4c58a7d0 Fix incomplete variable renaming in the last commit.
Found by taca@sky.yamashina.kyoto.jp (Takahiro Kambe) - PR port-i386/6087.
1998-09-02 08:24:51 +00:00
rvb
67390e1ee2 Make serial line debugging easier to enable and use 1998-08-13 17:41:10 +00:00
drochner
fa0aee147e Use the new mkdtemp() instead of mktemp();mkdir().
Various cleanups (and typecasts) to get lint quiet.
Add remaining prototypes, enable -Wmissing-prototypes -Wstrict-prototypes.
1998-07-28 20:10:53 +00:00
drochner
7cdf5d9a77 retry disk accesses (for shaky floppy drives) 1998-07-23 09:59:44 +00:00
drochner
acea5c2e79 add dependency to get the version number right 1998-07-08 17:47:42 +00:00
drochner
13b329cdd2 bump version number to reflect the partition ID change
(should have been done long ago)
1998-07-08 17:46:21 +00:00
drochner
cbb7aa93f0 from FreeBSD:
wpaul       1998/07/02 08:36:36 PDT

  Modified files:
    sys/i386/boot/biosboot start.S
  Log:
  Add workaround to allow the FreeBSD boot block to work on
  Kapok Computer Co. notebook with AMI 'WinBIOS' which seems to insist
  on having a short jump and nop as the first instructions in the
  boot sector code. The prevailing theory is that the BIOS is doing
  some sort of boot sector virus detection and refusing to run any
  boot block that doesn't start with the same instruction sequence as
  MS-DOG boot sector code. If this is the case, it would be nice if it
  actually printed an error message to this effect instead of just
  saying 'FAILED.'

  This workaround has no effect on the boot sector code other than to
  increase its size by three bytes.
1998-07-07 13:58:59 +00:00
kleink
e6be56ae0b Need <stdlib.h> for mktemp() prototype. 1998-06-01 14:05:35 +00:00
drochner
4153971158 Framework to test standalone code in a friedly user environment. 1998-05-15 17:07:14 +00:00
drochner
a8857f05e8 Allow to use the code in user land test programs. 1998-05-15 16:38:53 +00:00
drochner
12d352b2f9 minor corrections 1998-05-14 18:34:11 +00:00
drochner
04682788a9 misc improvements:
-initialize errno to 0 before receiving
-minimal allowed packet size is 4 (empty data packet)
-Be nice to the TFTP server - tell it that the transfer is finished
  (additinal ACK at EOF, ERROR otherwise). Otherwise, it will linger
  around and retransmit. This can be left out (TFTP_NOTERMINATE) if we
  are really short on space.
1998-05-14 18:26:47 +00:00
drochner
2e9a412d43 allow to use from user space test programs 1998-05-14 18:17:44 +00:00
drochner
26d2f5e3b6 allow to access from user space test programs 1998-05-14 18:15:02 +00:00
drochner
2a3fff85f0 add RCS ID 1998-05-06 13:32:18 +00:00
mycroft
4fe1e7a83d Make main() return int to shut up egcs. (Yuck.) 1998-03-31 05:29:21 +00:00