From owner-freebsd-xen@FreeBSD.ORG Thu Jan 2 15:55:27 2014 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFBBAD83; Thu, 2 Jan 2014 15:55:27 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2344615D2; Thu, 2 Jan 2014 15:55:25 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.95,591,1384300800"; d="scan'208";a="89262655" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 02 Jan 2014 15:55:23 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.2.342.4; Thu, 2 Jan 2014 10:55:23 -0500 Received: from gateway-cbg.eng.citrite.net ([10.80.16.17] helo=localhost.localdomain) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1VykRF-00043n-AO; Thu, 02 Jan 2014 15:44:01 +0000 From: Roger Pau Monne To: , , , , , , Subject: [PATCH v9 10/19] xen: add hook for AP bootstrap memory reservation Date: Thu, 2 Jan 2014 16:43:44 +0100 Message-ID: <1388677433-49525-11-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.7.7.5 (Apple Git-26) In-Reply-To: <1388677433-49525-1-git-send-email-roger.pau@citrix.com> References: <1388677433-49525-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jan 2014 15:55:27 -0000 This hook will only be implemented for bare metal, Xen doesn't require any bootstrap code since APs are started in long mode with paging enabled. --- sys/amd64/amd64/machdep.c | 6 +++++- sys/amd64/include/sysarch.h | 1 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index f6eef50..babf16d 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -178,6 +178,9 @@ struct init_ops init_ops = { .early_delay_init = i8254_init, .early_delay = i8254_delay, .parse_memmap = native_parse_memmap, +#ifdef SMP + .mp_bootaddress = mp_bootaddress, +#endif }; /* @@ -1490,7 +1493,8 @@ getmemsize(caddr_t kmdp, u_int64_t first) #ifdef SMP /* make hole for AP bootstrap code */ - physmap[1] = mp_bootaddress(physmap[1] / 1024); + if (init_ops.mp_bootaddress) + physmap[1] = init_ops.mp_bootaddress(physmap[1] / 1024); #endif /* diff --git a/sys/amd64/include/sysarch.h b/sys/amd64/include/sysarch.h index 084223e..7696064 100644 --- a/sys/amd64/include/sysarch.h +++ b/sys/amd64/include/sysarch.h @@ -16,6 +16,7 @@ struct init_ops { void (*early_delay_init)(void); void (*early_delay)(int); void (*parse_memmap)(caddr_t, vm_paddr_t *, int *); + u_int (*mp_bootaddress)(u_int); }; extern struct init_ops init_ops; -- 1.7.7.5 (Apple Git-26)