aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/bios.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/amd64/bios.c')
-rw-r--r--sys/amd64/amd64/bios.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c
index 0312adf00bff..6e0837cb89b6 100644
--- a/sys/amd64/amd64/bios.c
+++ b/sys/amd64/amd64/bios.c
@@ -323,7 +323,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;
@@ -382,19 +383,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 == (u_int *)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,
@@ -451,7 +452,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 */
@@ -461,7 +462,7 @@ bios16(struct bios_args *args, char *fmt, ...)
/*
* XXX only needs to be invlpg(0) but that doesn't work on the 386
*/
- invltlb();
+ pmap_invalidate_all(kernel_pmap);
return (i);
}