Commit Graph

130 Commits

Author SHA1 Message Date
christos
c70b4ad2a1 Add prototype for getsecs 1999-04-14 15:22:07 +00:00
hpeyerl
6cde76c6fe fix some copyright foo. 1999-04-14 12:56:33 +00:00
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
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
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
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
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
cjs
3e90f302b6 Don't give exit() a parameter, as libstand version doesn't take one. 1999-02-12 05:14:22 +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
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
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
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
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
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