svn commit: r221137 - in projects/altix/sys/ia64: ia64 include
Marcel Moolenaar
marcel at FreeBSD.org
Wed Apr 27 19:54:45 UTC 2011
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;
More information about the svn-src-projects
mailing list