#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
+#include <string.h>
#include <machine/archtypes.h>
#include <archconst.h>
#include <machine/cmos.h>
*/
void copy_trampoline(void)
{
- char * s, *end;
unsigned tramp_size, tramp_start = (unsigned)&trampoline;;
/* The trampoline code/data is made to be page-aligned. */
__ap_idt.base = ap_lin_addr(&__ap_idt_tab);
__ap_idt.limit = sizeof(idt)-1;
- phys_copy(trampoline, trampoline_base, tramp_size);
+ phys_copy((phys_bytes) trampoline, trampoline_base, tramp_size);
}
extern int booting_cpu; /* tell protect.c what to do */
static void smp_start_aps(void)
{
unsigned cpu;
- u32_t biosresetvector, *newptpos;
+ u32_t biosresetvector;
phys_bytes __ap_id_phys;
struct proc *bootstrap_pt = get_cpulocal_var(ptproc);
/* TODO hack around the alignment problem */
- phys_copy (0x467, &biosresetvector, sizeof(u32_t));
+ phys_copy(0x467, (phys_bytes) &biosresetvector, sizeof(u32_t));
/* set the bios shutdown code to 0xA */
outb(RTC_INDEX, 0xF);
(phys_bytes) &__ap_id - (phys_bytes)&trampoline;
/* setup the warm reset vector */
- phys_copy(&trampoline_base, 0x467, sizeof(u32_t));
+ phys_copy((phys_bytes) &trampoline_base, 0x467, sizeof(u32_t));
/* okay, we're ready to go. boot all of the ap's now. we loop through
* using the processor's apic id values.
}
__ap_id = booting_cpu = cpu;
- phys_copy((void *) &__ap_id, __ap_id_phys, sizeof(__ap_id));
+ phys_copy((phys_bytes) &__ap_id, __ap_id_phys, sizeof(__ap_id));
mfence();
if (apic_send_init_ipi(cpu, trampoline_base) ||
apic_send_startup_ipi(cpu, trampoline_base)) {
}
}
- phys_copy(&biosresetvector,(phys_bytes)0x467,sizeof(u32_t));
+ phys_copy((phys_bytes) &biosresetvector, 0x467, sizeof(u32_t));
outb(RTC_INDEX, 0xF);
outb(RTC_IO, 0);