Tidy up some warnings
This commit is contained in:
parent
1d8d58a5b6
commit
963131fe0a
@ -320,7 +320,8 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
va_list ap;
|
||||
int flags = BIOSCODE_FLAG | BIOSDATA_FLAG;
|
||||
u_int i, arg_start, arg_end;
|
||||
u_int *pte, *ptd;
|
||||
pt_entry_t *pte;
|
||||
pd_entry_t *ptd;
|
||||
|
||||
arg_start = 0xffffffff;
|
||||
arg_end = 0;
|
||||
@ -379,19 +380,19 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
args->seg.code32.base = (u_int)&bios16_jmp & PG_FRAME;
|
||||
args->seg.code32.limit = 0xffff;
|
||||
|
||||
ptd = (u_int *)rcr3();
|
||||
ptd = (pd_entry_t *)rcr3();
|
||||
if (ptd == IdlePTD) {
|
||||
/*
|
||||
* no page table, so create one and install it.
|
||||
*/
|
||||
pte = (u_int *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
|
||||
ptd = (u_int *)((u_int)ptd + KERNBASE);
|
||||
pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
|
||||
ptd = (pd_entry_t *)((u_int)ptd + KERNBASE);
|
||||
*ptd = vtophys(pte) | PG_RW | PG_V;
|
||||
} else {
|
||||
/*
|
||||
* this is a user-level page table
|
||||
*/
|
||||
pte = (u_int *)&PTmap;
|
||||
pte = PTmap;
|
||||
}
|
||||
/*
|
||||
* install pointer to page 0. we don't need to flush the tlb,
|
||||
@ -448,7 +449,7 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
|
||||
i = bios16_call(&args->r, stack_top);
|
||||
|
||||
if (pte == (u_int *)&PTmap) {
|
||||
if (pte == PTmap) {
|
||||
*pte = 0; /* remove entry */
|
||||
} else {
|
||||
*ptd = 0; /* remove page table */
|
||||
|
@ -151,7 +151,7 @@ extern pt_entry_t PTmap[], APTmap[];
|
||||
extern pd_entry_t PTD[], APTD[];
|
||||
extern pd_entry_t PTDpde, APTDpde;
|
||||
|
||||
extern pd_entry_t IdlePTD; /* physical address of "Idle" state directory */
|
||||
extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
@ -320,7 +320,8 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
va_list ap;
|
||||
int flags = BIOSCODE_FLAG | BIOSDATA_FLAG;
|
||||
u_int i, arg_start, arg_end;
|
||||
u_int *pte, *ptd;
|
||||
pt_entry_t *pte;
|
||||
pd_entry_t *ptd;
|
||||
|
||||
arg_start = 0xffffffff;
|
||||
arg_end = 0;
|
||||
@ -379,19 +380,19 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
args->seg.code32.base = (u_int)&bios16_jmp & PG_FRAME;
|
||||
args->seg.code32.limit = 0xffff;
|
||||
|
||||
ptd = (u_int *)rcr3();
|
||||
ptd = (pd_entry_t *)rcr3();
|
||||
if (ptd == IdlePTD) {
|
||||
/*
|
||||
* no page table, so create one and install it.
|
||||
*/
|
||||
pte = (u_int *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
|
||||
ptd = (u_int *)((u_int)ptd + KERNBASE);
|
||||
pte = (pt_entry_t *)malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
|
||||
ptd = (pd_entry_t *)((u_int)ptd + KERNBASE);
|
||||
*ptd = vtophys(pte) | PG_RW | PG_V;
|
||||
} else {
|
||||
/*
|
||||
* this is a user-level page table
|
||||
*/
|
||||
pte = (u_int *)&PTmap;
|
||||
pte = PTmap;
|
||||
}
|
||||
/*
|
||||
* install pointer to page 0. we don't need to flush the tlb,
|
||||
@ -448,7 +449,7 @@ bios16(struct bios_args *args, char *fmt, ...)
|
||||
|
||||
i = bios16_call(&args->r, stack_top);
|
||||
|
||||
if (pte == (u_int *)&PTmap) {
|
||||
if (pte == PTmap) {
|
||||
*pte = 0; /* remove entry */
|
||||
} else {
|
||||
*ptd = 0; /* remove page table */
|
||||
|
@ -151,7 +151,7 @@ extern pt_entry_t PTmap[], APTmap[];
|
||||
extern pd_entry_t PTD[], APTD[];
|
||||
extern pd_entry_t PTDpde, APTDpde;
|
||||
|
||||
extern pd_entry_t IdlePTD; /* physical address of "Idle" state directory */
|
||||
extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
Loading…
Reference in New Issue
Block a user