From owner-p4-projects@FreeBSD.ORG Wed Nov 5 19:20:03 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C90F16A4D1; Wed, 5 Nov 2003 19:20:03 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2627A16A4CE for ; Wed, 5 Nov 2003 19:20:03 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73BCA4400E for ; Wed, 5 Nov 2003 19:20:02 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hA63K2XJ079310 for ; Wed, 5 Nov 2003 19:20:02 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hA63K1f3079307 for perforce@freebsd.org; Wed, 5 Nov 2003 19:20:02 -0800 (PST) (envelope-from peter@freebsd.org) Date: Wed, 5 Nov 2003 19:20:02 -0800 (PST) Message-Id: <200311060320.hA63K1f3079307@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 41542 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2003 03:20:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=41542 Change 41542 by peter@peter_daintree on 2003/11/05 19:19:57 make things compile. deal with new mpboot.S Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#23 edit .. //depot/projects/hammer/sys/amd64/amd64/mpboot.S#2 edit .. //depot/projects/hammer/sys/amd64/include/smp.h#10 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#23 (text+ko) ==== @@ -147,6 +147,7 @@ static int hlt_cpus_mask; static int hlt_logical_cpus = 1; static struct sysctl_ctx_list logical_cpu_clist; +static u_int bootMP_size; /* * Calculate usable address in base memory for AP trampoline code. @@ -155,9 +156,10 @@ mp_bootaddress(u_int basemem) { - boot_address = basemem & ~0xfff; /* round down to 4k boundary */ + bootMP_size = mptramp_end - mptramp_start; + boot_address = basemem & ~PAGE_MASK; /* round down to 4k boundary */ if ((basemem - boot_address) < bootMP_size) - boot_address -= 4096; /* not enough, lower by 4k */ + boot_address -= PAGE_SIZE; /* not enough, lower by 4k */ return boot_address; } ==== //depot/projects/hammer/sys/amd64/amd64/mpboot.S#2 (text+ko) ==== @@ -88,7 +88,7 @@ * means we are required to use a temporary page table that is below * the 4GB limit. */ - movl $pagetables, %eax XXX + movl $pagetables, %eax mov %eax, %cr3 /* @@ -111,13 +111,13 @@ mov %eax, %cr3 .byte 0xea /* opcode for far jump */ - .long entry_64 /* 64 bit flat address */ + .quad entry_64 /* 64 bit flat address */ .word kernelcode-gdt /* selector offset */ .p2align 4,0 gdt: /* - * All segment descriptor tables start with a null descriptor */ + * All segment descriptor tables start with a null descriptor */ .long 0x00000000 .long 0x00000000 @@ -155,6 +155,9 @@ gdtend: + .globl pagetables +pagetables: + .long 0 /* * The pseudo descriptor for lgdt to use. */ ==== //depot/projects/hammer/sys/amd64/include/smp.h#10 (text+ko) ==== @@ -24,11 +24,9 @@ #include #include -/* global data in mpboot.s */ -extern int bootMP_size; - -/* functions in mpboot.s */ -void bootMP(void); +/* global data in mpboot.S */ +extern char mptramp_start[]; +extern char mptramp_end[]; /* global data in mp_machdep.c */ extern int mp_naps;