Commit Graph

42 Commits

Author SHA1 Message Date
Rodney W. Grimes
a27df7823f KPTDI_LAST renamed to KPTDI 1993-10-12 15:09:37 +00:00
Rodney W. Grimes
988d75b3d6 Eliminate definition of I386_PAGE_SIZE and use NBPG instead
Cleaned up tabs vs spaces after #define to make file consistent.
Removed now unused definitions of I386_PAGE_SIZE and I386_PDR_SIZE

Note That these two where unused and had the wrong values anyway!
Changed I386_KPDES to NKPDE
Changed I386_UPDES to NUPDE

Redid constant assignments of *PTDI's to be sizeable and relative.
1993-10-12 13:58:01 +00:00
Rodney W. Grimes
9aa17d68ce Eliminate definition of I386_PAGE_SIZE and use NBPG instead
Replace 0xFE000000 constants with KERNBASE
Use new definition NKPDE in place of a first-last+1 calculation.
1993-10-12 13:53:25 +00:00
Rodney W. Grimes
1c622fc1dc SYSPDROFF and SYSPDREND are now calculated using KERNBASE, KERNSIZE and
PDRSHIFT.

The SYSTEM constant that was defined in this file has been replaced
with KERNBASE from param.h.

Changed almost all # style comments to /* */ C style comments.  Several
comments cleaned up so that they make a little more since.

In the comments that describe C calling conventions to assembler routines
used a comma space sequence to seperate arguments and removed the space
between the function name and the argument list.

Removed useless comments like /* clr eax */.

Changed all comma space sequences on assemble instructions to just be comma.

Removed spaces after $ operators to make the file consistent, this may need
to change again (ie: $KERNBASE should probably be $(KERNBASE), but for now
it all seems to work just fine.)  This may become a problem with the C
pre-processor.

Changed several double blank lines to single blank lines that where used
to seperate the I/O routines, these routines are blocked enough that we
don't need double blank lines between them.

Changed sequence of I/O routines to be all input functions, all output
functions instead of just the opposite.

Moved the SHOW_A_LOT debug stuff to near the end of the file.

Changed two occurances of the constant 0xfff to NBPG-1.
1993-10-10 06:07:57 +00:00
Rodney W. Grimes
845dee6b85 Added a compile time #error so that if the user does not specify on of
the proper I_X86CPU in the config file the following error will occur
while building the kernel: (had to line wrap the error for this message)

../../i386/i386/machdep.c:343: #error This kernel is not configured for one \
of the supported CPUs
1993-10-10 06:01:44 +00:00
Rodney W. Grimes
156812b7e4 Added PDRSHIFT and KERNSIZE so that the PDR offsets can be calculated in
locore.s instead of being constants (3F8, 3FA).
1993-10-10 02:09:44 +00:00
David Greenman
89ccb410d4 Correct spelling of "SHMMAXPGS" so the config override will actually work. 1993-10-09 15:29:04 +00:00
Rodney W. Grimes
09f07fb057 All:
Remove patch kit headers, and add $Id$
	This is mostly to align some more code with NetBSD.

cpu.h:
	Remove the old function vs. include configuration stuff that was
	ifdefed out when we went to inline functions.
	Remove the define of resettodr that made it a nop, there is
	already a function that makes it a nop, no need to #define one.
	Remove the #defines of processor types, they are now defined
	in cputypes.h, #include that file.
	Add struct cpu_nameclass for support of cpu types.

frame.h:
	include sys/signal.h, it will be needed in the future.
	put the sigframe structure here that was in machdep.c

pcb.h:
	Add multiple inclusion protection.
	Add pcb_ldt and pcb_ldt_len to pcb structure, this is for the
	user mode ldt.
1993-10-08 20:51:00 +00:00
Rodney W. Grimes
3409a2f663 All:
removed patch kit headers and sccsids, add $Id$.  This is a general
	clean up and reallignment with NetBSD-current where possible.

genassym.c:
	removed extranious include of reg.h
	removed old FP_* defines that have been ifdefed out since the patch kit
	removed PCB_SIGC that is not referenced anywhere
	add trapframe and sigframe defines
	add KERNBASE define for use in locore.s

locore.s:
	include npx.h and use NNPX for turning on and off FPU
	include machine/cputypes.h for the types of cpu (used in cpu_identify)
	change SYSPDREND to be one higher, this is really the base of the
	next area, and will be changing again next time I revise the file
	Reverse the NOP defines, you now get slow NOP's by default, this
	may be what is casuing us trouble with some systems.  If you want
	the NOPS to be null you now need to have options DUMMY_NOPS.
	Now get esym from the boot blocks which don't pass it yet, and
	it is not used, but this will be changing.
	Move the bit_colors stuff to be in with the rest of Bruces SHOW_A_LOT
	things for debugging.
	Added NetBSD's CPU type probe code, we now know what type of CPU
	we are running on.
	Adjust kernel pde calcuation to correct for change in SYSPDREND, no
	longer need the +1.

machdep.c
	include npx.h and use NNPX for turning on and off FPU
	include isa.h, map.h(new file), exec.h in preperation for
	changes that are still in process.
	Add some of the code for MACHINE_NONCONTIG that will alow us
	to better map around the BIOS memory area.
	Now print the version, cpu id, real memory and availiable memory
	during boot.
	Correct the calculation of bufpages, the code was mixing pages
	and bytes, it now does the right things.  Removed Bill's hack
	for limiting the erronous calculation.
	add the identifycpu print out code from NetBSD.
	remove the definition of the sigframe struct, it belongs in
	frame.h
	put in printf's about syncing disks on a halt/reboot.
	Change the halted message to be a little easier reading.
	Clean up of the dump messages, makes the source and the output
	much more readable.
	Change 0,0 in several places to have spaces after the commas.
1993-10-08 20:45:12 +00:00
Rodney W. Grimes
3225c4b443 Define the types of cpu's there are, from NetBSD 1993-10-08 13:40:54 +00:00
Rodney W. Grimes
f43bd59ec7 Architecture specific syscalls (i386) from NetBSD 1993-10-08 11:31:40 +00:00
Rodney W. Grimes
3331c2af28 Removed patch kit headers, and rcsid, add $Id$, relocate Terry Lamberts
copyright to match the location that it is in NetBSD.

Remove the __main() {} dummy function, it belongs in kern/init_main.c
1993-10-08 10:47:13 +00:00
Rodney W. Grimes
b145f751d3 This is a fix for the 32K DMA buffer region that was not accounted for,
it relocates it to be after the BIOS memory hole instead of right below
the 640K limit.
THANK YOU CHRIS!!!

From: <cgd@postgres.Berkeley.EDU>
Date: Wed, 29 Sep 93 18:49:58 -0700
basically, reserve a new 32k space right after firstaddr,
and put the buffer space there...

the diffs are below, and are in ~cgd/sys/i386/i386 (in machdep.c)
on freefall.  i obviously can't test them, so if some of you would
look the diffs over and try them out...
1993-09-30 23:16:17 +00:00
Rodney W. Grimes
b1929a9f4a Add symbolic name for system page directory end, and change constant to
a calculation for the system page directory tables.
1993-09-29 02:37:41 +00:00
Rodney W. Grimes
b6c78fe436 define SHMMAXPGS where it is suppose to be, you can over ride this with
a kernel config options "SHMAXPGS=xxx", default is currently 64 pages
due to limit kernel map space.
1993-09-27 00:36:57 +00:00
Rodney W. Grimes
96210b28be >From: rich@id.slip.bcm.tmc.edu.cdrom.com (Rich Murphey)
Date: Sun, 12 Sep 1993 18:19:05 -0500
This will allow you to compile and run a freebsd kernel with shared
memory support.  I haven't tested the shm*() calls yet.

You run out of page table descriptors if you specify 4Mb of sharable
memory (SHMMAXPGS=1024).  I don't know what the limit is, but
SHMMAXPGS=64 works.   Rich
1993-09-24 21:00:29 +00:00
Nate Williams
7c2b54e804 Removed volatile functions which were causing grief in the system, since
volatile functions are undefined, and there is no reason to have them
in our kernel.
1993-09-10 22:14:37 +00:00
Rodney W. Grimes
70a3b3d1af This is just to shut the compiler up
===================================================================
RCS file: /a/cvs/386BSD/src/sys/i386/i386/vm_machdep.c,v
retrieving revision 1.3
diff -c -r1.3 vm_machdep.c
*** 1.3	1993/07/27 10:52:21
--- vm_machdep.c	1993/09/10 20:12:53
***************
*** 179,184 ****
--- 179,186 ----
  #endif
  	splclock();
  	swtch();
+ 	/*NOTREACHED*/
+ 	for(;;);
  }

  cpu_wait(p) struct proc *p; {
1993-09-10 20:39:13 +00:00
Rodney W. Grimes
b4f05987df Changed the pg("ptdi> %x") to a printf and then a panic, since we are
going to panic shortly after this anyway.  Destroys less state, and
keeps the machine from waiting for someone to smash the return key
a few times before it panics!
1993-09-09 01:11:41 +00:00
Rodney W. Grimes
2a5017c0e0 Removed patch kit header, added $Id$
Added support of DONET({IMP,NS,ISO}) so you can now compile with options
NS and ISO, still missing some IMP code, but since the imp is old and
gone I doubt this will ever be used.
1993-09-06 16:12:05 +00:00
Rodney W. Grimes
b3b174f5cd Increased stack size to 8MB just to be on the real safe side. 1993-09-01 09:38:32 +00:00
Rodney W. Grimes
a0ad3760a2 Changed trap.c so that a panic will occur if we do not have hardware
FP and we try to call the emulator when it is not compiled in.
Removed the #if defined(i486) || defined(i387) that use to call the
panic if we did not have a math emulator.
Removed an extranious include of i386/i386/math_emu.h from math_emulate.c.
1993-08-28 13:25:22 +00:00
Rodney W. Grimes
8373b81238 Changed MAXSSIZ from MAXDSIZ to 2MB 1993-08-28 09:19:01 +00:00
Andrew Moore
6bef4df57c prefixed inline functions' parameter names with _ and declared
the return type explicitly.
1993-08-27 05:09:38 +00:00
Andrew Moore
24a82630a2 adding fpgetround(3) IEEE floating point environment support 1993-08-25 09:01:44 +00:00
Rodney W. Grimes
237fbcc806 Corrected off by 2 error in DELAY macro (it was delaying for 2 * value).
From Bruce Evans.
1993-08-24 01:24:43 +00:00
Rodney W. Grimes
1acce5a995 Removed one more reverence to the old Adaptec 1542b as.c driver, one less
dependent for autoconf.c.
1993-08-10 10:18:33 +00:00
Rodney W. Grimes
1ce6e34045 Moved _eintr{names,cnt} so that vmstat -i does not report all the debugging
stuff of the fast interrupt code.
1993-08-09 18:20:26 +00:00
Rodney W. Grimes
78d172cab6 From guido@gvr.win.tue.nl Sat Aug 7 06:58:04 1993
I posted some patches on the 386bsd_patchkit list to prohibit io access.
Because of a noninitialised filed in the tss, this was possible.
It is included below as the patch to machdep.c
However, when you do this *necessary* fix (security), it will be
impossible form within user space to do io.

therefor, I included another fix: when you open /dev/io, you
get the access. Of course you can rewrite it to use another minor
and thus giving access to the iospace when /dev/mem is opened, e.g.

NOTE: The /dev/io entry has not been added to /dev/MAKEDEV yet.
The patch is in NetBSD.
1993-08-09 06:16:42 +00:00
Rodney W. Grimes
3db77f6ee9 Removed the asking for a root file system when booting from floppy as that
is now handled by the new boot blocks immediatly after the kernel is loaded.
1993-08-08 06:24:15 +00:00
David Greenman
269312019a * Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading,
profiling, and various protection checks that cause security holes
  and system crashes.
* Changed min/max/bcmp/ffs/strlen to be static inline functions
  - included from cpufunc.h in via systm.h. This change
  improves performance in many parts of the kernel - up to 5% in the
  networking layer alone. Note that this requires systm.h to be included
  in any file that uses these functions otherwise it won't be able to
  find them during the load.
* Fixed incorrect call to splx() in if_is.c
* Fixed bogus variable assignment to splx() in if_ed.c
1993-07-27 10:52:31 +00:00
Paul Richards
75124a8b13 Added volatile void to cpu_exit() in the hope that it would
stop warning about returning from gcc.

It hasn't but the declaration is still correct.
1993-07-18 20:56:17 +00:00
David Greenman
80b939867b New locore from Christoph Rubitschko. 1993-07-16 23:55:07 +00:00
David Greenman
01ae5b20df Updated kernel files to move occurances of "struct args" syscall
argument definitions outside of the function parameter list.  This is
to reduce the copious warning messages that (non-Jolitz) gcc produces.
Also fixed some bogus variable declarations and casts to make the
compiler happy.
1993-07-16 20:50:44 +00:00
David Greenman
2a6c898016 Modified attach printf's so that the output is compatible with the "new"
way of doing things. There still remain several drivers that need to
be updated.  Also added a compile-time option to pccons to switch the
control and caps-lock keys (REVERSE_CAPS_CTRL) - added for my personal
sanity.
1993-07-15 17:53:14 +00:00
Rodney W. Grimes
605d655975 Fixed two occarances of ldos which should have been lods.
(From Christoph Robitschko)
1993-07-12 09:34:38 +00:00
Charlie Root
c26491ecf4 Increased default data size (DFLDSIZ) to 16MB. Need to rebuild libutil,
kernel, ps and w for this to work!
1993-07-03 21:21:35 +00:00
Nate Williams
beb7ebb072 Added (protection) around negative constants, in case a program wants
to use the negative of that constant.

#define NEG_NUM -3
#define SAFE_NEG_NUM (-3)

i = -NEG_NUM;		/* Error --3 */
j = -SAFE_NEG_NUM	/* Okay -(-3) */
1993-06-30 22:59:18 +00:00
Nate Williams
330b151312 Setting up for updated (usable) FPE atof/vfprintf/vfscanf fixes 1993-06-29 13:34:33 +00:00
Rodney W. Grimes
4232df2cf0 Obsolete if_we.c driver, more attach call to where it belongs.
Still need to fix all the drivers.
1993-06-18 22:18:57 +00:00
Paul Richards
7c434002a4 Upgrade to GCC 2.X 1993-06-18 02:47:24 +00:00
Rodney W. Grimes
5b81b6b301 Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00