diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c index 3d8f357ea19d..c4ff2d5df392 100644 --- a/sys/amd64/amd64/bios.c +++ b/sys/amd64/amd64/bios.c @@ -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 */ diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 7358a9e41223..cb5a24d7136b 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -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 diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c index 3d8f357ea19d..c4ff2d5df392 100644 --- a/sys/i386/i386/bios.c +++ b/sys/i386/i386/bios.c @@ -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 */ diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 7358a9e41223..cb5a24d7136b 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -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