Esempio n. 1
0
static int64_t generic_cec_power_down(uint64_t request __unused)
{
	if (chip_quirk(QUIRK_MAMBO_CALLOUTS))
		mambo_sim_exit();

	return OPAL_UNSUPPORTED;
}
Esempio n. 2
0
void op_display_lpc(enum op_severity s, enum op_module m, uint16_t c)
{
	static uint8_t port80_val = 0x80;
	static uint16_t port8x_val = 0x8000;

	if (chip_quirk(QUIRK_SIMICS))
		return;

	port80_val = op_display_to_port80(port80_val, s, m, c);
	lpc_outb(port80_val, 0x80);
	port8x_val = op_display_to_port8x(port8x_val, s, m, c);
	lpc_outb(port8x_val >> 8, 0x81);
	lpc_outb(port8x_val & 0xFF, 0x82);
}
Esempio n. 3
0
void homer_init(void)
{
	struct proc_chip *chip;

	if (chip_quirk(QUIRK_NO_PBA))
		return;

	switch (proc_gen) {
	case proc_gen_p8:
		pba_bar0 = P8_PBA_BAR0;
		pba_barmask0 = P8_PBA_BARMASK0;
		bar_homer = P8_BAR_HOMER;
		bar_slw = P8_BAR_SLW;
		bar_occ_common = P8_BAR_OCC_COMMON;
		break;
	case proc_gen_p9:
		pba_bar0 = P9_PBA_BAR0;
		pba_barmask0 = P9_PBA_BARMASK0;
		bar_homer = P9_BAR_HOMER;
		bar_occ_common = P9_BAR_OCC_COMMON;
		break;
	default:
		return;
	};

	/*
	 * XXX This is temporary, on P8 we look for any configured
	 * SLW/OCC BAR and reserve the memory. Eventually, this will be
	 * done via HostBoot using the device-tree "reserved-ranges"
	 * or we'll load the SLW & OCC images ourselves using Host Services.
	 */
	for_each_chip(chip) {
		prlog(PR_DEBUG, "HOMER: Init chip %d\n", chip->id);
		homer_init_chip(chip);
	}

	/*
	 * Check is PBA BARs are already loaded with HOMER and
	 * skip host services.
	 */

	chip = next_chip(NULL);
	/* Both HOMER images and OCC areas are setup */
	if (chip->homer_base && chip->occ_common_base) {
		/* Reserve OCC common area from BAR */
		if (!mem_range_is_reserved(chip->occ_common_base,
					chip->occ_common_size)) {
			prlog(PR_WARNING,
				"OCC common area is not reserved! Reserving\n");
			mem_reserve_fw("ibm,occ-common-area",
						chip->occ_common_base,
						chip->occ_common_size);
		}
	} else if (chip->homer_base) {
		/*
		 * HOMER is setup but not OCC!! Do not allocate HOMER
		 * regions.  This case is possible during early system
		 * bringup where OCC images are not yet operational.
		 */
	} else {
		/* Allocate memory for HOMER and OCC common area */
		host_services_occ_base_setup();
	}
}