Changeset 137 for trunk/hal/x86_64/core/hal_init.c
- Timestamp:
- Jul 4, 2017, 10:17:44 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_init.c
r135 r137 84 84 static void init_bootinfo_icu(boot_device_t *dev) 85 85 { 86 extern uint32_t hwi_baseidx; 87 extern uint32_t wti_baseidx; 88 extern uint32_t pti_baseidx; 89 extern size_t ioapic_pins; 90 86 91 memset(dev, 0, sizeof(boot_device_t)); 87 92 88 dev->base = NULL; /* XXX */93 dev->base = 0; 89 94 dev->type = (DEV_FUNC_ICU << 16) | IMPL_ICU_XCU; 90 95 dev->channels = 1; 91 dev->param0 = 0; 92 dev->param1 = 0; 93 dev->param2 = 0; 96 97 /* 98 * Give 20% of the pins to HWI, 80% to WTI. 99 */ 100 dev->param0 = (ioapic_pins * 20) / 100; /* hwi_nr */ 101 dev->param1 = ioapic_pins - dev->param0; /* wti_nr */ 102 103 /* 104 * We always set 1 for pti_nr. On x86, timer interrupts are handled by 105 * LAPIC, which is per-cpu and not global. Therefore, we always have one 106 * timer for each CPU, and its IRQ number is faked to 0. 107 */ 108 dev->param2 = 1; /* pti_nr */ 109 94 110 dev->param3 = 0; 111 112 /* Set the base idx for the XCU driver */ 113 hwi_baseidx = 0; 114 wti_baseidx = dev->param0; 115 pti_baseidx = 0xFFFFFFFF; 95 116 96 117 #ifdef NOTYET … … 132 153 size_t i, rsvd_nr; 133 154 134 memset(rsvd, 0, sizeof(boot_rsvd_t) );155 memset(rsvd, 0, sizeof(boot_rsvd_t) * CONFIG_PPM_MAX_RSVD); 135 156 136 157 i = 0, rsvd_nr = 0; … … 208 229 init_bootinfo_core(&info->core[0]); 209 230 210 info->rsvd_nr = init_bootinfo_rsvd( &info->rsvd);231 info->rsvd_nr = init_bootinfo_rsvd((boot_rsvd_t *)&info->rsvd); 211 232 212 233 init_bootinfo_icu(&info->dev_icu);
Note: See TracChangeset
for help on using the changeset viewer.