summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andwollman1993-11-2512-75/+172
| | | | add same (sans -Werror) to Makefile for future compilations.
* patches from Julian Elischer -dg1993-11-221-1/+27
| | | | Added support for mmapping /dev/mem
* Fixed comments that start within a comment, so code compiles cleanly withwollman1993-11-173-6/+5
| | | | -Wcomment.
* If netmask == 0, new value changed from 0x8000 to 0x10000ache1993-11-171-4/+2
| | | | (don't mess with IRQ15)
* new process tracing code from Sean Eric Fagen (sef@kithrup.com).dg1993-11-162-12/+197
| | | | ...also, fixed up the syscall args to make GCC happy.
* if netmask == 0, then the loopback code can do some reallyache1993-11-141-1/+8
| | | | | | bad things. workaround for this: if netmask == 0, set it to 0x8000, which is value used by splsoftclock
* Add _bde_exists: label so that the global is really defined. Fix spellingrgrimes1993-11-142-6/+6
| | | | error (mount -> amount)
* First steps in rewriting locore.s, and making info usefuldg1993-11-1314-3624/+4049
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when the machine panics. i386/i386/locore.s: 1) got rid of most .set directives that were being used like #define's, and replaced them with appropriate #define's in the appropriate header files (accessed via genassym). 2) added comments to header inclusions and global definitions, and global variables 3) replaced some hardcoded constants with cpp defines (such as PDESIZE and others) 4) aligned all comments to the same column to make them easier to read 5) moved macro definitions for ENTRY, ALIGN, NOP, etc. to /sys/i386/include/asmacros.h 6) added #ifdef BDE_DEBUGGER around all of Bruce's debugger code 7) added new global '_KERNend' to store last location+1 of kernel 8) cleaned up zeroing of bss so that only bss is zeroed 9) fix zeroing of page tables so that it really does zero them all - not just if they follow the bss. 10) rewrote page table initialization code so that 1) works correctly and 2) write protects the kernel text by default 11) properly initialize the kernel page directory, upages, p0stack PT, and page tables. The previous scheme was more than a bit screwy. 12) change allocation of virtual area of IO hole so that it is fixed at KERNBASE + 0xa0000. The previous scheme put it right after the kernel page tables and then later expected it to be at KERNBASE +0xa0000 13) change multiple bogus settings of user read/write of various areas of kernel VM - including the IO hole; we should never be accessing the IO hole in user mode through the kernel page tables 14) split kernel support routines such as bcopy, bzero, copyin, copyout, etc. into a seperate file 'support.s' 15) split swtch and related routines into a seperate 'swtch.s' 16) split routines related to traps, syscalls, and interrupts into a seperate file 'exception.s' 17) remove some unused global variables from locore that got inserted by Garrett when he pulled them out of some .h files. i386/isa/icu.s: 1) clean up global variable declarations 2) move in declaration of astpending and netisr i386/i386/pmap.c: 1) fix calculation of virtual_avail. It previously was calculated to be right in the middle of the kernel page tables - not a good place to start allocating kernel VM. 2) properly allocate kernel page dir/tables etc out of kernel map - previously only took out 2 pages. i386/i386/machdep.c: 1) modify boot() to print a warning that the system will reboot in PANIC_REBOOT_WAIT_TIME amount of seconds, and let the user abort with a key on the console. The machine will wait for ever if a key is typed before the reboot. The default is 15 seconds, but can be set to 0 to mean don't wait at all, -1 to mean wait forever, or any positive value to wait for that many seconds. 2) print "Rebooting..." just before doing it. kern/subr_prf.c: 1) remove PANICWAIT as it is deprecated by the change to machdep.c i386/i386/trap.c: 1) add table of trap type strings and use it to print a real trap/ panic message rather than just a number. Lot's of work to be done here, but this is the first step. Symbolic traceback is in the TODO. i386/i386/Makefile.i386: 1) add support in to build support.s, exception.s and swtch.s ...and various changes to various header files to make all of the above happen.
* Applied David Greenman's hack to disable IRQ conflict checkingalm1993-11-091-1/+3
| | | | when COM_MULTIPORT is defined.
* Get rid of WFJ's use of sleep() for more user-friendly tsleep().wollman1993-11-072-4/+4
|
* Made all header files idempotent and moved incorrect common data fromwollman1993-11-071-1/+5
| | | | | headers into a related source file. Also fixed a bug in ed_probe() where it was possible to fall off the end of the function
* Made all header files idempotent and moved incorrect common data fromwollman1993-11-0718-28/+93
| | | | | headers into a related source file. Added cons.h as first step towards moving i386/i386/cons.h to machine/cons.h where it belongs.
* Made all header files idempotent and moved incorrect common data fromwollman1993-11-073-3/+27
| | | | | headers into a related source file. (This is the only change to locore.s). Also fixed pg() to be properly declared and use stdargs.
* splnone()'s in the trap code can be deadly. Save/restore previous prioritydg1993-11-041-5/+7
| | | | instead.
* DST offset calculation removed, it is wrong in any case.ache1993-11-042-22/+2
|
* Restored comments that were removed from npx.c using # commentpaul1993-11-032-10/+10
| | | | format rather than /* */, as per advise from Jordan.
* Removed comments from within asm block.paul1993-11-032-10/+10
| | | | | New gas fails to parse comments within asm blocks properly. Simply remove them until gas gets fixed.
* Modified the "rude stack hack" that it only applies to addresses withinchmr1993-11-011-2/+4
| | | | | | the stack area and not memory above VM_MAXUSER_ADDRESS. That way, copyout and friends now work for pages whose page table entries have not yet been allocated/been paged out.
* Whoops, the algorithm I last used was messed up - I left off parans, anddg1993-10-291-2/+2
| | | | should have used PGSHIFT instead of PAGE_SHIFT.
* Change filesystem buffer cache size calculation to be less for 4MBdg1993-10-291-2/+2
| | | | | | | machines (now 20% of all memory after the first 3MB). This is necessary in order for 4MB machine to be able to rebuild the entire source tree and not run out of physical memory because of fixed memory requirements of processes and kernel VM.
* >From: Julian Elischer <julian@jules.dialix.oz.au>rgrimes1993-10-181-2/+2
| | | | | | | | | | | | | | | | Date: Tue, 19 Oct 1993 02:22:41 -40962758 (WST) As the subject line says: I can;t believe this typo is still here. Has NOBODY used the isa_dmastart() routine for 16bit DMA? I know I just hit the dma regs directly for the AHA1542, and it appears that either everybody else does as well, or they only use 8bit DMA (e.g. floppy) Editors Note: The definition of DMA2_CHN was incorrectly using IO_DMA1!
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-161-1/+2
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-1615-70/+29
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-166-94/+11
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-167-81/+17
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* genassym.c:rgrimes1993-10-157-159/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove NKMEMCLUSTERS, it is no longer define or used. locores.s: Fix comment on PTDpde and APTDpde to be pde instead of pte Add new equation for calculating location of Sysmap Remove Bill's old #ifdef garbage for counting up memory, that stuff will never be made to work and was just cluttering up the file. Add code that places the PTD, page table pages, and kernel stack below the 640k ISA hole if there is room for it, otherwise put this stuff all at 1MB. This fixes the 28K bogusity in the boot blocks, that can now go away! Fix the caclulation of where first is to be dependent on NKPDE so that we can skip over the above mentioned areas. The 28K thing is now 44K in size due to the increase in kernel virtual memory space, but since we no longer have to worry about that this is no big deal. Use if NNPX > 0 instead of ifdef NPX for floating point code. machdep.c Change the calculation of for the buffer cache to be 20% of all memory above 2MB and add back the upper limit of 2/5's of the VM_KMEM_SIZE so that we do not eat ALL of the kernel memory space on large memory machines, note that this will not even come into effect unless you have more than 32MB. The current buffer cache limit is 6.7MB due to this caclulation. It seems that we where erroniously allocating bufpages pages for buffer_map. buffer_map is UNUSED in this implementation of the buffer cache, but since the map is referenced in several if statements a quick fix was to simply allocate 1 vm page (but no real memory) to it. pmap.h Remove rcsid, don't want them in the kernel files! Removed some cruft inside an #ifdef DEBUGx that caused compiler errors if you where compiling this for debug. Use the #defines for PD_SHIFT and PG_SHIFT in place of constants. trap.c: Remove patch kit header and rcsid, fix $Id$. Now include "npx.h" and use NNPX for controlling the floating point code. Remove a now completly invalid check for a maximum virtual address, the virtual address now ends at 0xFFFFFFFF so there is no more MAX!! (Thanks David, I completly missed that one!) vm_machdep.c Remove patch kit header and rcsid, fix $Id$. Now include "npx.h" and use NNPX for controlling the floating point code. Replace several 0xFE00000 constants with KERNBASE
* param.h:rgrimes1993-10-152-23/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark the fact that PGSHIFT and PDRSHIFT are really the same as PG_SHIFT and PD_SHIFT, these should be collapsed some day soon. Document that KERNBASE should really be KPTDPTDI << PDRSHIFT, for now leave it as the constant 0xFE000000 until I make a seperate common header file for this stuff (vmaddresses.h?) Remove NKMEMCLUSTERS define, it was only being used to define VM_KMEM_SIZE, so why have all the indirection. Besides who wants to work in CLBYTE sizes chuncks. pmap.h: Fix $Id$ and some other minor format clean ups. Remove the XXX comment about NKPDE, since it now has the correct value of 7. Remove unused LASTPTDI and move the APTD into the very end of memory to free up 4MB of kernel virtual address space. Remove unused RSVDPTDI and free up 12MB of kernel virtual address space. vmparam.h Fix $Id$. Increase SHMMAXPGS to 512 (2MB) now that there is room for it to be bigger. The XXX comment stays until the kernel moves down in memory to free up enough space to use the proper default of 4MB. VM_KMEM_SIZE is now a direct constant stating the size of the kernel malloc region. Increased the value from 3MB to 16MB.
* >From David Greenmanrgrimes1993-10-141-8/+6
| | | | | | | | Bruce Evans had limited the kernel virtual address space to not include the last 4MB since it was not being used. Other changes are being made that will reloate the Alternate Page Directory Table (APDT) into this area so the limit is being fixed to be the last virtual address. (Infact with this patch you can now do that relocation)
* ALL:rgrimes1993-10-133-194/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed patch kit headers and rcsid strings, add $Id$. isa.c: Removed old #ifdef notyet isa_configure code, since it will never be used, and I have done 90% of what it attempted to. Add conflict checking code that searchs back through the devtab's looking for any device that has already been found that may conflict with what we are about to probe. Checks are mode for I/O address, memory address, IRQ, and DRQ. This should stop the screwing up of any device that has alread been found by other device probes. Print out messages when we are not going to probe a device due to a conflict so the user knows WHY something was not found. For example: aha0 not probed due to irq conflict with ahb0 at 11 Now print out a message when a device is not found so the user knows that it was probed for, but could not be found. For example: ed1 not found at 0x320 For devices that have I/O address < 0x100 say that they are on the motherboard, not on isa! The 0x100 magic number is per ISA spec. It may seem funny that pc0 and sc0 report as being on the motherboard, but this is due to the fact that the I/O address used is that of the keyboard controller which IS on the motherboard. We really need to split the keyboard probe from the display probe. It is completly legal to build a pc with out one or the other, or even with out both! npx.c: Return -1 from the probe routine if we are using the Emulator so that the i/o addresses are not printed, this is the same trick used for 486's. Do not print the ``Errors reported via Exception 16'', and ``Errors reported via IRQ 13'' messages any more, since these just lead to more user confusion that anything. It still prints the message ``Error reporting broken, using 387 emulator'' so that the person is aware that there mother board is ill.
* Removed hack that did the R_SHIFT of unsigned numbers, no longer needrgrimes1993-10-132-82/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to do this as I have changed to using PDTI's as the bases for the vm system layout. Eliminate constants SYSPDROFF and SYSPDREND, now use NKPTE to control the size of the kernel virtual space. Eliminate constant PDRPDROFF, now use PDTDTPI to control location of PTD, PTDmap and PTDpde Eliminate constant APDRPDROFF, now use APTDPTDI to control location of APTD, APTDmap and APTDpde. Still need to fix Sysmap location (it is still a constant). .globl statements are now consistent with respect to <comma><space>, the <space> being removed from all .globl statements. Document the fillkpt macro as to what registers control what. Fix some comments that went past column 80, and clean/line some others up. Remove constand for _Crtat, now use KERNBASE+constant, this still needs work. Replace constants for offsets of sigcode parameters with symbolic names from assym.s Mark the sigreturn() call with XXX since we use the hardcoded constant for the system call number, this is bogus and should be a #define or something some place! The kernel before and after this change was verified with cmp, not one byte changed. These are all cosmetic clean up changes that makes the code more correct and easier to move the kernels virtual address space and size.
* Add Page Table Directory Indexes (NKPDE, KPTDI, PTDPTDI, APTDPTDI) torgrimes1993-10-121-1/+5
| | | | be used to replace more constants in locore.
* KPTDI_LAST renamed to KPTDIrgrimes1993-10-122-5/+5
|
* Eliminate definition of I386_PAGE_SIZE and use NBPG insteadrgrimes1993-10-121-23/+29
| | | | | | | | | | | 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.
* Eliminate definition of I386_PAGE_SIZE and use NBPG insteadrgrimes1993-10-121-16/+15
| | | | | Replace 0xFE000000 constants with KERNBASE Use new definition NKPDE in place of a first-last+1 calculation.
* SYSPDROFF and SYSPDREND are now calculated using KERNBASE, KERNSIZE andrgrimes1993-10-102-1052/+1036
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added a compile time #error so that if the user does not specify on ofrgrimes1993-10-101-1/+4
| | | | | | | | 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
* Added PDRSHIFT and KERNSIZE so that the PDR offsets can be calculated inrgrimes1993-10-101-1/+3
| | | | locore.s instead of being constants (3F8, 3FA).
* Correct spelling of "SHMMAXPGS" so the config override will actually work.dg1993-10-091-1/+1
|
* All:rgrimes1993-10-083-31/+41
| | | | | | | | | | | | | | | | | | | | | | | 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.
* All:rgrimes1993-10-084-168/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Define the types of cpu's there are, from NetBSDrgrimes1993-10-081-0/+49
|
* Architecture specific syscalls (i386) from NetBSDrgrimes1993-10-081-0/+10
|
* Removed patch kit headers, and rcsid, add $Id$, relocate Terry Lambertsrgrimes1993-10-081-20/+3
| | | | | | copyright to match the location that it is in NetBSD. Remove the __main() {} dummy function, it belongs in kern/init_main.c
* This is a fix for the 32K DMA buffer region that was not accounted for,rgrimes1993-09-301-15/+12
| | | | | | | | | | | | | | | 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...
* Add symbolic name for system page directory end, and change constant torgrimes1993-09-292-4/+6
| | | | a calculation for the system page directory tables.
* define SHMMAXPGS where it is suppose to be, you can over ride this withrgrimes1993-09-271-0/+7
| | | | | a kernel config options "SHMAXPGS=xxx", default is currently 64 pages due to limit kernel map space.
* >From: rich@id.slip.bcm.tmc.edu.cdrom.com (Rich Murphey)rgrimes1993-09-241-1/+4
| | | | | | | | | | 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
* Removed volatile functions which were causing grief in the system, sincenate1993-09-101-4/+8
| | | | | volatile functions are undefined, and there is no reason to have them in our kernel.
* This is just to shut the compiler uprgrimes1993-09-101-1/+3
| | | | | | | | | | | | | | | | | | | | =================================================================== 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; {
* Changed the pg("ptdi> %x") to a printf and then a panic, since we arergrimes1993-09-091-2/+3
| | | | | | 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!
OpenPOWER on IntegriCloud