summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-10-21 06:03:03 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-10-21 06:03:03 +0200
commite81e1a4aeddad2bc612c9c5243573250b6ff33a4 (patch)
treef1c178d36e86819bc725fa3b009295553b01e737 /sys/src/9/pc64
parentdfe8c8bffb497ecd46e9e43eb838ff3e10912663 (diff)
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.
Diffstat (limited to 'sys/src/9/pc64')
-rw-r--r--sys/src/9/pc64/dat.h5
-rw-r--r--sys/src/9/pc64/fns.h3
-rw-r--r--sys/src/9/pc64/squidboy.c3
3 files changed, 2 insertions, 9 deletions
diff --git a/sys/src/9/pc64/dat.h b/sys/src/9/pc64/dat.h
index 0bf421d79..5b4103610 100644
--- a/sys/src/9/pc64/dat.h
+++ b/sys/src/9/pc64/dat.h
@@ -223,11 +223,6 @@ struct Mach
int pdballoc;
int pdbfree;
- vlong mtrrcap;
- vlong mtrrdef;
- vlong mtrrfix[11];
- vlong mtrrvar[32]; /* 256 max. */
-
uintptr stack[1];
};
diff --git a/sys/src/9/pc64/fns.h b/sys/src/9/pc64/fns.h
index 04e1c5d69..fe67edded 100644
--- a/sys/src/9/pc64/fns.h
+++ b/sys/src/9/pc64/fns.h
@@ -102,9 +102,10 @@ void mfence(void);
#define mmuflushtlb() putcr3(getcr3())
void mmuinit(void);
uintptr *mmuwalk(uintptr*, uintptr, int, int);
-int mtrr(uvlong, uvlong, char *);
+char* mtrr(uvlong, uvlong, char *);
void mtrrclock(void);
int mtrrprint(char *, long);
+void mtrrsync(void);
void noteret(void);
uchar nvramread(int);
void nvramwrite(int, uchar);
diff --git a/sys/src/9/pc64/squidboy.c b/sys/src/9/pc64/squidboy.c
index dab78ea2d..653802955 100644
--- a/sys/src/9/pc64/squidboy.c
+++ b/sys/src/9/pc64/squidboy.c
@@ -8,8 +8,6 @@
#include "mp.h"
-extern void checkmtrr(void);
-
static void
squidboy(Apic* apic)
{
@@ -17,7 +15,6 @@ squidboy(Apic* apic)
mmuinit();
cpuidentify();
cpuidprint();
- checkmtrr();
apic->online = 1;
coherence();