#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
299010 |
|
03-May-2016 |
pfg |
sys/amd64: Small spelling fixes.
No functional change.
|
#
269017 |
|
23-Jul-2014 |
royger |
don't set CR4 PSE bit on amd64
Setting PSE together with PAE or in long mode just makes the PSE bit completely ignored, so don't set it.
Sponsored by: Citrix Systems R&D Reviewed by: kib
|
#
262750 |
|
04-Mar-2014 |
jkim |
Revert accidentally committed changes in 262748.
|
#
262748 |
|
04-Mar-2014 |
jkim |
Properly save and restore CR0.
MFC after: 3 days
|
#
130224 |
|
07-Jun-2004 |
peter |
Initial PG_NX support (no-execute page bit) - export the rest of the cpu features (and amd's features). - turn on EFER_NXE, depending on the NX amd feature bit - reorg the identcpu stuff a bit in order to stop treating the amd features as second class features (since it is now a primary feature bit set) and make it easier to export.
|
#
126246 |
|
25-Feb-2004 |
peter |
Since we don't use PG_NX yet, don't turn on EFER_NXE quite yet. This needs to be done based on the cpuid bits. AMD says that we should test the cpuid features bits for certain things, such as this.
|
#
122849 |
|
17-Nov-2003 |
peter |
Initial landing of SMP support for FreeBSD/amd64.
- This is heavily derived from John Baldwin's apic/pci cleanup on i386. - I have completely rewritten or drastically cleaned up some other parts. (in particular, bootstrap) - This is still a WIP. It seems that there are some highly bogus bioses on nVidia nForce3-150 boards. I can't stress how broken these boards are. I have a workaround in mind, but right now the Asus SK8N is broken. The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed. - Most of my testing has been with SCHED_ULE. SCHED_4BSD works. - the apic and acpi components are 'standard'. - If you have an nVidia nForce3-150 board, you are stuck with 'device atpic' in addition, because they somehow managed to forget to connect the 8254 timer to the apic, even though its in the same silicon! ARGH! This directly violates the ACPI spec.
|
#
121996 |
|
03-Nov-2003 |
jhb |
New i386 SMP code:
- The MP code no longer knows anything specific about an MP Table. Instead, the local APIC code adds CPUs via the cpu_add() function when a local APIC is enumerated by an APIC enumerator. - Don't divide the argument to mp_bootaddress() by 1024 just so that we can turn around and mulitply it by 1024 again. - We no longer panic if SMP is enabled but we are booted on a UP machine. - init_secondary(), the asm code between init_secondary() and ap_init() in mpboot.s and ap_init() have all been merged together in C into init_secondary(). - We now use the cpuid feature bits to determine if we should enable PSE, PGE, or VME on each AP. - Due to the change in the implementation of critical sections, acquire the SMP TLB mutex around a slightly larger chunk of code for TLB shootdowns. - Remove some of the debug code from the original SMP implementation that is no longer used or no longer applies to the new APIC code. - Use a temporary hack to disable the ACPI module until the SMP code has been further reorganized to allow ACPI to work as a module again. - Add a DDB command to dump the interesting contents of the IDT.
|
#
121755 |
|
30-Oct-2003 |
jhb |
Include "opt_pmap.h" so that the DISABLE_P* options are honored.
|
#
120654 |
|
01-Oct-2003 |
peter |
Commit Bosko's patch to clean up the PSE/PG_G initialization to and avoid problems with some Pentium 4 cpus and some older PPro/Pentium2 cpus. There are several problems, some documented in Intel errata. This patch: 1) moves the kernel to the second page in the PSE case. There is an errata that says that you Must Not point a 4MB page at physical address zero on older cpus. We avoided bugs here due to sheer luck. 2) sets up PSE page tables right from the start in locore, rather than trying to switch from 4K to 4M (or 2M) pages part way through the boot sequence at the same time that we're messing with PG_G.
For some reason, the pmap work over the last 18 months seems to tickle the problems, and the PAE infrastructure changes disturb the cpu bugs even more.
A couple of people have reported a problem with APM bios calls during boot. I'll work with people to get this resolved.
Obtained from: bmilekic
|
#
112841 |
|
30-Mar-2003 |
jake |
- Add support for PAE and more than 4 gigs of ram on x86, dependent on the kernel opition 'options PAE'. This will only work with device drivers which either use busdma, or are able to handle 64 bit physical addresses.
Thanks to Lanny Baron from FreeBSD Systems for the loan of a test machine with 6 gigs of ram.
Sponsored by: DARPA, Network Associates Laboratories, FreeBSD Systems
|
#
73011 |
|
25-Feb-2001 |
jake |
Remove the leading underscore from all symbols defined in x86 asm and used in C or vice versa. The elf compiler uses the same names for both. Remove asnames.h with great prejudice; it has served its purpose.
Note that this does not affect the ability to generate an aout kernel due to gcc's -mno-underscores option.
moral support from: peter, jhb
|
#
70006 |
|
14-Dec-2000 |
jake |
Use _lapic+offset to access the local apic from assembly language files, rather than the symbols in globals.s. The offsets are generated by genassym.
|
#
65557 |
|
06-Sep-2000 |
jasone |
Major update to the way synchronization is done in the kernel. Highlights include:
* Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.)
* Per-CPU idle processes.
* Interrupts are run in their own separate kernel threads and can be preempted (i386 only).
Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
|
#
64325 |
|
07-Aug-2000 |
tegge |
Add workaround for livelock problem when starting APs.
With more than 1 AP present, an AP could fail to properly release the mp lock before waiting for smp_started to become nonzero.
With early startup of APs, the BSP could fail to properly release the mp lock before waiting for smp_started to become nonzero.
|
#
60973 |
|
27-May-2000 |
jhb |
- Remove unnecessary 'data32' and 'addr32' prefixes and #define's. - Go ahead and use 'lgdt' again instead of hand-assembling the instruction. During testing this code worked fine. If for some reason a 32-bit offset is needed, 'lgdtl' should be used instead of reverting to manual machine code.
Tested by: peter
|
#
60933 |
|
25-May-2000 |
tegge |
Reintroduce a workaround for a gas bug (misassembled lgdt instruction) Use .code16 for the real mode part of the AP bootstrap trampoline code.
|
#
56814 |
|
29-Jan-2000 |
peter |
Remove a workaround for a gas bug. It couldn't assemble a certain lgdt instruction, but the binutils based one is fine and has been for ages.
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
47678 |
|
01-Jun-1999 |
jlemon |
Unifdef VM86.
Reviewed by: silence on on -current
|
#
46129 |
|
27-Apr-1999 |
luoqi |
Enable vmspace sharing on SMP. Major changes are, - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup.
Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
|
#
45562 |
|
10-Apr-1999 |
tegge |
Let BSP wait until all APs are initialized.
|
#
40173 |
|
10-Oct-1998 |
kato |
PC-98 doesn't have CMOS ram.
|
#
38888 |
|
06-Sep-1998 |
tegge |
Maintain a mapping from irq number to (ioapic number, int pin) tuple, and use this when masking/unmasking interrupts.
Maintain a mapping from (iopaic number, int pin) tuple to irq number, and use this when configuring devices and programming the ioapics.
Previous code assumed that irq number was equal to int pin number, and that the ioapic number was 0.
Don't let an AP enter _cpu_switch before all local apics are initialized.
|
#
30265 |
|
10-Oct-1997 |
peter |
Convert the VM86 option from a global option to an option only depended on by the files that use it. Changing the VM86 option now only causes a recompile of a dozen files or so rather than the entire kernel.
|
#
29702 |
|
22-Sep-1997 |
peter |
Turn on CR4_VME on the AP's the same as the BSP. Note that we do not [yet] probe the AP's for their cpuid/capabilities etc, so this is a fudge at best.
Problem noted by: Jonathan Lemon <jlemon@americantv.com>
|
#
28808 |
|
26-Aug-1997 |
peter |
Clean up the SMP AP bootstrap and eliminate the wretched idle procs.
- We now have enough per-cpu idle context, the real idle loop has been revived (cpu's halt now with nothing to do). - Some preliminary support for running some operations outside the global lock (eg: zeroing "free but not yet zeroed pages") is present but appears to cause problems. Off by default. - the smp_active sysctl now behaves differently. It's merely a 'true/false' option. Setting smp_active to zero causes the AP's to halt in the idle loop and stop scheduling processes. - bootstrap is a lot safer. Instead of sharing a statically compiled in stack a number of times (which has caused lots of problems) and then abandoning it, we use the idle context to boot the AP's directly. This should help >2 cpu support since the bootlock stuff was in doubt. - print physical apic id in traps.. helps identify private pages getting out of sync. (You don't want to know how much hair I tore out with this!)
More cleanup to follow, this is more of a checkpoint than a 'finished' thing.
|
#
28717 |
|
25-Aug-1997 |
peter |
s/.align/.p2align/ so that we get the same results when building elf objects (the tools are a bit better)
|
#
26812 |
|
22-Jun-1997 |
peter |
Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code. Things like _curproc reside in a data page that is unique on each cpu, eliminating the expensive macros like: #define curproc (SMPcurproc[cpunumber()])
There are some unresolved bootstrap and address space sharing issues at present, but Steve is waiting on this for other work. There is still some strictly temporary code present that isn't exactly pretty.
This is part of a larger change that has run into some bumps, this part is standalone so it should be safe. The temporary code goes away when the full idle cpu support is finished.
Reviewed by: fsmp, dyson
|
#
25164 |
|
26-Apr-1997 |
peter |
Man the liferafts! Here comes the long awaited SMP -> -current merge!
There are various options documented in i386/conf/LINT, there is more to come over the next few days.
The kernel should run pretty much "as before" without the options to activate SMP mode.
There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment.
This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
|