kernel: mmuptpcheck: use less global memory
This commit is contained in:
parent
7108477c32
commit
87de13f1e0
|
@ -5,6 +5,7 @@
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
|
|
||||||
#include "amd64.h"
|
#include "amd64.h"
|
||||||
|
#define DO_mmuptpcheck
|
||||||
|
|
||||||
//#undef DBG
|
//#undef DBG
|
||||||
//#define DBG(...) jehanne_print(__VA_ARGS__)
|
//#define DBG(...) jehanne_print(__VA_ARGS__)
|
||||||
|
@ -759,19 +760,15 @@ dumpmmuwalk(uintmem addr)
|
||||||
static void
|
static void
|
||||||
mmuptpcheck(Proc *proc)
|
mmuptpcheck(Proc *proc)
|
||||||
{
|
{
|
||||||
|
enum{Tsize = 512};
|
||||||
int lvl, npgs, i;
|
int lvl, npgs, i;
|
||||||
Mpl pl;
|
Mpl pl;
|
||||||
Ptpage *lp, *p, **pgs, *fp;
|
Ptpage *lp, *p, *pgs[Tsize], *fp;
|
||||||
enum{Tsize = 512};
|
uint32_t idx[Tsize];
|
||||||
static Ptpage *pgtab[MACHMAX][Tsize];
|
|
||||||
static uint32_t idxtab[MACHMAX][Tsize];
|
|
||||||
uint32_t *idx;
|
|
||||||
|
|
||||||
if(proc == nil)
|
if(proc == nil)
|
||||||
return;
|
return;
|
||||||
pl = splhi();
|
pl = splhi();
|
||||||
pgs = pgtab[m->machno];
|
|
||||||
idx = idxtab[m->machno];
|
|
||||||
lp = m->pml4;
|
lp = m->pml4;
|
||||||
for(lvl = 3; lvl >= 1; lvl--){
|
for(lvl = 3; lvl >= 1; lvl--){
|
||||||
npgs = 0;
|
npgs = 0;
|
||||||
|
|
Loading…
Reference in New Issue