Lines Matching refs:mc

27 	ulong mc;  in mp_write_floating_table()  local
43 mc = (ulong)mf + sizeof(struct mp_floating_table); in mp_write_floating_table()
44 return (struct mp_config_table *)mc; in mp_write_floating_table()
47 void mp_config_table_init(struct mp_config_table *mc) in mp_config_table_init() argument
49 memcpy(mc->mpc_signature, MPC_SIGNATURE, 4); in mp_config_table_init()
50 mc->mpc_length = sizeof(struct mp_config_table); in mp_config_table_init()
51 mc->mpc_spec = MPSPEC_V14; in mp_config_table_init()
52 mc->mpc_checksum = 0; in mp_config_table_init()
53 mc->mpc_oemptr = 0; in mp_config_table_init()
54 mc->mpc_oemsize = 0; in mp_config_table_init()
55 mc->mpc_entry_count = 0; in mp_config_table_init()
56 mc->mpc_lapic = LAPIC_DEFAULT_BASE; in mp_config_table_init()
57 mc->mpe_length = 0; in mp_config_table_init()
58 mc->mpe_checksum = 0; in mp_config_table_init()
59 mc->reserved = 0; in mp_config_table_init()
62 table_fill_string(mc->mpc_oem, CONFIG_SYS_VENDOR, 8, ' '); in mp_config_table_init()
63 table_fill_string(mc->mpc_product, CONFIG_SYS_BOARD, 12, ' '); in mp_config_table_init()
66 void mp_write_processor(struct mp_config_table *mc) in mp_write_processor() argument
89 mpc = (struct mpc_config_processor *)mp_next_mpc_entry(mc); in mp_write_processor()
100 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_processor()
104 void mp_write_bus(struct mp_config_table *mc, int id, const char *bustype) in mp_write_bus() argument
108 mpc = (struct mpc_config_bus *)mp_next_mpc_entry(mc); in mp_write_bus()
112 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_bus()
115 void mp_write_ioapic(struct mp_config_table *mc, int id, int ver, u32 apicaddr) in mp_write_ioapic() argument
119 mpc = (struct mpc_config_ioapic *)mp_next_mpc_entry(mc); in mp_write_ioapic()
125 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_ioapic()
128 void mp_write_intsrc(struct mp_config_table *mc, int irqtype, int irqflag, in mp_write_intsrc() argument
133 mpc = (struct mpc_config_intsrc *)mp_next_mpc_entry(mc); in mp_write_intsrc()
141 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_intsrc()
144 void mp_write_pci_intsrc(struct mp_config_table *mc, int irqtype, in mp_write_pci_intsrc() argument
149 mp_write_intsrc(mc, irqtype, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW, in mp_write_pci_intsrc()
153 void mp_write_lintsrc(struct mp_config_table *mc, int irqtype, int irqflag, in mp_write_lintsrc() argument
158 mpc = (struct mpc_config_lintsrc *)mp_next_mpc_entry(mc); in mp_write_lintsrc()
166 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_lintsrc()
169 void mp_write_address_space(struct mp_config_table *mc, in mp_write_address_space() argument
176 mpe = (struct mp_ext_system_address_space *)mp_next_mpe_entry(mc); in mp_write_address_space()
185 mp_add_mpe_entry(mc, (struct mp_ext_config *)mpe); in mp_write_address_space()
188 void mp_write_bus_hierarchy(struct mp_config_table *mc, in mp_write_bus_hierarchy() argument
193 mpe = (struct mp_ext_bus_hierarchy *)mp_next_mpe_entry(mc); in mp_write_bus_hierarchy()
202 mp_add_mpe_entry(mc, (struct mp_ext_config *)mpe); in mp_write_bus_hierarchy()
205 void mp_write_compat_address_space(struct mp_config_table *mc, int busid, in mp_write_compat_address_space() argument
210 mpe = (struct mp_ext_compat_address_space *)mp_next_mpe_entry(mc); in mp_write_compat_address_space()
216 mp_add_mpe_entry(mc, (struct mp_ext_config *)mpe); in mp_write_compat_address_space()
219 u32 mptable_finalize(struct mp_config_table *mc) in mptable_finalize() argument
223 mc->mpe_checksum = table_compute_checksum((void *)mp_next_mpc_entry(mc), in mptable_finalize()
224 mc->mpe_length); in mptable_finalize()
225 mc->mpc_checksum = table_compute_checksum(mc, mc->mpc_length); in mptable_finalize()
226 end = mp_next_mpe_entry(mc); in mptable_finalize()
228 debug("Write the MP table at: %lx - %lx\n", (ulong)mc, end); in mptable_finalize()
233 static void mptable_add_isa_interrupts(struct mp_config_table *mc, int bus_isa, in mptable_add_isa_interrupts() argument
238 mp_write_intsrc(mc, external_int2 ? MP_INT : MP_EXTINT, in mptable_add_isa_interrupts()
241 mp_write_intsrc(mc, MP_INT, MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, in mptable_add_isa_interrupts()
243 mp_write_intsrc(mc, external_int2 ? MP_EXTINT : MP_INT, in mptable_add_isa_interrupts()
255 mp_write_intsrc(mc, MP_INT, in mptable_add_isa_interrupts()
288 static int mptable_add_intsrc(struct mp_config_table *mc, in mptable_add_intsrc() argument
316 intsrc_base = (struct mpc_config_intsrc *)mp_next_mpc_entry(mc); in mptable_add_intsrc()
345 mp_write_pci_intsrc(mc, MP_INT, bus, dev, pr.pin, in mptable_add_intsrc()
353 mptable_add_isa_interrupts(mc, bus_isa, apicid, 0); in mptable_add_intsrc()
358 static void mptable_add_lintsrc(struct mp_config_table *mc, int bus_isa) in mptable_add_lintsrc() argument
360 mp_write_lintsrc(mc, MP_EXTINT, in mptable_add_lintsrc()
363 mp_write_lintsrc(mc, MP_NMI, in mptable_add_lintsrc()
370 struct mp_config_table *mc; in write_mp_table() local
380 mc = mp_write_floating_table((struct mp_floating_table *)addr); in write_mp_table()
383 mp_config_table_init(mc); in write_mp_table()
386 mp_write_processor(mc); in write_mp_table()
389 mp_write_bus(mc, bus_isa, BUSTYPE_ISA); in write_mp_table()
394 mp_write_ioapic(mc, ioapic_id, ioapic_ver, IO_APIC_ADDR); in write_mp_table()
397 ret = mptable_add_intsrc(mc, bus_isa, ioapic_id); in write_mp_table()
402 mptable_add_lintsrc(mc, bus_isa); in write_mp_table()
405 end = mptable_finalize(mc); in write_mp_table()