Lines Matching full:mc
28 ulong mc; in mp_write_floating_table() local
44 mc = (ulong)mf + sizeof(struct mp_floating_table); in mp_write_floating_table()
45 return (struct mp_config_table *)mc; in mp_write_floating_table()
48 void mp_config_table_init(struct mp_config_table *mc) in mp_config_table_init() argument
50 memcpy(mc->mpc_signature, MPC_SIGNATURE, 4); in mp_config_table_init()
51 mc->mpc_length = sizeof(struct mp_config_table); in mp_config_table_init()
52 mc->mpc_spec = MPSPEC_V14; in mp_config_table_init()
53 mc->mpc_checksum = 0; in mp_config_table_init()
54 mc->mpc_oemptr = 0; in mp_config_table_init()
55 mc->mpc_oemsize = 0; in mp_config_table_init()
56 mc->mpc_entry_count = 0; in mp_config_table_init()
57 mc->mpc_lapic = LAPIC_DEFAULT_BASE; in mp_config_table_init()
58 mc->mpe_length = 0; in mp_config_table_init()
59 mc->mpe_checksum = 0; in mp_config_table_init()
60 mc->reserved = 0; in mp_config_table_init()
63 table_fill_string(mc->mpc_oem, CONFIG_SYS_VENDOR, 8, ' '); in mp_config_table_init()
64 table_fill_string(mc->mpc_product, CONFIG_SYS_BOARD, 12, ' '); in mp_config_table_init()
67 void mp_write_processor(struct mp_config_table *mc) in mp_write_processor() argument
90 mpc = (struct mpc_config_processor *)mp_next_mpc_entry(mc); in mp_write_processor()
101 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_processor()
105 void mp_write_bus(struct mp_config_table *mc, int id, const char *bustype) in mp_write_bus() argument
109 mpc = (struct mpc_config_bus *)mp_next_mpc_entry(mc); in mp_write_bus()
113 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_bus()
116 void mp_write_ioapic(struct mp_config_table *mc, int id, int ver, u32 apicaddr) in mp_write_ioapic() argument
120 mpc = (struct mpc_config_ioapic *)mp_next_mpc_entry(mc); in mp_write_ioapic()
126 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_ioapic()
129 void mp_write_intsrc(struct mp_config_table *mc, int irqtype, int irqflag, in mp_write_intsrc() argument
134 mpc = (struct mpc_config_intsrc *)mp_next_mpc_entry(mc); in mp_write_intsrc()
142 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_intsrc()
145 void mp_write_pci_intsrc(struct mp_config_table *mc, int irqtype, in mp_write_pci_intsrc() argument
150 mp_write_intsrc(mc, irqtype, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW, in mp_write_pci_intsrc()
154 void mp_write_lintsrc(struct mp_config_table *mc, int irqtype, int irqflag, in mp_write_lintsrc() argument
159 mpc = (struct mpc_config_lintsrc *)mp_next_mpc_entry(mc); in mp_write_lintsrc()
167 mp_add_mpc_entry(mc, sizeof(*mpc)); in mp_write_lintsrc()
170 void mp_write_address_space(struct mp_config_table *mc, in mp_write_address_space() argument
177 mpe = (struct mp_ext_system_address_space *)mp_next_mpe_entry(mc); in mp_write_address_space()
186 mp_add_mpe_entry(mc, (struct mp_ext_config *)mpe); in mp_write_address_space()
189 void mp_write_bus_hierarchy(struct mp_config_table *mc, in mp_write_bus_hierarchy() argument
194 mpe = (struct mp_ext_bus_hierarchy *)mp_next_mpe_entry(mc); in mp_write_bus_hierarchy()
203 mp_add_mpe_entry(mc, (struct mp_ext_config *)mpe); in mp_write_bus_hierarchy()
206 void mp_write_compat_address_space(struct mp_config_table *mc, int busid, in mp_write_compat_address_space() argument
211 mpe = (struct mp_ext_compat_address_space *)mp_next_mpe_entry(mc); in mp_write_compat_address_space()
217 mp_add_mpe_entry(mc, (struct mp_ext_config *)mpe); in mp_write_compat_address_space()
220 u32 mptable_finalize(struct mp_config_table *mc) in mptable_finalize() argument
224 mc->mpe_checksum = table_compute_checksum((void *)mp_next_mpc_entry(mc), in mptable_finalize()
225 mc->mpe_length); in mptable_finalize()
226 mc->mpc_checksum = table_compute_checksum(mc, mc->mpc_length); in mptable_finalize()
227 end = mp_next_mpe_entry(mc); in mptable_finalize()
229 debug("Write the MP table at: %lx - %lx\n", (ulong)mc, end); in mptable_finalize()
234 static void mptable_add_isa_interrupts(struct mp_config_table *mc, int bus_isa, in mptable_add_isa_interrupts() argument
239 mp_write_intsrc(mc, external_int2 ? MP_INT : MP_EXTINT, in mptable_add_isa_interrupts()
242 mp_write_intsrc(mc, MP_INT, MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, in mptable_add_isa_interrupts()
244 mp_write_intsrc(mc, external_int2 ? MP_EXTINT : MP_INT, in mptable_add_isa_interrupts()
256 mp_write_intsrc(mc, MP_INT, in mptable_add_isa_interrupts()
289 static int mptable_add_intsrc(struct mp_config_table *mc, in mptable_add_intsrc() argument
317 intsrc_base = (struct mpc_config_intsrc *)mp_next_mpc_entry(mc); in mptable_add_intsrc()
346 mp_write_pci_intsrc(mc, MP_INT, bus, dev, pr.pin, in mptable_add_intsrc()
354 mptable_add_isa_interrupts(mc, bus_isa, apicid, 0); in mptable_add_intsrc()
359 static void mptable_add_lintsrc(struct mp_config_table *mc, int bus_isa) in mptable_add_lintsrc() argument
361 mp_write_lintsrc(mc, MP_EXTINT, in mptable_add_lintsrc()
364 mp_write_lintsrc(mc, MP_NMI, in mptable_add_lintsrc()
371 struct mp_config_table *mc; in write_mp_table() local
381 mc = mp_write_floating_table((struct mp_floating_table *)addr); in write_mp_table()
384 mp_config_table_init(mc); in write_mp_table()
387 mp_write_processor(mc); in write_mp_table()
390 mp_write_bus(mc, bus_isa, BUSTYPE_ISA); in write_mp_table()
395 mp_write_ioapic(mc, ioapic_id, ioapic_ver, IO_APIC_ADDR); in write_mp_table()
398 ret = mptable_add_intsrc(mc, bus_isa, ioapic_id); in write_mp_table()
403 mptable_add_lintsrc(mc, bus_isa); in write_mp_table()
406 end = mptable_finalize(mc); in write_mp_table()