rem: memcpy((char *)trampolineCode, &smp_trampoline,
add: memcpy((char *)trampolineCode, (const void*)&smp_trampoline,
context: smp_boot_other_cpus(void){	uint32 trampolineCode;	uint32 trampolineStack;	uint32 i;	void *handle = load_driver_settings(B_SAFEMODE_DRIVER_SETTINGS);	if (handle != NULL) {		if (get_driver_boolean_parameter(handle, B_SAFEMODE_DISABLE_SMP, false, false)) {			// SMP has been disabled!			gKernelArgs.num_cpus = 1;		}		unload_driver_settings(handle);	}	if (gKernelArgs.num_cpus < 2)		return;	TRACE(("trampolining other cpus\n"));	// The first 8 MB are identity mapped, 0x9e000-0x9ffff is reserved for this	// allocate a stack and a code area for the smp trampoline	// (these have to be < 1M physical, 0xa0000-0xfffff is reserved by the BIOS)	trampolineCode = 0x9f000;	trampolineStack = 0x9e000;	// copy the trampoline code over	memcpy((char *)trampolineCode, &smp_trampoline,		(uint32)&smp_trampoline_end - (uint32)&smp_trampoline);	// boot the cpus	for (i = 1; i < gKernelArgs.num_cpus; i++) {		uint32 *finalStack;		uint32 *tempStack;		uint32 config;		uint32 numStartups;		uint32 j;		// set this stack up		finalStack = (uint32 *)gKernelArgs.cpu_kstack[i].start;		memset(finalStack, 0, KERNEL_STACK_SIZE);		tempStack = (finalStack + KERNEL_STACK_SIZE / sizeof(uint32)) - 1;		*tempStack = (uint32)&smp_cpu_ready;		// set the trampoline stack up		tempStack = (uint32 *)(trampolineStack + B_PAGE_SIZE - 4);		// final location of the stack		*tempStack = ((uint32)finalStack) + KERNEL_STACK_SIZE - sizeof(uint32);		tempStack--;		// page dir		*tempStack = gKernelArgs.arch_args.phys_pgdir;		// put a gdt descriptor at the bottom of the stack		*((uint16 *)trampolineStack) = 0x18 - 1; // LIMIT		*((uint32 *)(trampolineStack + 2)) = trampolineStack + 8;		// put the gdt at the bottom		memcpy(&((uint32 *)trampolineStack)[2], (void *)gKernelArgs.arch_args.vir_gdt, 6*4);		/* clear apic errors */		if (gKernelArgs.arch_args.cpu_apic_version[i] & 0xf0) {			apic_write(APIC_ERROR_STATUS, 0);			apic_read(APIC_ERROR_STATUS);		}//dprintf("assert INIT\n");		/* send (aka assert) INIT IPI */		config = (apic_read(APIC_INTR_COMMAND_2) & APIC_INTR_COMMAND_2_MASK)			| (gKernelArgs.arch_args.cpu_apic_id[i] << 24);		apic_write(APIC_INTR_COMMAND_2, config); /* set target pe */		config = (apic_read(APIC_INTR_COMMAND_1) & 0xfff00000)			| APIC_TRIGGER_MODE_LEVEL | APIC_INTR_COMMAND_1_ASSERT | APIC_DELIVERY_MODE_INIT;		apic_write(APIC_INTR_COMMAND_1, config);dprintf("wait for delivery\n");		// wait for pending to end		while ((apic_read(APIC_INTR_COMMAND_1) & APIC_DELIVERY_STATUS) != 0)			;dprintf("deassert INIT\n");		/* deassert INIT */		config = (apic_read(APIC_INTR_COMMAND_2) & APIC_INTR_COMMAND_2_MASK)			| (gKernelArgs.arch_args.cpu_apic_id[i] << 24);		apic_write(APIC_INTR_COMMAND_2, config);		config = (apic_read(APIC_INTR_COMMAND_1) & 0xfff00000)			| APIC_TRIGGER_MODE_LEVEL | APIC_DELIVERY_MODE_INIT;		apic_write(APIC_INTR_COMMAND_1, config);dprintf("wait for delivery\n");		// wait for pending to end		while ((apic_read(APIC_INTR_COMMAND_1) & APIC_DELIVERY_STATUS) != 0)			;		/* wait 10ms */		spin(10000);		/* is this a local apic or an 82489dx ? */		numStartups = (gKernelArgs.arch_args.cpu_apic_version[i] & 0xf0) ? 2 : 0;dprintf("num startups = %ld\n", numStartups);		for (j = 0; j < numStartups; j++) {			/* it's a local apic, so send STARTUP IPIs */dprintf("send STARTUP\n");			apic_write(APIC_ERROR_STATUS, 0);			/* set target pe */			config = (apic_read(APIC_INTR_COMMAND_2) & APIC_INTR_COMMAND_2_MASK)				| (gKernelArgs.arch_args.cpu_apic_id[i] << 24);			apic_write(APIC_INTR_COMMAND_2, config);			/* send the IPI */			config = (apic_read(APIC_INTR_COMMAND_1) & 0xfff0f800)				| APIC_DELIVERY_MODE_STARTUP | (trampolineCode >> 12);			apic_write(APIC_INTR_COMMAND_1, config);			/* wait */			spin(200);dprintf("wait for delivery\n");			while ((apic_read(APIC_INTR_COMMAND_1) & APIC_DELIVERY_STATUS) != 0)				;		}	}	TRACE(("done trampolining\n"));}