From owner-svn-src-projects@FreeBSD.ORG Wed Apr 27 19:54:45 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0E71106568B; Wed, 27 Apr 2011 19:54:45 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7A668FC29; Wed, 27 Apr 2011 19:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3RJsj6E087022; Wed, 27 Apr 2011 19:54:45 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJsjC0087019; Wed, 27 Apr 2011 19:54:45 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201104271954.p3RJsjC0087019@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 27 Apr 2011 19:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221137 - in projects/altix/sys/ia64: ia64 include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 19:54:45 -0000 Author: marcel Date: Wed Apr 27 19:54:45 2011 New Revision: 221137 URL: http://svn.freebsd.org/changeset/base/221137 Log: Dump WIP: o Define a structure (ia64_ap_state) that contains all the information and state we need to bootstrap an AP. In particular, this now includes the PBVM mappings. o Register the OS boot rendezvous function and pass the physical address of the state structure so that the AP can access it using GP relative references. Modified: projects/altix/sys/ia64/ia64/mp_machdep.c projects/altix/sys/ia64/include/smp.h Modified: projects/altix/sys/ia64/ia64/mp_machdep.c ============================================================================== --- projects/altix/sys/ia64/ia64/mp_machdep.c Wed Apr 27 19:50:20 2011 (r221136) +++ projects/altix/sys/ia64/ia64/mp_machdep.c Wed Apr 27 19:54:45 2011 (r221137) @@ -70,12 +70,8 @@ void ia64_ap_startup(void); #define SAPIC_ID_GET_EID(x) ((u_int)(x) & 0xff) #define SAPIC_ID_SET(id, eid) ((u_int)(((id) & 0xff) << 8) | ((eid) & 0xff)) -/* Variables used by os_boot_rendez and ia64_ap_startup */ -struct pcpu *ap_pcpu; -void *ap_stack; -volatile int ap_delay; -volatile int ap_awake; -volatile int ap_spin; +/* State used to wake and bootstrap APs. */ +struct ia64_ap_state ia64_ap_state; int ia64_ipi_ast; int ia64_ipi_highfp; @@ -302,10 +298,16 @@ cpu_mp_announce() void cpu_mp_start() { + struct ia64_sal_result result; + struct ia64_fdesc *fd; struct pcpu *pc; ap_spin = 1; + fd = (struct ia64_fdesc *) os_boot_rendez; + result = ia64_sal_entry(SAL_SET_VECTORS, SAL_OS_BOOT_RENDEZ, + ia64_tpa(fd->func), ia64_tpa(ia64_ap_state), 0, 0, 0, 0); + SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { pc->pc_md.current_pmap = kernel_pmap; pc->pc_other_cpus = all_cpus & ~pc->pc_cpumask; Modified: projects/altix/sys/ia64/include/smp.h ============================================================================== --- projects/altix/sys/ia64/include/smp.h Wed Apr 27 19:50:20 2011 (r221136) +++ projects/altix/sys/ia64/include/smp.h Wed Apr 27 19:54:45 2011 (r221137) @@ -16,6 +16,24 @@ struct pcpu; +struct ia64_ap_state { + uint64_t as_pgtbl_pa; + uint64_t as_pgtbl_va; + uint32_t as_pgtblsz; + uint64_t as_text_pa; + uint64_t as_text_va; + uint32_t as_textsz; + uint64_t as_data_pa; + uint64_t as_data_va; + uint32_t as_datasz; + uint64_t as_kstack; + uint64_t as_kstack_top; + struct pcpu *as_pcpu; + volatile u_int as_delay; + volatile u_int as_awake; + volatile u_int as_spin; +}; + extern int ia64_ipi_ast; extern int ia64_ipi_highfp; extern int ia64_ipi_nmi;