Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/machdep.c
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | |||||
static void native_parse_memmap(caddr_t, vm_paddr_t *, int *); | static void native_parse_memmap(caddr_t, vm_paddr_t *, int *); | ||||
/* Default init_ops implementation. */ | /* Default init_ops implementation. */ | ||||
struct init_ops init_ops = { | struct init_ops init_ops = { | ||||
.parse_preload_data = native_parse_preload_data, | .parse_preload_data = native_parse_preload_data, | ||||
.early_clock_source_init = i8254_init, | .early_clock_source_init = i8254_init, | ||||
.early_delay = i8254_delay, | .early_delay = i8254_delay, | ||||
.parse_memmap = native_parse_memmap, | .parse_memmap = native_parse_memmap, | ||||
#ifdef SMP | |||||
.mp_bootaddress = mp_bootaddress, | |||||
.start_all_aps = native_start_all_aps, | |||||
#endif | |||||
#ifdef DEV_PCI | |||||
.msi_init = msi_init, | |||||
#endif | |||||
}; | }; | ||||
/* | /* | ||||
* Physical address of the EFI System Table. Stashed from the metadata hints | * Physical address of the EFI System Table. Stashed from the metadata hints | ||||
* passed into the kernel and used by the EFI code to call runtime services. | * passed into the kernel and used by the EFI code to call runtime services. | ||||
*/ | */ | ||||
vm_paddr_t efi_systbl_phys; | vm_paddr_t efi_systbl_phys; | ||||
▲ Show 20 Lines • Show All 1,073 Lines • ▼ Show 20 Lines | if (atop(physmap[physmap_idx + 1]) != Maxmem && | ||||
printf("Physical memory use set to %ldK\n", Maxmem * 4); | printf("Physical memory use set to %ldK\n", Maxmem * 4); | ||||
/* | /* | ||||
* Make hole for "AP -> long mode" bootstrap code. The | * Make hole for "AP -> long mode" bootstrap code. The | ||||
* mp_bootaddress vector is only available when the kernel | * mp_bootaddress vector is only available when the kernel | ||||
* is configured to support APs and APs for the system start | * is configured to support APs and APs for the system start | ||||
* in real mode mode (e.g. SMP bare metal). | * in real mode mode (e.g. SMP bare metal). | ||||
*/ | */ | ||||
if (init_ops.mp_bootaddress) | #ifdef SMP | ||||
init_ops.mp_bootaddress(physmap, &physmap_idx); | mp_bootaddress(physmap, &physmap_idx); | ||||
#endif | |||||
/* call pmap initialization to make new kernel address space */ | /* call pmap initialization to make new kernel address space */ | ||||
pmap_bootstrap(&first); | pmap_bootstrap(&first); | ||||
/* | /* | ||||
* Size up each available chunk of physical memory. | * Size up each available chunk of physical memory. | ||||
* | * | ||||
* XXX Some BIOSes corrupt low 64KB between suspend and resume. | * XXX Some BIOSes corrupt low 64KB between suspend and resume. | ||||
▲ Show 20 Lines • Show All 1,513 Lines • Show Last 20 Lines |