ReactOS  0.4.14-dev-554-g2f8d847
mmuobject.c File Reference
#include <stdarg.h>
#include "ppcmmu/mmu.h"
#include "ppcmmu/mmuutil.h"
#include "mmuobject.h"
Include dependency graph for mmuobject.c:

Go to the source code of this file.

Classes

struct  _MmuFreePage
 
struct  _MmuFreeTree
 
struct  _MmuVsidTree
 
struct  _MmuVsidInfo
 

Macros

#define MMU_ADDR_RESERVED   ((vaddr_t)-2)
 

Typedefs

typedef unsigned long ULONG
 
typedef struct _MmuFreePage MmuFreePage
 
typedef struct _MmuFreeTree MmuFreeTree
 
typedef struct _MmuVsidTree MmuVsidTree
 
typedef struct _MmuVsidInfo MmuVsidInfo
 

Functions

void fmtout (const char *fmt,...)
 
int ptegreload (ppc_trap_frame_t *frame, vaddr_t addr)
 
void SerialSetUp (int deviceType, void *deviceAddr, int baud)
 
int SerialInterrupt (int n, ppc_trap_frame_t *tf)
 
void TakeException (int n, ppc_trap_frame_t *tf)
 
int mmuisfreepage (paddr_t pageno)
 
void copy (void *t, void *s, int b)
 
paddr_t mmunewpage ()
 
void dumpmap ()
 
void trapcallback (int action, ppc_trap_frame_t *trap_frame)
 
int _mmumain (int action, void *arg1, void *arg2, void *arg3, void *tf)
 
void outchar (char c)
 
void outstr (const char *str)
 
void outdig (int dig)
 
void outnum (unsigned long num)
 
void mmusetramsize (paddr_t ramsize)
 
int ignore (int trapCode, ppc_trap_frame_t *trap)
 
int fpenable (int trapCode, ppc_trap_frame_t *trap)
 
void copy_trap_handler (int trap)
 
void initme ()
 
ppc_map_tallocpage ()
 
void freepage (ppc_map_t *PagePtr)
 
MmuVsidTreeallocvsidtree ()
 
void freevsidtree (MmuVsidTree *tree)
 
voidallocvsid (int vsid)
 
void mmuallocvsid (int vsid, int mask)
 
MmuVsidInfofindvsid (int vsid)
 
void freevsid (int vsid)
 
void mmufreevsid (int vsid, int mask)
 
int mmuaddpage (ppc_map_info_t *info, int count)
 
ppc_pteg_tPtegFromPage (ppc_map_t *map, int hfun)
 
int PageMatch (vaddr_t addr, ppc_pte_t pte)
 
ppc_map_tmmuvirtmap (vaddr_t addr)
 
void mmudelpage (ppc_map_info_t *info, int count)
 
void mmugetpage (ppc_map_info_t *info, int count)
 
void mmusetvsid (int start, int end, int vsid)
 
void printmap (vaddr_t vaddr, ppc_map_t *map)
 
void dumptree (vaddr_t vaddr, MmuVsidTree *tree)
 
void dumpvsid (MmuVsidInfo *vsid)
 
void callkernel (void *fun_ptr, void *arg)
 

Variables

MmuTrapHandler callback [0x30]
 
MmuFreePageFreeList = 0
 
int Clock = 0
 
int TreeAlloc = 0
 
int GdbAttach = 0
 
int Booted = 0
 
int Vsid [16]
 
paddr_t RamSize
 
paddr_t FirstUsablePage
 
paddr_t NextPage
 
MmuVsidTreeNextTreePage = 0
 
MmuFreeTreeFreeTree
 
MmuVsidInfoSegs [16]
 
MmuVsidInfoVsidHead = 0
 
charserport
 
int trap_start []
 
int trap_end []
 

Macro Definition Documentation

◆ MMU_ADDR_RESERVED

#define MMU_ADDR_RESERVED   ((vaddr_t)-2)

Definition at line 42 of file mmuobject.c.

Typedef Documentation

◆ MmuFreePage

◆ MmuFreeTree

◆ MmuVsidInfo

◆ MmuVsidTree

◆ ULONG

typedef unsigned long ULONG

Definition at line 6 of file mmuobject.c.

Function Documentation

◆ _mmumain()

int _mmumain ( int  action,
void arg1,
void arg2,
void arg3,
void tf 
)

Definition at line 81 of file mmuobject.c.

82 {
83  ppc_trap_frame_t *trap_frame = (action >= 0x100) ? tf : arg1;
84  int ret = 0, tmp, i;
85 
86  switch(action)
87  {
88  /* Trap Handlers */
89  case 3:
90  if(!ptegreload(trap_frame, trap_frame->dar))
91  {
92  trapcallback(action, trap_frame);
93  }
94  break;
95  case 4:
96  if(!ptegreload(trap_frame, trap_frame->srr0))
97  {
98  trapcallback(action, trap_frame);
99  }
100  break;
101 
102  case 5:
103  /* EE -- Try to get a serial interrupt if debugging enabled, then fall
104  * back to primary handler
105  */
106  if (!SerialInterrupt(action, trap_frame) && callback[action])
107  {
108  trapcallback(action, trap_frame);
109  }
110  break;
111  case 0:
112  case 2:
113  case 6:
114  case 7:
115  case 8:
116  case 9:
117  case 0xa:
118  case 0xc:
119  case 0x20:
120  trapcallback(action, trap_frame);
121  break;
122 
123  /* MMU Functions */
124  case 0x100:
125  initme();
126  trap_frame->srr1 |= 0x8000;
127  break;
128  case 0x101:
129  ret = mmuaddpage(arg1, (int)arg2);
130  break;
131  case 0x102:
132  mmudelpage(arg1, (int)arg2);
133  break;
134  case 0x103:
135  mmusetvsid((int)arg1, (int)arg2, (int)arg3);
136  break;
137  case 0x104:
138  ret = (int)callback[(int)arg1];
140  break;
141  case 0x105:
142  mmugetpage(arg1, (int)arg2);
143  break;
144  case 0x106:
145  ret = mmunitest();
146  break;
147  case 0x107:
148  callkernel(arg1, arg2);
149  break;
150  case 0x108:
152  break;
153  case 0x109:
154  return FirstUsablePage;
155  case 0x10a:
156  mmuallocvsid((int)arg1, (int)arg2);
157  break;
158  case 0x10b:
159  mmufreevsid((int)arg1, (int)arg2);
160  break;
161  case 0x10c:
162  ret = mmunewpage();
163  break;
164  case 0x10d:
165  copy(trap_frame, (void *)0xf040, sizeof(*trap_frame));
166  __asm__("mr 1,%0\n\tb trap_finish_start" : : "r"
167  (((int)trap_frame) - 16));
168  break;
169  case 0x10e:
170  dumpmap();
171  break;
172 
173  case 0x200:
174  SerialSetUp((int)arg1, arg2, 9600);
175  break;
176  case 0x201:
177  TakeException((int)arg1, trap_frame);
178  break;
179 
180  default:
181  while(1);
182  }
183 
184  /* Restore bats when we were called voluntarily. We may not get a chance
185  * to do this after returning.
186  *
187  * At this point, we're in address space that matches physical space.
188  * We turn off mapping, restore bats, then let rfi switch us back to where
189  * we came.
190  */
191 
192  if (action >= 0x100)
193  {
194  __asm__("mfmsr %0" : "=r" (tmp));
195  tmp &= ~0x30;
196  __asm__("mtmsr %0" : : "r" (tmp));
197 
198  for(i = 0; i < 4; i++) {
199  SetBat(i, 0, GetPhys(0xf000 + i * 16), GetPhys(0xf004 + i * 16));
200  SetBat(i, 1, GetPhys(0xf008 + i * 16), GetPhys(0xf00c + i * 16));
201  }
202  }
203 
204  return ret;
205 }
void mmuallocvsid(int vsid, int mask)
Definition: mmuobject.c:450
void mmudelpage(ppc_map_info_t *info, int count)
Definition: mmuobject.c:590
void callkernel(void *fun_ptr, void *arg)
Definition: mmuobject.c:742
int mmuaddpage(ppc_map_info_t *info, int count)
Definition: mmuobject.c:494
unsigned long srr1
Definition: mmu.h:115
HFONT tf
Definition: icontest.c:17
int(* MmuTrapHandler)(int trapid, ppc_trap_frame_t *trap)
Definition: mmu.h:118
void TakeException(int n, ppc_trap_frame_t *tf)
Definition: gdblib.c:464
unsigned long paddr_t
Definition: mmu.h:89
void SetBat(int bat, int inst, int batHi, int batLo)
Definition: mmu.c:236
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
void trapcallback(int action, ppc_trap_frame_t *trap_frame)
Definition: mmuobject.c:207
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
int ptegreload(ppc_trap_frame_t *frame, vaddr_t addr)
Definition: mmuobject.c:678
unsigned long dar
Definition: mmu.h:115
unsigned long srr0
Definition: mmu.h:115
void dumpmap()
Definition: mmuobject.c:730
GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg3
Definition: glext.h:9515
paddr_t FirstUsablePage
Definition: mmuobject.c:64
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
void copy(void *t, void *s, int b)
Definition: mmuobject.c:228
void SerialSetUp(int deviceType, void *deviceAddr, int baud)
Definition: gdblib.c:181
ULONG GetPhys(ULONG Addr)
int mmunitest(void)
Definition: mmutest.c:5
paddr_t mmunewpage()
Definition: mmuobject.c:558
int ret
void mmusetvsid(int start, int end, int vsid)
Definition: mmuobject.c:664
void mmufreevsid(int vsid, int mask)
Definition: mmuobject.c:484
void mmugetpage(ppc_map_info_t *info, int count)
Definition: mmuobject.c:630
const WCHAR * action
Definition: action.c:7783
void mmusetramsize(paddr_t ramsize)
Definition: mmuobject.c:285
int SerialInterrupt(int n, ppc_trap_frame_t *tf)
Definition: gdblib.c:397
void initme()
Definition: mmuobject.c:323
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by copy_trap_handler().

◆ allocpage()

ppc_map_t* allocpage ( )

Definition at line 356 of file mmuobject.c.

357 {
358  MmuFreePage *FreePage = 0;
359 
360  if (FreeList)
361  {
362  if ((void *)FreeList == (void *)PpcPageTable)
363  {
364  fmtout("Problem! FreeList: page 0 is free\n");
365  while(1);
366  }
367 
368  FreePage = FreeList;
371  return ((ppc_map_t*)FreePage);
372  }
373  else
374  {
376  {
377  NextPage++;
378  }
380  {
381  if (NextPage < 0x30)
382  {
383  fmtout("Problem! NextPage is low (%x)\n", NextPage);
384  while(1);
385  }
386 
388  return &PpcPageTable[NextPage++];
389  }
390  else
391  {
392  return NULL;
393  }
394  }
395 }
paddr_t RamSize
Definition: mmuobject.c:64
int mmuisfreepage(paddr_t pageno)
Definition: mmuobject.c:658
paddr_t NextPage
Definition: mmuobject.c:64
#define PPC_PAGE_NUMBER(x)
Definition: mmu.h:66
#define MMU_ADDR_RESERVED
Definition: mmuobject.c:42
smooth NULL
Definition: ftsmooth.c:416
void fmtout(const char *fmt,...)
Definition: mmuobject.c:254
MmuFreePage * FreeList
Definition: mmuobject.c:60
#define PpcPageTable
Definition: mmu.h:63
struct _MmuFreePage * next
Definition: mmuobject.c:47

Referenced by allocvsid(), allocvsidtree(), mmuaddpage(), and mmunewpage().

◆ allocvsid()

void* allocvsid ( int  vsid)

Definition at line 437 of file mmuobject.c.

438 {
439  ppc_map_t *map = allocpage();
440  MmuVsidInfo *info;
441  if(!map) return 0;
442  map->pte.pteh = map->pte.ptel = 0;
444  info->vsid = vsid;
445  info->next = VsidHead;
446  VsidHead = info;
447  return info;
448 }
struct _test_info info[]
Definition: SetCursorPos.c:19
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
MmuVsidInfo * VsidHead
Definition: mmuobject.c:67
Definition: _map.h:44
ppc_map_t * allocpage()
Definition: mmuobject.c:356
#define PpcPageTable
Definition: mmu.h:63

Referenced by mmuallocvsid().

◆ allocvsidtree()

MmuVsidTree* allocvsidtree ( )

Definition at line 405 of file mmuobject.c.

406 {
407  if(FreeTree)
408  {
411  return result;
412  }
413  else if(TreeAlloc >= 3 || !NextTreePage)
414  {
415  ppc_map_t *map = allocpage();
417  TreeAlloc = 1;
418  return NextTreePage;
419  }
420  else
421  {
422  return &NextTreePage[TreeAlloc++];
423  }
424 }
int TreeAlloc
Definition: mmuobject.c:63
MmuFreeTree * FreeTree
Definition: mmuobject.c:66
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
Definition: _map.h:44
struct _MmuFreeTree * next
Definition: mmuobject.c:50
ppc_map_t * allocpage()
Definition: mmuobject.c:356
#define PpcPageTable
Definition: mmu.h:63
MmuVsidTree * NextTreePage
Definition: mmuobject.c:65
GLuint64EXT * result
Definition: glext.h:11304

Referenced by mmuaddpage().

◆ callkernel()

void callkernel ( void fun_ptr,
void arg 
)

Definition at line 742 of file mmuobject.c.

743 {
744  int i;
745 
746  Booted = 1;
747 
748  for (i = 0; i < 16; i++)
749  {
750  // Patch up the vsid map. We shouldn't muck with these until we're
751  // booted.
752  mmusetvsid(i, i+1, Vsid[i]);
753  }
754 
755  void (*fun)(void *) = fun_ptr;
756  __asm__("mfmsr 3\n\t"
757  "ori 3,3,0x30\n\t"
758  "mtmsr 3\n\t"
759  "mtsdr1 %0\n\t"
760  "mr 0,%2\n\t"
761  "mtctr 0\n\t"
762  "mr 3,%1\n\t"
763  "bctrl\n\t"
764  : : "r" (HTABORG), "r" (arg), "r" (fun));
765  /* BYE ! */
766 }
#define HTABORG
Definition: mmu.h:58
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
int Vsid[16]
Definition: mmuobject.c:63
int Booted
Definition: mmuobject.c:63
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
void mmusetvsid(int start, int end, int vsid)
Definition: mmuobject.c:664

Referenced by _mmumain().

◆ copy()

void copy ( void t,
void s,
int  b 
)

Definition at line 228 of file mmuobject.c.

229 {
230  while(bytes--) *((char *)target++) = *((char *)src++);
231 }
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
GLenum src
Definition: glext.h:6340
GLenum target
Definition: glext.h:7315

Referenced by _mmumain(), and trapcallback().

◆ copy_trap_handler()

void copy_trap_handler ( int  trap)

Definition at line 309 of file mmuobject.c.

310 {
311  int i;
312  paddr_t targetArea = trap * 0x100;
313 
314  /* Set target addr */
315  trap_end[0] = (int)_mmumain;
316 
317  for (i = 0; i <= trap_end - trap_start; i++)
318  {
319  SetPhys(targetArea + (i * sizeof(int)), trap_start[i]);
320  }
321 }
int trap_end[]
int _mmumain(int action, void *arg1, void *arg2, void *arg3, void *tf)
Definition: mmuobject.c:81
unsigned long paddr_t
Definition: mmu.h:89
int trap_start[]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void SetPhys(ULONG Addr, ULONG Data)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by initme().

◆ dumpmap()

void dumpmap ( )

Definition at line 730 of file mmuobject.c.

731 {
732  int i,j;
733  ppc_map_t *map;
734  MmuVsidInfo *vsid;
735  fmtout("Address spaces:\n");
736  for (vsid = VsidHead; vsid; vsid = vsid->next)
737  {
738  dumpvsid(vsid);
739  }
740 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void fmtout(const char *fmt,...)
Definition: mmuobject.c:254
void dumpvsid(MmuVsidInfo *vsid)
Definition: mmuobject.c:716
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
MmuVsidInfo * VsidHead
Definition: mmuobject.c:67
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum map
Definition: glfuncs.h:262
struct _MmuVsidInfo * next
Definition: mmuobject.c:57

Referenced by _mmumain().

◆ dumptree()

void dumptree ( vaddr_t  vaddr,
MmuVsidTree tree 
)

Definition at line 703 of file mmuobject.c.

704 {
705  int j;
706 
707  for (j = 0; j < 256; j++)
708  {
709  if (tree->leaves[j])
710  {
711  printmap(vaddr | (j << 12), tree->leaves[j]);
712  }
713  }
714 }
void printmap(vaddr_t vaddr, ppc_map_t *map)
Definition: mmuobject.c:696
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250

Referenced by dumpvsid().

◆ dumpvsid()

void dumpvsid ( MmuVsidInfo vsid)

Definition at line 716 of file mmuobject.c.

717 {
718  int i;
719 
720  fmtout("vsid %d (%x):\n", vsid->vsid>>4, vsid->vsid<<28);
721  for (i = 0; i < 256; i++)
722  {
723  if (vsid->tree[i])
724  {
725  dumptree((vsid->vsid<<28) | i << 20, vsid->tree[i]);
726  }
727  }
728 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void fmtout(const char *fmt,...)
Definition: mmuobject.c:254
MmuVsidTree * tree[256]
Definition: mmuobject.c:58
void dumptree(vaddr_t vaddr, MmuVsidTree *tree)
Definition: mmuobject.c:703

Referenced by dumpmap().

◆ findvsid()

MmuVsidInfo* findvsid ( int  vsid)

Definition at line 460 of file mmuobject.c.

461 {
462  MmuVsidInfo *info;
463  for(info = VsidHead; info; info = info->next)
464  {
465  if(info->vsid == vsid) return info;
466  }
467  return 0;
468 }
struct _test_info info[]
Definition: SetCursorPos.c:19
MmuVsidInfo * VsidHead
Definition: mmuobject.c:67

Referenced by freevsid(), mmuaddpage(), and mmusetvsid().

◆ fmtout()

void fmtout ( const char fmt,
  ... 
)

Definition at line 254 of file mmuobject.c.

255 {
256  va_list ap;
257  va_start(ap, str);
258  while(*str)
259  {
260  if(*str == '%')
261  {
262  if(str[1] == '%')
263  {
264  outchar('%');
265  }
266  else if(str[1] == 's')
267  {
268  outstr(va_arg(ap, const char *));
269  }
270  else
271  {
272  outnum(va_arg(ap, int));
273  }
274  str++;
275  }
276  else
277  {
278  outchar(*str);
279  }
280  str++;
281  }
282  va_end(ap);
283 }
#define va_end(ap)
Definition: acmsvcex.h:90
void outchar(char c)
Definition: mmuobject.c:223
const WCHAR * str
char * va_list
Definition: acmsvcex.h:78
#define va_arg(ap, T)
Definition: acmsvcex.h:89
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
void outnum(unsigned long num)
Definition: mmuobject.c:244
void outstr(const char *str)
Definition: mmuobject.c:233

Referenced by allocpage(), dumpmap(), dumpvsid(), mmuaddpage(), printmap(), and ptegreload().

◆ fpenable()

int fpenable ( int  trapCode,
ppc_trap_frame_t trap 
)

Definition at line 301 of file mmuobject.c.

302 {
303  /* Turn on FP */
304  trap->srr1 |= 8192;
305  return 1;
306 }
unsigned long srr1
Definition: mmu.h:115

Referenced by initme().

◆ freepage()

void freepage ( ppc_map_t PagePtr)

Definition at line 397 of file mmuobject.c.

398 {
399  MmuFreePage *FreePage = (MmuFreePage*)PagePtr;
400  PagePtr->proc = PagePtr->addr = 0;
401  FreePage->next = FreeList;
402  FreeList = FreePage;
403 }
unsigned long proc
Definition: mmu.h:102
vaddr_t addr
Definition: mmu.h:103
MmuFreePage * FreeList
Definition: mmuobject.c:60

Referenced by freevsid(), freevsidtree(), and mmudelpage().

◆ freevsid()

void freevsid ( int  vsid)

Definition at line 470 of file mmuobject.c.

471 {
472  int i;
473  MmuVsidInfo *info = findvsid(vsid);
474  if(!info) return;
476  for(i = 0; i < 256; i++)
477  {
478  if(info->tree[i])
479  freevsidtree(info->tree[i]);
480  }
481  freepage(map);
482 }
void freepage(ppc_map_t *PagePtr)
Definition: mmuobject.c:397
void freevsidtree(MmuVsidTree *tree)
Definition: mmuobject.c:426
MmuVsidInfo * findvsid(int vsid)
Definition: mmuobject.c:460
unsigned long paddr_t
Definition: mmu.h:89
#define PPC_PAGE_NUMBER(x)
Definition: mmu.h:66
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: _map.h:44
#define PpcPageTable
Definition: mmu.h:63

Referenced by mmufreevsid().

◆ freevsidtree()

void freevsidtree ( MmuVsidTree tree)

Definition at line 426 of file mmuobject.c.

427 {
428  int i;
429  for(i = 0; i < 256; i++)
430  if(tree->leaves[i])
431  freepage(tree->leaves[i]);
432  MmuFreeTree *NextFreeTree = (MmuFreeTree *)tree;
433  NextFreeTree->next = FreeTree;
434  FreeTree = NextFreeTree;
435 }
void freepage(ppc_map_t *PagePtr)
Definition: mmuobject.c:397
MmuFreeTree * FreeTree
Definition: mmuobject.c:66
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
struct _MmuFreeTree * next
Definition: mmuobject.c:50

Referenced by freevsid().

◆ ignore()

◆ initme()

void initme ( void  )

Definition at line 323 of file mmuobject.c.

324 {
325  int i;
326 
327  for(i = 0; i < HTABSIZ / sizeof(int); i++)
328  {
329  ((int *)HTABORG)[i] = 0;
330  }
331 
332  /* Default to hang on unknown exception */
333  for(i = 0; i < 30; i++)
334  {
336  if (i != 1) /* Preserve reset handler */
338  }
339 
340  /* Serial Interrupt */
341  callback[5] = 0; /* Do nothing until the user asks */
342 
343  /* Program Exception */
345 
346  /* Floating point exception */
347  callback[8] = fpenable;
348 
349  /* Ignore decrementer and EE */
350  callback[9] = ignore;
351 
352  /* Single Step */
354 }
#define HTABORG
Definition: mmu.h:58
int fpenable(int trapCode, ppc_trap_frame_t *trap)
Definition: mmuobject.c:301
int ignore(int trapCode, ppc_trap_frame_t *trap)
Definition: mmuobject.c:296
int(* MmuTrapHandler)(int trapid, ppc_trap_frame_t *trap)
Definition: mmu.h:118
void TakeException(int n, ppc_trap_frame_t *tf)
Definition: gdblib.c:464
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define HTABSIZ
Definition: mmu.h:59
void copy_trap_handler(int trap)
Definition: mmuobject.c:309
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by _mmumain().

◆ mmuaddpage()

int mmuaddpage ( ppc_map_info_t info,
int  count 
)

Definition at line 494 of file mmuobject.c.

495 {
496  int i, iva = 0, vsid, phys, virt;
497  int ptehi;
498  int ptelo, vsid_table_hi, vsid_table_lo;
499  ppc_map_t *PagePtr;
500  MmuVsidInfo *VsidInfo;
501  MmuVsidTree *VsidTree;
502 
503  for(i = 0; i < count; i++)
504  {
505  info[i].phys &= ~PPC_PAGE_MASK;
506  info[i].addr &= ~PPC_PAGE_MASK;
507 
508  virt = info[i].addr;
509  vsid = ((info[i].addr >> 28) & 15) | (info[i].proc << 4);
510  VsidInfo = findvsid(vsid);
511 
512  if(!VsidInfo) return -1;
513 
514  ptehi = (1 << 31) | (vsid << 7) | ((virt >> 22) & 0x3f);
515 
516  if(info[i].phys) {
517  PagePtr = &PpcPageTable[PPC_PAGE_NUMBER(info[i].phys)];
518  } else {
519  PagePtr = allocpage();
520  if(!PagePtr)
521  {
522  return 0;
523  }
524  }
525 
526  phys = PPC_PAGE_ADDR((PagePtr - PpcPageTable));
527  ptelo = phys & ~PPC_PAGE_MASK;
528 
529  if (phys < 0x30000)
530  {
531  /* Should not be allocating physical */
532  fmtout("Allocated physical: %x, logical %x\n", phys, virt);
533  fmtout("PagePtr %x (page %d)\n", PagePtr, i);
534  fmtout("info [ %x %x %x %x ]\n", info[i].proc, info[i].addr, info[i].flags, info[i].phys);
535  while(1);
536  }
537 
538  /* Update page data */
539  PagePtr->pte.pteh = ptehi;
540  PagePtr->pte.ptel = ptelo;
541  PagePtr->proc = info[i].proc;
542  PagePtr->addr = virt;
543 
544  vsid_table_hi = virt >> 20 & 255;
545  vsid_table_lo = virt >> 12 & 255;
546 
547  if(!VsidInfo->tree[vsid_table_hi])
548  VsidInfo->tree[vsid_table_hi] = allocvsidtree();
549  VsidTree = VsidInfo->tree[vsid_table_hi];
550  if(!VsidTree) return 0;
551  VsidTree->leaves[vsid_table_lo] = PagePtr;
552 
553  __asm__("tlbie %0\n\tsync\n\tisync" : : "r" (iva));
554  }
555  return 1;
556 }
ppc_pte_t pte
Definition: mmu.h:101
unsigned long proc
Definition: mmu.h:102
GLuint GLuint GLsizei count
Definition: gl.h:1545
MmuVsidInfo * findvsid(int vsid)
Definition: mmuobject.c:460
ppc_map_t * leaves[256]
Definition: mmuobject.c:53
static HANDLE proc()
Definition: pdb.c:32
#define PPC_PAGE_NUMBER(x)
Definition: mmu.h:66
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
vaddr_t addr
Definition: mmu.h:103
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
void fmtout(const char *fmt,...)
Definition: mmuobject.c:254
#define PPC_PAGE_MASK
Definition: mmu.h:68
MmuVsidTree * tree[256]
Definition: mmuobject.c:58
unsigned long pteh
Definition: mmu.h:93
GLbitfield flags
Definition: glext.h:7161
GLenum const GLvoid * addr
Definition: glext.h:9621
unsigned long ptel
Definition: mmu.h:93
ppc_map_t * allocpage()
Definition: mmuobject.c:356
MmuVsidTree * allocvsidtree()
Definition: mmuobject.c:405
#define PpcPageTable
Definition: mmu.h:63

Referenced by _mmumain(), and mmunitest().

◆ mmuallocvsid()

void mmuallocvsid ( int  vsid,
int  mask 
)

Definition at line 450 of file mmuobject.c.

451 {
452  int i;
453  for(i = 0; i < 16; i++)
454  {
455  if(mask & (1 << i))
456  allocvsid((vsid << 4) + i);
457  }
458 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum GLint GLuint mask
Definition: glext.h:6028
void * allocvsid(int vsid)
Definition: mmuobject.c:437

Referenced by _mmumain().

◆ mmudelpage()

void mmudelpage ( ppc_map_info_t info,
int  count 
)

Definition at line 590 of file mmuobject.c.

591 {
592  int i, j, k, ipa;
593  ppc_map_t *PagePtr;
594  ppc_pteg_t *PageEntry;
595  ppc_pte_t ZeroPte = { 0 };
596 
597  for(i = 0; i < count; i++)
598  {
599  if (info[i].phys)
600  {
601  ipa = info[i].phys;
602  PagePtr = &PpcPageTable[ipa];
603  info[i].proc = PagePtr->proc;
604  info[i].addr = PagePtr->addr;
605  }
606  else
607  {
608  PagePtr = mmuvirtmap(info[i].addr);
609  ipa = PPC_PAGE_ADDR(PagePtr - PpcPageTable);
610  }
611 
612  for(j = 0; j < 2; j++)
613  {
614  PageEntry = PtegFromPage(PagePtr, j);
615  for(k = 0; k < 8; k++)
616  {
617  if(PageMatch(ipa, PageEntry->block[k]))
618  {
619  if(PageEntry->block[k].ptel & 0x100)
620  info[i].flags |= MMU_PAGE_DIRTY;
621  PageEntry->block[k] = ZeroPte;
622  }
623  }
624  }
625  freepage(PagePtr);
626  __asm__("tlbie %0\n\tsync\n\tisync" : : "r" (info[i].addr));
627  }
628 }
void freepage(ppc_map_t *PagePtr)
Definition: mmuobject.c:397
Definition: mmu.h:92
unsigned long proc
Definition: mmu.h:102
GLuint GLuint GLsizei count
Definition: gl.h:1545
ppc_map_t * mmuvirtmap(vaddr_t addr)
Definition: mmuobject.c:579
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
vaddr_t addr
Definition: mmu.h:103
#define MMU_PAGE_DIRTY
Definition: mmu.h:81
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
int PageMatch(vaddr_t addr, ppc_pte_t pte)
Definition: mmuobject.c:571
ppc_pteg_t * PtegFromPage(ppc_map_t *map, int hfun)
Definition: mmuobject.c:565
GLenum const GLvoid * addr
Definition: glext.h:9621
unsigned long ptel
Definition: mmu.h:93
#define PpcPageTable
Definition: mmu.h:63
ppc_pte_t block[8]
Definition: mmu.h:97
int k
Definition: mpi.c:3369

Referenced by _mmumain().

◆ mmufreevsid()

void mmufreevsid ( int  vsid,
int  mask 
)

Definition at line 484 of file mmuobject.c.

485 {
486  int i;
487  for(i = 0; i < 16; i++)
488  {
489  if(mask & (1 << i))
490  freevsid((vsid << 4) + i);
491  }
492 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum GLint GLuint mask
Definition: glext.h:6028
void freevsid(int vsid)
Definition: mmuobject.c:470

Referenced by _mmumain().

◆ mmugetpage()

void mmugetpage ( ppc_map_info_t info,
int  count 
)

Definition at line 630 of file mmuobject.c.

631 {
632  int i;
633  ppc_map_t *PagePtr;
634 
635  for( i = 0; i < count; i++ )
636  {
637  if(!info[i].addr && !info[i].proc)
638  {
639  PagePtr = &((ppc_map_t*)PAGETAB)[info[i].phys];
640  info[i].proc = PagePtr->proc;
641  info[i].addr = PagePtr->addr;
642  info[i].flags = MMU_ALL_RW;
643  } else {
644  vaddr_t addr = info[i].addr;
645  int vsid = ((addr >> 28) & 15) | (info[i].proc << 4);
646  PagePtr = mmuvirtmap(info[i].addr);
647  if(!PagePtr)
648  info[i].phys = 0;
649  else
650  {
651  info[i].phys = PPC_PAGE_ADDR(PagePtr - PpcPageTable);
652  info[i].flags = MMU_ALL_RW; // HACK
653  }
654  }
655  }
656 }
#define PAGETAB
Definition: mmu.h:60
unsigned long proc
Definition: mmu.h:102
GLuint GLuint GLsizei count
Definition: gl.h:1545
ppc_map_t * mmuvirtmap(vaddr_t addr)
Definition: mmuobject.c:579
static HANDLE proc()
Definition: pdb.c:32
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned long vaddr_t
Definition: mmu.h:90
vaddr_t addr
Definition: mmu.h:103
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
GLenum const GLvoid * addr
Definition: glext.h:9621
#define PpcPageTable
Definition: mmu.h:63
#define MMU_ALL_RW
Definition: mmu.h:78

Referenced by _mmumain().

◆ mmuisfreepage()

int mmuisfreepage ( paddr_t  pageno)

Definition at line 658 of file mmuobject.c.

659 {
660  ppc_map_t *PagePtr = PpcPageTable + pageno;
661  return !PagePtr->addr;
662 }
vaddr_t addr
Definition: mmu.h:103
#define PpcPageTable
Definition: mmu.h:63

Referenced by allocpage().

◆ mmunewpage()

paddr_t mmunewpage ( )

Definition at line 558 of file mmuobject.c.

559 {
560  ppc_map_t *PagePtr = allocpage();
561  if (!PagePtr) return 0;
562  return PPC_PAGE_ADDR(PagePtr - PpcPageTable);
563 }
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
ppc_map_t * allocpage()
Definition: mmuobject.c:356
#define PpcPageTable
Definition: mmu.h:63

Referenced by _mmumain().

◆ mmusetramsize()

void mmusetramsize ( paddr_t  ramsize)

Definition at line 285 of file mmuobject.c.

286 {
287  ppc_map_t *last_map = &PpcPageTable[PPC_PAGE_NUMBER(ramsize)];
288  if(!RamSize)
289  {
290  RamSize = ramsize;
291  FirstUsablePage = (paddr_t)last_map;
293  }
294 }
paddr_t RamSize
Definition: mmuobject.c:64
paddr_t NextPage
Definition: mmuobject.c:64
unsigned long paddr_t
Definition: mmu.h:89
#define PPC_PAGE_NUMBER(x)
Definition: mmu.h:66
paddr_t FirstUsablePage
Definition: mmuobject.c:64
#define PpcPageTable
Definition: mmu.h:63

Referenced by _mmumain().

◆ mmusetvsid()

void mmusetvsid ( int  start,
int  end,
int  vsid 
)

Definition at line 664 of file mmuobject.c.

665 {
666  int i, sr, s_vsid;
667  for(i = start; i < end; i++)
668  {
669  s_vsid = (vsid << 4) | (i & 15);
670  sr = (GetSR(i) & ~PPC_VSID_MASK) | s_vsid;
671  if (Booted)
672  SetSR(i, sr);
673  Segs[i] = findvsid(s_vsid);
674  Vsid[i] = vsid;
675  }
676 }
#define PPC_VSID_MASK
Definition: mmu.h:67
MmuVsidInfo * findvsid(int vsid)
Definition: mmuobject.c:460
int Vsid[16]
Definition: mmuobject.c:63
GLuint GLuint end
Definition: gl.h:1545
int GetSR(int n)
Definition: mmu.c:136
int Booted
Definition: mmuobject.c:63
MmuVsidInfo * Segs[16]
Definition: mmuobject.c:67
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void SetSR(int n, int val)
Definition: mmuutil.c:191
GLuint start
Definition: gl.h:1545

Referenced by _mmumain(), callkernel(), and mmunitest().

◆ mmuvirtmap()

ppc_map_t* mmuvirtmap ( vaddr_t  addr)

Definition at line 579 of file mmuobject.c.

580 {
581  int seg = (addr >> 28) & 15;
582  MmuVsidInfo *seginfo = Segs[seg];
583  MmuVsidTree *segtree = 0;
584  if(!seginfo) return 0;
585  segtree = seginfo->tree[(addr >> 20) & 255];
586  if(!segtree) return 0;
587  return segtree->leaves[(addr >> 12) & 255];
588 }
ppc_map_t * leaves[256]
Definition: mmuobject.c:53
MmuVsidInfo * Segs[16]
Definition: mmuobject.c:67
MmuVsidTree * tree[256]
Definition: mmuobject.c:58
GLenum const GLvoid * addr
Definition: glext.h:9621
seg
Definition: i386-dis.c:3857

Referenced by mmudelpage(), mmugetpage(), and ptegreload().

◆ outchar()

void outchar ( char  c)

Definition at line 223 of file mmuobject.c.

224 {
225  SetPhysByte(0x800003f8, c);
226 }
const GLubyte * c
Definition: glext.h:8905
void SetPhysByte(ULONG Addr, ULONG Data)

Referenced by fmtout(), outdig(), and outstr().

◆ outdig()

void outdig ( int  dig)

Definition at line 238 of file mmuobject.c.

239 {
240  if(dig < 10) outchar(dig + '0');
241  else outchar(dig - 10 + 'A');
242 }
void outchar(char c)
Definition: mmuobject.c:223

Referenced by outnum().

◆ outnum()

void outnum ( unsigned long  num)

Definition at line 244 of file mmuobject.c.

245 {
246  int i;
247  for( i = 0; i < 8; i++ )
248  {
249  outdig(num >> 28);
250  num <<= 4;
251  }
252 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void outdig(int dig)
Definition: mmuobject.c:238
GLuint GLuint num
Definition: glext.h:9618

Referenced by fmtout().

◆ outstr()

void outstr ( const char str)

Definition at line 233 of file mmuobject.c.

234 {
235  while(*str) outchar(*str);
236 }
void outchar(char c)
Definition: mmuobject.c:223
const WCHAR * str

Referenced by fmtout().

◆ PageMatch()

int PageMatch ( vaddr_t  addr,
ppc_pte_t  pte 
)

Definition at line 571 of file mmuobject.c.

572 {
573  int vsid_pte = (pte.pteh >> 7) & 15, api_pte = pte.pteh & 63;
574  return
575  (((addr >> 28) & 15) == vsid_pte) &&
576  (((addr >> 22) & 63) == api_pte);
577 }
return
Definition: dirsup.c:529
unsigned long pteh
Definition: mmu.h:93
GLenum const GLvoid * addr
Definition: glext.h:9621

Referenced by mmudelpage().

◆ printmap()

void printmap ( vaddr_t  vaddr,
ppc_map_t map 
)

Definition at line 696 of file mmuobject.c.

697 {
698  fmtout("%x: proc %x addr %x\n",
700  map->proc, vaddr);
701 }
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
void fmtout(const char *fmt,...)
Definition: mmuobject.c:254
Definition: _map.h:44
#define PpcPageTable
Definition: mmu.h:63

Referenced by dumptree().

◆ PtegFromPage()

ppc_pteg_t* PtegFromPage ( ppc_map_t map,
int  hfun 
)

Definition at line 565 of file mmuobject.c.

566 {
567  if(!map->proc && !map->addr) return 0;
568  return &PpcHashedPTE[PtegNumber(map->addr, hfun)];
569 }
Definition: _map.h:44
#define PpcHashedPTE
Definition: mmu.h:62
int PtegNumber(vaddr_t virt, int hfun)
Definition: mmuutil.c:406

Referenced by mmudelpage().

◆ ptegreload()

int ptegreload ( ppc_trap_frame_t frame,
vaddr_t  addr 
)

Definition at line 678 of file mmuobject.c.

679 {
680  int hfun = (Clock >> 3) & 1, ptegnum = PtegNumber(addr, hfun);
682  if(!map) return 0;
683  map->pte.pteh = (map->pte.pteh & ~64) | (hfun << 6);
684  PpcHashedPTE[ptegnum].block[Clock & 7] = map->pte;
685 #if 0
686  fmtout("Reloading addr %x (phys %x) at %x[%x] (%x:%x)\r\n",
687  addr, PPC_PAGE_ADDR(map - PpcPageTable), ptegnum, Clock & 15,
688  PpcHashedPTE[ptegnum].block[Clock&7].pteh,
689  PpcHashedPTE[ptegnum].block[Clock&7].ptel);
690 #endif
691  Clock++;
692  __asm__("tlbie %0\n\tsync\n\tisync" : : "r" (addr));
693  return 1;
694 }
static unsigned int block
Definition: xmlmemory.c:118
ppc_map_t * mmuvirtmap(vaddr_t addr)
Definition: mmuobject.c:579
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
#define PPC_PAGE_ADDR(x)
Definition: mmu.h:65
void fmtout(const char *fmt,...)
Definition: mmuobject.c:254
Definition: _map.h:44
GLenum const GLvoid * addr
Definition: glext.h:9621
#define PpcHashedPTE
Definition: mmu.h:62
int PtegNumber(vaddr_t virt, int hfun)
Definition: mmuutil.c:406
#define PpcPageTable
Definition: mmu.h:63
int Clock
Definition: mmuobject.c:63

Referenced by _mmumain().

◆ SerialInterrupt()

int SerialInterrupt ( int  n,
ppc_trap_frame_t tf 
)

Definition at line 397 of file gdblib.c.

398 {
399  int ch;
400 
401  if (!chr(serport)) return 0;
402 
403  Signal = signal;
405 
406  do
407  {
408  ch = SerialRead();
409 
410  if (ch == 3) /* Break in - tehe */
411  {
412  Continue = 0;
414  }
415  else if (ch == '+')
416  {
417  /* Nothing */
418  }
419  else if (ch == '$')
420  {
421  DataInAddr = 0;
422  ParseState = 0;
423  ComputedCsum = 0;
424  ActualCsum = 0;
425  }
426  else if (ch == '#' && ParseState == 0)
427  {
428  ParseState = 2;
429  }
430  else if (ParseState == 0)
431  {
432  ComputedCsum += ch;
433  DataInBuffer[DataInAddr++] = ch;
434  }
435  else if (ParseState == 2)
436  {
437  ActualCsum = ch;
438  ParseState++;
439  }
440  else if (ParseState == 3)
441  {
442  ActualCsum = hex2int(ch) | (hex2int(ActualCsum) << 4);
443  ComputedCsum &= 255;
444  ParseState = -1;
445  if (ComputedCsum == ActualCsum)
446  {
447  ComputedCsum = 0;
449  DataInAddr = 0;
450  Continue = 0;
451  SerialWrite('+');
452  GotPacket();
453  }
454  else
455  SerialWrite('-');
456  }
457  else if (ParseState == -1)
458  SerialWrite('-');
459  }
460  while (!Continue);
461  return 1;
462 }
volatile ppc_trap_frame_t * RegisterSaveArea
Definition: gdblib.c:103
char * serport
Definition: gdblib.c:123
HFONT tf
Definition: icontest.c:17
void GotPacket()
Definition: gdblib.c:309
int hex2int(int ch)
Definition: gdblib.c:205
void SerialWrite(int ch)
Definition: gdblib.c:195
volatile int DataInAddr
Definition: gdblib.c:100
volatile int ParseState
Definition: gdblib.c:100
void PacketWriteSignal(int code)
Definition: gdblib.c:291
volatile int ActualCsum
Definition: gdblib.c:100
volatile int ComputedCsum
Definition: gdblib.c:100
char DataInBuffer[128]
Definition: gdblib.c:99
volatile int Signal
Definition: gdblib.c:102
volatile int Continue
Definition: gdblib.c:102
int signal
Definition: xcptfil.c:12
int chr(char *serport)
Definition: gdblib.c:152
int SerialRead()
Definition: gdblib.c:200

Referenced by _mmumain(), and TakeException().

◆ SerialSetUp()

void SerialSetUp ( int  deviceType,
void deviceAddr,
int  baud 
)

Definition at line 181 of file gdblib.c.

182 {
183  int i;
184  serport = deviceAddr;
185  setup(serport, baud);
186 }
char * serport
Definition: gdblib.c:123
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void setup(char *serport, int baud)
Definition: gdblib.c:169

Referenced by _mmumain().

◆ TakeException()

void TakeException ( int  n,
ppc_trap_frame_t tf 
)

Definition at line 464 of file gdblib.c.

465 {
466  Signal = n;
469  SendSignal = 0;
470  Continue = 0;
471  while(!Continue) SerialInterrupt(n, tf);
472  return 1;
473 }
volatile ppc_trap_frame_t * RegisterSaveArea
Definition: gdblib.c:103
GLdouble n
Definition: glext.h:7729
HFONT tf
Definition: icontest.c:17
void PacketWriteSignal(int code)
Definition: gdblib.c:291
volatile int SendSignal
Definition: gdblib.c:101
volatile int Signal
Definition: gdblib.c:102
volatile int Continue
Definition: gdblib.c:102
int SerialInterrupt(int signal, ppc_trap_frame_t *tf)
Definition: gdblib.c:397

Referenced by _mmumain(), and initme().

◆ trapcallback()

void trapcallback ( int  action,
ppc_trap_frame_t trap_frame 
)

Definition at line 207 of file mmuobject.c.

208 {
209  if ((paddr_t)callback[action] < PAGETAB)
210  callback[action](action, trap_frame);
211  else
212  {
213  int framecopy = 0xf040;
214  copy((void *)framecopy, trap_frame, sizeof(*trap_frame));
215  trap_frame->srr0 = (int)callback[action];
216  trap_frame->srr1 &= 0x7fff;
217  trap_frame->gpr[3] = action;
218  trap_frame->gpr[4] = framecopy;
219  __asm__("mr 1,%0\n\tsubi 1,1,16\n\tb trap_finish_start" : : "r" (trap_frame));
220  }
221 }
#define PAGETAB
Definition: mmu.h:60
unsigned long srr1
Definition: mmu.h:115
unsigned long paddr_t
Definition: mmu.h:89
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
unsigned long srr0
Definition: mmu.h:115
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
void copy(void *t, void *s, int b)
Definition: mmuobject.c:228
const WCHAR * action
Definition: action.c:7783
unsigned long gpr[32]
Definition: mmu.h:113
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

Referenced by _mmumain().

Variable Documentation

◆ Booted

int Booted = 0

Definition at line 63 of file mmuobject.c.

Referenced by callkernel(), and mmusetvsid().

◆ callback

MmuTrapHandler callback[0x30]

Definition at line 44 of file mmuobject.c.

Referenced by _bdf_readstream(), _mmumain(), acpi_bus_walk(), Array_map(), channel_register(), CheckBitmapBits(), context_enum_fbo_entries(), continue_binding(), create_default_callback(), create_redirect_callback(), CreateAsyncBindCtx(), CreateAsyncBindCtxEx(), CInternetToolbar::CreateMenuBar(), d3d1_EnumDevices(), d3d2_EnumDevices(), d3d3_EnumDevices(), d3d3_EnumZBufferFormats(), d3d7_EnumDevices(), d3d7_EnumZBufferFormats(), d3d_device1_EnumTextureFormats(), d3d_device2_EnumTextureFormats(), d3d_device3_EnumTextureFormats(), d3d_device7_EnumTextureFormats(), d3d_device7_EnumTextureFormats_FPUPreserve(), d3d_device7_EnumTextureFormats_FPUSetup(), d3d_execute_buffer_Validate(), d3drm_object_add_destroy_callback(), d3drm_object_cleanup(), d3drm_object_delete_destroy_callback(), ddraw1_EnumDisplayModes(), ddraw1_EnumSurfaces(), ddraw2_EnumDisplayModes(), ddraw2_EnumSurfaces(), ddraw4_EnumDisplayModes(), ddraw4_EnumSurfaces(), ddraw_enumerate_secondary_devices(), ddraw_surface1_EnumAttachedSurfaces(), ddraw_surface1_EnumOverlayZOrders(), ddraw_surface2_EnumAttachedSurfaces(), ddraw_surface2_EnumOverlayZOrders(), ddraw_surface3_EnumAttachedSurfaces(), ddraw_surface3_EnumOverlayZOrders(), ddraw_surface4_EnumAttachedSurfaces(), ddraw_surface4_EnumOverlayZOrders(), DirectDrawEnumerateA(), DirectDrawEnumerateExA(), DirectDrawEnumerateExW(), DirectDrawEnumerateW(), download_to_cache(), download_url(), DownloadBSC_Create(), downloadcb_create(), File::enum_lines(), EnumThemes(), FilterGraph2_Connect(), gdip_format_string(), GdipDrawImagePointsRect(), GdipDrawImagePointsRectI(), GdipDrawImageRectRect(), GdipDrawImageRectRectI(), GdipEnumerateMetafileDestPoint(), GdipEnumerateMetafileDestPointI(), GdipEnumerateMetafileDestRect(), GdipEnumerateMetafileDestRectI(), GdipEnumerateMetafileSrcRectDestPoints(), get_callback(), Image::GetThumbnailImage(), handle_redirect(), hlink_frame_navigate(), ImageListImpl_SetCallback(), init_bindctx(), initme(), install_codebase(), InstallEngine_RegisterInstallEngineCallback(), iterate_section_fields(), LibTCPClose(), LineDDA(), Moniker_BindToStorage(), navigate_hlink(), playlist_InitPlaylistBurn(), ReadEncryptedFileRaw(), RevokeBindStatusCallback(), RTFSetClassCallback(), RTFSetDestinationCallback(), set_status_callback(), DropZone::SetCallback(), SetupInstallFromInfSectionA(), SetupInstallFromInfSectionW(), stabs_parse(), test_CShellMenu_callbacks(), test_destroy_callback(), TranslateBitmapBits(), trapcallback(), TREEVIEW_UpdateDispInfo(), TRIO_ARGS2(), URLDownloadToFileW(), wave_out_test_deviceOut(), wine_rb_clear(), wine_rb_destroy(), wine_rb_for_each_entry(), wine_rb_postorder(), wined3d_cs_destroy_object(), wined3d_cs_emit_callback(), wined3d_cs_init_object(), wined3d_device_reset(), WinHttpSetStatusCallback(), WMReader_Open(), WMReaderAdvanced2_OpenStream(), wnd_proc(), WOWShellExecute(), and WriteEncryptedFileRaw().

◆ Clock

◆ FirstUsablePage

paddr_t FirstUsablePage

Definition at line 64 of file mmuobject.c.

Referenced by _mmumain(), and mmusetramsize().

◆ FreeList

◆ FreeTree

MmuFreeTree* FreeTree

Definition at line 66 of file mmuobject.c.

Referenced by allocvsidtree(), and freevsidtree().

◆ GdbAttach

int GdbAttach = 0

Definition at line 63 of file mmuobject.c.

◆ NextPage

paddr_t NextPage

Definition at line 64 of file mmuobject.c.

Referenced by allocpage(), MmInitializeMemoryLimits(), MmTrimUserMemory(), and mmusetramsize().

◆ NextTreePage

MmuVsidTree* NextTreePage = 0

Definition at line 65 of file mmuobject.c.

Referenced by allocvsidtree().

◆ RamSize

paddr_t RamSize

Definition at line 64 of file mmuobject.c.

Referenced by allocpage(), and mmusetramsize().

◆ Segs

MmuVsidInfo* Segs[16]

Definition at line 67 of file mmuobject.c.

Referenced by mmusetvsid(), and mmuvirtmap().

◆ serport

◆ trap_end

int trap_end[]

Referenced by copy_trap_handler().

◆ trap_start

int trap_start[]

Referenced by copy_trap_handler().

◆ TreeAlloc

int TreeAlloc = 0

Definition at line 63 of file mmuobject.c.

Referenced by allocvsidtree().

◆ Vsid

int Vsid[16]

Definition at line 63 of file mmuobject.c.

Referenced by callkernel(), and mmusetvsid().

◆ VsidHead

MmuVsidInfo * VsidHead = 0

Definition at line 67 of file mmuobject.c.

Referenced by allocvsid(), dumpmap(), and findvsid().