From f648ce90ee827514f6de9cd52982ddd6ab2af936 Mon Sep 17 00:00:00 2001 From: dsl Date: Sat, 19 Aug 2006 16:04:41 +0000 Subject: [PATCH] Fix the amd64 INSTALL kernel (builds of machdep.c with -Os and -O3). Load the idt with non-randmon data. --- sys/arch/amd64/include/cpufunc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/arch/amd64/include/cpufunc.h b/sys/arch/amd64/include/cpufunc.h index c0fc4c8c7c70..a58d4ca6cd1b 100644 --- a/sys/arch/amd64/include/cpufunc.h +++ b/sys/arch/amd64/include/cpufunc.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.7 2005/12/28 19:09:29 perry Exp $ */ +/* $NetBSD: cpufunc.h,v 1.8 2006/08/19 16:04:41 dsl Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -46,6 +46,7 @@ #include #include +#include #include static __inline void @@ -77,9 +78,9 @@ invlpg(u_int64_t addr) } static __inline void -lidt(void *p) +lidt(struct region_descriptor *region) { - __asm volatile("lidt (%0)" : : "r" (p)); + __asm volatile("lidt %0" : : "m" (*region)); } static __inline void