From e81e1a4aeddad2bc612c9c5243573250b6ff33a4 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 21 Oct 2014 06:03:03 +0200 Subject: 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. --- sys/src/9/pc/screen.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'sys/src/9/pc/screen.c') diff --git a/sys/src/9/pc/screen.c b/sys/src/9/pc/screen.c index f076b4431..494c6e908 100644 --- a/sys/src/9/pc/screen.c +++ b/sys/src/9/pc/screen.c @@ -512,13 +512,7 @@ vgalinearaddr0(VGAscr *scr, ulong paddr, int size) scr->paddr = paddr; scr->apsize = nsize; - if(up != nil){ - /* let mtrr harmlessly fail on old CPUs, e.g., P54C */ - if(!waserror()){ - mtrr(npaddr, nsize, "wc"); - poperror(); - } - } + mtrr(npaddr, nsize, "wc"); return nil; } -- cgit v1.2.3