Commit Graph

76 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
59707f16bd MFi386: revisions 220389 and 220392
- Mark getc() as inline, this has no effect on gcc but helps clang.
  - Move getc() body before xgetc() so gcc does not emit a warning about
    function having no body.
2011-04-16 06:20:49 +00:00
Yoshihiro Takahashi
c3e05ae05d MFi386: revision 220337
Build boot2 with -mregparm=3.
2011-04-05 13:48:53 +00:00
Yoshihiro Takahashi
9d55f5499b MFi386: the part of 219452
- bunch of variables are turned into uint8_t.
  - the setting and reading of "fmt" in load() is removed.
  - buf in printf() is made static to save space.
2011-03-24 15:09:36 +00:00
Yoshihiro Takahashi
2fe4ce3bd8 MFi386: revision 219186
This patch shrinks boot2 a little.

  o    It switches kname to be just a pointer instead of an array.
  o    It changes ioctl to unsigned from uint8_t.
  o    It changes the second keyhit limit to 3 seconds from 5.
  o    It removes bi_basemem/bi_extmem/bi_memsizes_valid setting.
2011-03-03 11:45:54 +00:00
Yoshihiro Takahashi
fb260f4f74 MFi386: revision 218926
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
  from uint16_t back to uint32_t.  The actual option bitmasks (RB_* and
  RBX_*) assume at least a 32 bit variable.

  Submitted by:	rdivacky
2011-02-22 13:52:03 +00:00
Yoshihiro Takahashi
709f6be098 MFi386: revision 218745
Remove reading of symbols from a.out loaded files.
2011-02-19 10:32:12 +00:00
Yoshihiro Takahashi
894cbf138e MFi386: revision 218713
Apply a few small optimizations to boot2's code, to make it shrink a
  little further.
2011-02-16 15:20:37 +00:00
Dimitry Andric
7617ef9cac Remove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefiles
under sys/boot/{i386,pc98}, since these are already added via
sys/boot/{i386,pc98}/Makefile.inc.

Submitted by:	arundel
2011-01-05 21:46:08 +00:00
Yoshihiro Takahashi
6d6f513763 MFi386: revision 214210
Avoid using memcpy() for copying 32bit chunks. This shrinks
  the resulting code a little.
2010-10-24 02:59:02 +00:00
Dimitry Andric
d205253515 When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2
and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile
flags are sometimes passed via this variable, for example during the
build32 stage on amd64.  This caused the 32-bit libobjc build on amd64
to fail.

Instead, only replace the first instance of clang (if any, including
optional path) with gcc, and leave the arguments alone.

Approved-by:	rpaulo (mentor)
2010-09-21 21:41:45 +00:00
Dimitry Andric
cd70197aa9 Use a cleaner expression to retrieve the memory size in pc98's boot2.c,
which also avoids NULL pointer arithmetic, as suggested by jhb.  The
available space goes from 11 bytes to 7.

Reviewed by:	nyan
Approved by:	rpaulo (mentor)
2010-09-01 15:24:47 +00:00
Dimitry Andric
227209559d Avoid directly manipulating a NULL pointer (which could result in
undefined behaviour) in sys/boot/pc98/boot2/boot2.c.

Reviewed by:	nyan
Approved by:	rpaulo (mentor)
2010-08-31 18:11:50 +00:00
Dimitry Andric
52e2247273 Always compile pc98 boot2 with gcc instead of clang, just as with i386
boot2.  Unfortunately both still are too big when compiled with clang.

Reviewed by:	nyan
Approved by:	rpaulo (mentor)
2010-08-31 17:38:20 +00:00
Yoshihiro Takahashi
02694ba6bc Reimplement the boot2 for pc98 completely.
It's based on the newest i386's one and has the advantage of:

 - ELF binary support.
 - UFS2 filesystem support.
 - Many FreeBSD slices support on a disk.

Tested by:	SATOU Tomokazu ( tomo1770 _ maple _ ocn _ ne _ jp ),
		WATANABE Kazuhiro ( CQG00620 _ nifty _ ne _ jp ) and
		nyan

MFC after:	2 week

Happy New Year in Japan!!
2009-12-31 15:03:33 +00:00
Yoshihiro Takahashi
36ff75683a Cleanups the boot2 for pc98. There is no functional change.
- Make setting machine type and getting geom conditional for future.
  - Remove unused RAWBOOT and CDBOOT supports.
  - Remove unneeded include.
  - Fix warnings.

MFC after:	1 week
2009-12-11 12:36:59 +00:00
Doug Rabson
cc4757ddef Some of the boot loader code only works on a ufs file system, but it
uses the generic struct dirent, which happens to look identical to UFS's
struct direct.  If BSD ever changes dirent then this will be a problem.

Submitted by:	matthew dot fleming at isilon dot com
2009-05-28 08:22:36 +00:00
Yoshihiro Takahashi
c190805b5d Remove Japanese document. 2008-07-04 12:19:56 +00:00
Ruslan Ermilov
cae17430bf Fix a fallout from SSP commit, and make this compile again.
Bonus: including kern.mk just to pick kernel warning flags
was an extremely bad idea anyway, because it also picked
up CFLAGS (it probably wasn't the case at the time of CVS
rev. 1.1, I haven't checked).  Remove duplicate CWARNFLAGS
from CFLAGS.
2008-06-26 07:56:16 +00:00
John Baldwin
5c5b5d4607 Slightly cleanup the 'bootdev' concept on x86 by changing the various
macros to treat the 'slice' field as a real part of the bootdev instead
of as hack that spans two other fields (adaptor (sic) and controller)
that are not used in any modern FreeBSD boot code.

MFC after:	1 week
2007-10-24 04:03:25 +00:00
Alexander Kabaev
7d80a3b493 pc98 boot2 is compiled with _KERNEL defined, and that makes non-static
bootinfo variable declaration visible. It conflicts with static
declaration in this file. Declare variable as globally visible in
order to resolve the conflict.
2007-04-06 20:50:24 +00:00
Ruslan Ermilov
593bbd2195 Revert the last change. Masking only 2 MSBs of the virtual address
to get the physical address doesn't work for all values of KVA_PAGES,
while masking 8 MSBs works for all values of KVA_PAGES that are
multiple of 4 for non-PAE and 8 for PAE.  (This leaves us limited
with 12MB for non-PAE kernels and 14MB for PAE kernels.)

To get things right, we'd need to subtract the KERNBASE from the
virtual address (but KERNBASE is not easy to figure out from here),
or have physical addresses set properly in the ELF headers.

Discussed with:	jhb
2006-11-02 17:28:38 +00:00
Ruslan Ermilov
da6d4298b7 Because the BTX mini-kernel now uses flat memory mode and clients
are no longer limited to a virtual address space of 16 megabytes,
only mask high two bits of a virtual address.  This allows to load
larger kernels (up to 1 gigabyte).  Not masking addresses at all
was a bad idea on machines with less than >3G of memory -- kernels
are linked at 0xc0xxxxxx, and that would attempt to load a kernel
at above 3G.  By masking only two highest bits we stay within the
safe limits while still allowing to boot larger kernels.

(This is a safer reimplmentation of sys/boot/i386/boot2/boot.2.c
rev. 1.71.)

Prodded by:	jhb
Tested by:	nyan (pc98)
2006-10-29 14:50:58 +00:00
Tor Egge
a1e363f256 Add mnt_noasync counter to better handle interleaved calls to nmount(),
sync() and sync_fsync() without losing MNT_ASYNC.  Add MNTK_ASYNC flag
which is set only when MNT_ASYNC is set and mnt_noasync is zero, and
check that flag instead of MNT_ASYNC before initiating async io.
2006-09-26 04:15:59 +00:00
Yoshihiro Takahashi
b42bfe1947 Fix build (s:pc98/cbus/cbus.h:pc98/pc98/pc98_machdep.h:)
Pointyhat to:	nyan
2006-05-09 14:20:17 +00:00
Yoshihiro Takahashi
42244f27c2 Remove EPSON PC-386 note A/W/AE/WR support. 2005-09-14 12:39:06 +00:00
John Baldwin
5b09b18204 Print out the commands from /boot.config after parsing them so that they
output is sent to the correct console(s).

PR:		kern/66425
Submitted by:	Gavin Atkinson gavin at ury dot york dot ac dot uk
MFC after:	1 week
2005-05-27 19:26:11 +00:00
Yoshihiro Takahashi
d1725ef7ff Change a directory layout for pc98.
- Move MD files into <arch>/<arch>.
  - Move bus dependent files into <arch>/<bus>.
Rename some files to more suitable names.

Repo-copied by:	peter
Discussed with:	imp
2005-05-10 12:02:18 +00:00
Yoshihiro Takahashi
769f92857b Remove ifdef PC98. 2005-05-08 14:17:28 +00:00
Yoshihiro Takahashi
ad42c2a5fd Use DOSMID_386BSD rather than DOSPTYP_386BSD. 2005-05-08 11:15:38 +00:00
Warner Losh
722cb08d74 Fix buidling of boot blocks for pc98 with new links.
Submitted by: nyan@
2005-04-03 04:58:15 +00:00
Ruslan Ermilov
83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +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
Yoshihiro Takahashi
cede9ec016 MFi386: revision 1.56 (Add -fno-unit-at-a-time to CFLAGS). 2004-09-18 00:12:04 +00:00
Yoshihiro Takahashi
c80f54d479 Fix new compiler error (s/bcopy/memcpy/). 2004-07-30 09:42:04 +00:00
Poul-Henning Kamp
ad165b6f6d Unspam sys/boot, the dev_t commit should not have touched these.
Spotted by:	peter
2004-06-16 18:21:22 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +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
Yoshihiro Takahashi
5e0eb6243d MFi386: Factor out -nostdlib and use PROG. 2004-02-09 16:01:45 +00:00
Ruslan Ermilov
6ed6b4ab71 MFi386: Removed -elf and duplicate -ffreestanding. 2004-02-07 14:35:33 +00:00
Yoshihiro Takahashi
cc78dccee9 MFi386: Cleanups to sys/boot makefiles. 2004-02-07 12:19:44 +00:00
David E. O'Brien
7d4724590e Use __FBSDID().
Also some minor style cleanups.
2003-09-08 09:11:32 +00:00
Yoshihiro Takahashi
943be5d359 Fixed build error with GCC 3.3.1 2003-07-13 08:13:52 +00:00
Poul-Henning Kamp
197e5e73ef Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>

Move i386/pc98 specific bits from <sys/reboot.h> to
<i386/include/bootinfo.h> as well.

Adjust includes in sys/boot accordingly.
2003-04-04 16:35:16 +00:00
Ruslan Ermilov
73f643b411 Fixed sys/boot/pc98/boot2/Makefile to use kern.mk and
get rid of bsd.kern.mk completely.

OK'ed by:	bde
2003-03-02 21:18:40 +00:00
Yoshihiro Takahashi
271aee47ec MFi386: Install the "boot" image which is boot1 + boot2. 2003-01-30 14:50:25 +00:00
Yoshihiro Takahashi
97a45538e4 Add SCSI MO device support.
Submitted by:	Kawanobe Koh <kawanobe@st.rim.or.jp>
2003-01-06 13:43:15 +00:00
Yoshihiro Takahashi
404a379e4a Rename the dos_partition structure for pc98 to pc98_partition. 2003-01-04 08:50:48 +00:00
Yoshihiro Takahashi
46ae965fca Remove '-DUFS1_ONLY' from CFLAGS. It is not needed. 2002-10-10 14:03:00 +00:00
Poul-Henning Kamp
5765b4ef72 Move the definition of UFS1_ONLY into the Makefiles where it belongs.
Sponsored by:	DARPA & NAI Labs.
2002-10-07 08:09:20 +00:00