Commit graph

32 commits

Author SHA1 Message Date
aiju
3a77c01f43 pc kernel: get rid of ugly and partially broken cpuid macros 2018-07-11 14:50:22 +01:00
cinap_lenrek
ed4c812765 pc/pc64: backing out new mp startup code (caused issues with ramnode)
apparently, this causes some quadcore ramnode vm to hang on boot,
even tho all cores successfully started up and are operational.

i suspect some side effect from timersinit()... this would also
mean *notsc= would break it (syncclock() would continue)...
its unclear.

i'm reverting this for now until the problem is better understood.
2016-01-13 23:18:25 +01:00
cinap_lenrek
63f9a4fda3 pc/pc64: bring up ap's one after another, use idlehands() while waiting for thunderbirdsarego
when testing in qemu, launching each ap became slower and slower
because all the ap's where spinning in syncclock() waiting for
cpu0 to update its mach0->tscticks, which happens only much later
after all cpu's have been started up.

now we wait for each cpu to do its timer callibration and
manually update our tscticks while we wait and each cpu will
not spin but halt while waiting for active.thunderbirdsarego.
this reduces the system load and noise for timer callibration
and makes the mp startup linear with regard to the number of
cores.
2016-01-11 06:47:52 +01:00
cinap_lenrek
ad87473109 pc/pc64: remove mpshutdown print 2016-01-07 19:37:47 +01:00
cinap_lenrek
41383ad012 kernel: change active.machs from bitmap to char array to support up to 64 cpus on pc64 2016-01-05 05:32:40 +01:00
cinap_lenrek
7523131e78 pc, pc64: untangle acpireset() from mpshutdown()
mpshutdown() used to call acpireset() making it impossible to build
a kernel without archacpi. now, mpshutdown() is a helper function
that only shuts down the application processors that gets used from
mpreset() and acpireset().

the generic machine reset code in exported by devarch's archreset()
function that is called by mpreset() and from acpireset() as a fallback.
so the code duplication that was in mpshutdown() is avoided.
2014-12-19 23:34:43 +01:00
cinap_lenrek
bb95002c2d pc, pc64: implement acpi reset (for efi)
x230 booted in efi only (no csp) mode hangs
when traditional i8042reset() keyboard reset
is tried.

so we try acpireset() first which discoveres
and writes the acpi reset register.
2014-11-02 03:52:53 +01:00
cinap_lenrek
e81e1a4aed pc, pc64: make mtrr() callable from interrupt context and before mpinit
to make it possible to mark the bootscreen framebuffer
as write combining in early initialization, mtrr() is
changed not not to error() but to return an error string.

as bootscreen() is used before multiprocessor initialization,
we have to synchronize the mtrr's for every processor as
it comes online. for this, a new mtrrsync() function is
provided that is called from cpuidentify() if mtrr support
is indicated.

the boot processor runs mtrrsync() which snarfs the
registers. later, mtrrsync() is run again from the
application processors which apply the values from the
boot processor.

checkmtrr() from mp.c was removed as its task is also
done by mtrrsync() now.
2014-10-21 06:03:03 +02:00
cinap_lenrek
5246416621 pc, pc64: simplify reboot code
as we do system reset and reboot only from boot processor cpu0 now,
theres no need for active.rebooting conditional variable.
mpshutdown() will unconditionally park application processors and
and cpu0 boots the new kernel or calls mpshutdown() causing system
reset.
2014-05-29 18:50:52 +02:00
cinap_lenrek
215f6cc64a pc: initiate machine reset only from boot processors in mpshutdown()
in vmware, mpshutdown() used to hang in i8042reset() when not
called from the boot processor, so instead of reseting from first
cpu that acquires the shutdown lock, we park all application
processors and let the boot processor do the reset.
2014-05-29 18:24:40 +02:00
cinap_lenrek
f2f46f4a33 pc64: amd64 kernel reboot support 2014-03-16 20:22:59 +01:00
cinap_lenrek
28ad4e6616 pc kernel: split mpstartap() and squidboy into separate file... stuff for amd64 2014-02-01 10:23:17 +01:00
cinap_lenrek
8aff0e5be6 mp/pci: msi support for hypertransport platform 2013-09-09 00:44:08 +02:00
cinap_lenrek
19219d5a95 archmp: checksum _MP_ structure before use, coherence() and comments (import from sources)
we used to only test the checksum of the PCMP structure referenced by
the _MP_ without checking _MP_ itself. now fixed.

geoff added some coherence() calls and comments in the mpstartup and
apic code which seems to be a good idea.
2012-08-25 14:06:42 +02:00
cinap_lenrek
7fdf820589 pckernel: use constants instead of hardcoding cpuid bits in various places 2012-08-17 04:03:51 +02:00
cinap_lenrek
81d43b6f9d kernel: make mp mode and msi interrupts the default. *msi -> *nomsi 2012-07-25 23:18:26 +02:00
cinap_lenrek
a47521a3ed experimental acpi support for apic irq routing 2012-06-17 23:12:19 +02:00
cinap_lenrek
9b29d5be82 mp: cleanup mp code 2012-06-15 22:10:24 +02:00
cinap_lenrek
ca12be87df merge 2012-05-15 02:05:31 +02:00
cinap_lenrek
299cf4e4b9 kernel: print format 2012-05-03 08:53:47 +02:00
cinap_lenrek
1d58cb8832 pci: add pcicap 2012-02-11 00:49:39 +01:00
cinap_lenrek
9310f981b0 kernel: xalloc error handling 2011-12-14 00:22:46 +01:00
cinap_lenrek
bf3476d661 kernel: fix inproper use of malloc/smalloc 2011-12-12 16:55:26 +01:00
aiju
61660acf68 fixed stupid bug in msi code 2011-05-19 04:56:01 +00:00
aiju
da5d6db6f5 added support for 32 bit MSI 2011-05-17 16:51:30 +00:00
aiju
8e1fbbeda5 added APIC ID remapping 2011-05-16 02:18:29 +00:00
aiju
78a02732e3 removed stale variable 2011-05-16 01:39:59 +00:00
aiju
2e1fcabe9e improved interrupt vector allocation code 2011-05-16 01:28:41 +00:00
aiju
fe668572ff added basic MSI and PCI capabilities support 2011-05-16 00:35:16 +00:00
aiju
a71e017fcc added mp table override 2011-04-24 17:39:48 +02:00
Taru Karttunen
a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen
e5888a1ffd Import sources from 2011-03-30 iso image 2011-03-30 15:46:40 +03:00