/*
- * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* If entaddr is omitted, it starts with the most current
* If entaddr = 0, it starts with the most current and does the whole table
*/
-void db_low_trace(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_low_trace(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
+{
int c, i;
unsigned int tempx, cnt;
unsigned int xTraceCurr, xTraceStart, xTraceEnd, cxltr;
}
db_next = (db_expr_t)(xxltr);
- return;
}
*
* dl [entaddr]
*/
-void db_display_long(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_long(db_expr_t addr, __unused boolean_t have_addr,
+ db_expr_t count, char * modif)
+{
int i;
for(i=0; i<8; i++) { /* Print 256 bytes */
*
* dc [entaddr]
*/
-void db_display_char(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
+void
+db_display_char(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char * modif)
+{
int i, j, k;
unsigned char xlt[256], *xaddr;
*
* dr [entaddr]
*/
-void db_display_real(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_real(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
int i;
unsigned int xbuf[8];
*
* dm vaddr [space] (defaults to last entered)
*/
-void db_display_mappings(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_mappings(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
db_expr_t xspace;
pmap_t pmap;
addr64_t lnextva;
db_dumpmapping(mp); /* Dump it all out */
- return; /* Tell them we did it */
-
-
+ /* Tell them we did it */
}
/*
*
* dh vaddr [space] (defaults to last entered)
*/
-void db_display_hash(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_hash(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
db_expr_t xspace;
unsigned int seg, vsid, ptegindex, htsize;
pmap_t pmap;
ptegindex = llva & (htsize - 1); /* Get the index to the pteg and pca */
db_dumppca(ptegindex); /* dump the info */
- return; /* Tell them we did it */
-
-
+ /* Tell them we did it */
}
/*
*
* dp
*/
-void db_display_pmap(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_pmap(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
pmap_t pmap;
int i;
unsigned int v0, v1, st0, st1;
pmap = (pmap_t)pmap->pmap_link.next; /* Skip to the next */
if(pmap == kernel_pmap) break; /* We've wrapped, we're done */
}
- return;
}
*
* cp pmap
*/
-void db_check_pmaps(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_check_pmaps(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
int i;
unsigned int ret;
uint64_t dumpa[32];
pmap = (pmap_t)pmap->pmap_link.next; /* Skip to the next */
if(pmap == kernel_pmap) break; /* We've wrapped, we're done */
}
-
- return;
-
}
void db_piokjunk(void);
-void db_display_iokit(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_iokit(__unused db_expr_t addr, __unused boolean_t have_addr,
+ __unused db_expr_t count, __unused char *modif)
+{
db_piokjunk();
-
- return;
}
/*
for(i = 1; i < (mp->mpFlags & mpLists); i++) { /* Dump out secondary physical skip lists */
db_printf(" mpList%02d: %016llX\n", i, mp->mpList[i - 1]);
}
-
- return;
}
/*
db_printf("va = %016llX\n", llva);
}
}
-
- return;
}
* dv [entaddr] [space]
* address must be on 32-byte boundary. It will be rounded down if not
*/
-void db_display_virtual(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
+void
+db_display_virtual(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
int i, size, lines, rlines;
unsigned int xbuf[8];
#define chainmax 32
-void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_save(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
int i, j, totsaves, tottasks, taskact, chainsize, vmid, didvmhead;
- processor_set_t pset = &default_pset;
task_t task;
thread_act_t act;
- savearea *save;
+ struct savearea *save;
vmmCntrlTable *CTable;
tottasks = 0;
totsaves = 0;
- for(task = (task_t)pset->tasks.next; task != (task_t)&pset->tasks.next; task = (task_t)task->pset_tasks.next) { /* Go through the tasks */
+ for(task = (task_t)tasks.next; task != (task_t)&tasks.next; task = (task_t)task->tasks.next) { /* Go through the tasks */
taskact = 0; /* Reset activation count */
db_printf("\nTask %4d @%08X:\n", tottasks, task); /* Show where we're at */
for(act = (thread_act_t)task->threads.next; act != (thread_act_t)&task->threads; act = (thread_act_t)act->task_threads.next) { /* Go through activations */
db_printf(" Act %4d @%08X - p: %08X current context: %08X\n",
taskact, act, act->machine.pcb, act->machine.curctx);
- save = (savearea *)act->machine.pcb; /* Set the start of the normal chain */
+ save = (struct savearea *)act->machine.pcb; /* Set the start of the normal chain */
chainsize = 0;
db_printf(" General context - fp: %08X fl: %08X fc: %d vp: %08X vl: %08X vp: %d\n",
while(save) { /* Do them all */
totsaves++; /* Count savearea */
db_printf(" Norm %08X: %016llX %016llX - tot = %d\n", save, save->save_srr0, save->save_srr1, totsaves);
- save = (savearea *)save->save_hdr.save_prev; /* Next one */
+ save = (struct savearea *)save->save_hdr.save_prev; /* Next one */
if(chainsize++ > chainmax) { /* See if we might be in a loop */
db_printf(" Chain terminated by count (%d) before %08X\n", chainmax, save);
break;
}
}
- save = (savearea *)act->machine.facctx.FPUsave; /* Set the start of the floating point chain */
+ save = (struct savearea *)act->machine.facctx.FPUsave; /* Set the start of the floating point chain */
chainsize = 0;
while(save) { /* Do them all */
totsaves++; /* Count savearea */
db_printf(" FPU %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
- save = (savearea *)save->save_hdr.save_prev; /* Next one */
+ save = (struct savearea *)save->save_hdr.save_prev; /* Next one */
if(chainsize++ > chainmax) { /* See if we might be in a loop */
db_printf(" Chain terminated by count (%d) before %08X\n", chainmax, save);
break;
}
}
- save = (savearea *)act->machine.facctx.VMXsave; /* Set the start of the floating point chain */
+ save = (struct savearea *)act->machine.facctx.VMXsave; /* Set the start of the floating point chain */
chainsize = 0;
while(save) { /* Do them all */
totsaves++; /* Count savearea */
db_printf(" Vec %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
- save = (savearea *)save->save_hdr.save_prev; /* Next one */
+ save = (struct savearea *)save->save_hdr.save_prev; /* Next one */
if(chainsize++ > chainmax) { /* See if we might be in a loop */
db_printf(" Chain terminated by count (%d) before %08X\n", chainmax, save);
break;
CTable->vmmc[vmid].vmmFacCtx.VMXsave, CTable->vmmc[vmid].vmmFacCtx.VMXlevel, CTable->vmmc[vmid].vmmFacCtx.VMXcpu
);
- save = (savearea *)CTable->vmmc[vmid].vmmFacCtx.FPUsave; /* Set the start of the floating point chain */
+ save = (struct savearea *)CTable->vmmc[vmid].vmmFacCtx.FPUsave; /* Set the start of the floating point chain */
chainsize = 0;
while(save) { /* Do them all */
totsaves++; /* Count savearea */
db_printf(" FPU %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
- save = (savearea *)save->save_hdr.save_prev; /* Next one */
+ save = (struct savearea *)save->save_hdr.save_prev; /* Next one */
if(chainsize++ > chainmax) { /* See if we might be in a loop */
db_printf(" Chain terminated by count (%d) before %08X\n", chainmax, save);
break;
}
}
- save = (savearea *)CTable->vmmc[vmid].vmmFacCtx.VMXsave; /* Set the start of the floating point chain */
+ save = (struct savearea *)CTable->vmmc[vmid].vmmFacCtx.VMXsave; /* Set the start of the floating point chain */
chainsize = 0;
while(save) { /* Do them all */
totsaves++; /* Count savearea */
db_printf(" Vec %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
- save = (savearea *)save->save_hdr.save_prev; /* Next one */
+ save = (struct savearea *)save->save_hdr.save_prev; /* Next one */
if(chainsize++ > chainmax) { /* See if we might be in a loop */
db_printf(" Chain terminated by count (%d) before %08X\n", chainmax, save);
break;
}
db_printf("Total saveareas accounted for: %d\n", totsaves);
- return;
}
/*
extern unsigned int dbvecs[33][4];
extern unsigned int dbspecrs[336];
-void db_display_xregs(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_xregs(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
int i, j, pents;
stSpecrs(dbspecrs); /* Save special registers */
}
db_printf("VCR: %08X %08X %08X %08X\n", dbvecs[32][0], dbvecs[32][1], dbvecs[32][2], dbvecs[32][3]); /* Print VSCR */
- return; /* Tell them we did it */
-
-
+ /* Tell them we did it */
}
/*
*
* cm
*/
-void db_check_mappings(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_check_mappings(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
addr64_t pteg, pca, llva, lnextva;
unsigned int xpteg[32], xpca[8], space, hash, pva, seg, api, va, free, free2, xauto, PTEGcnt, wimgkk, wimgxx, slotoff;
int i, j, fnderr, slot, slot2, k, s4bit;
}
-
- return;
}
/*
*
* dp
*/
-void db_display_kmod(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_display_kmod(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
kmod_info_t *kmd;
unsigned int strt, end;
kmd->name, kmd->version);
kmd = kmd->next; /* Step to it */
}
-
- return;
}
/*
*/
unsigned char xxgpo[36] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-void db_gsnoop(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
+void
+db_gsnoop(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
+{
int i, j;
unsigned char *gp, gpn[36];
#define ngpr 34
db_printf("\n");
for(i = 0; i < ngpr; i++) xxgpo[i] = gpn[i]; /* Save 'em */
-
- return;
}