Ejemplo n.º 1
0
static int
basl_fwrite_dsdt(FILE *fp, struct vmctx *ctx)
{
	dsdt_fp = fp;
	dsdt_error = 0;
	dsdt_indent_level = 0;

	dsdt_line("/*");
	dsdt_line(" * dm DSDT template");
	dsdt_line(" */");
	dsdt_line("DefinitionBlock (\"dm_dsdt.aml\", \"DSDT\", 2,"
			"\"DM \", \"DMDSDT  \", 0x00000001)");
	dsdt_line("{");
	dsdt_line("  Name (_S3, Package ()");
	dsdt_line("  {");
	dsdt_line("      0x03,");
	dsdt_line("      Zero,");
	dsdt_line("  })");
	dsdt_line("  Name (_S5, Package ()");
	dsdt_line("  {");
	dsdt_line("      0x05,");
	dsdt_line("      Zero,");
	dsdt_line("  })");

	pci_write_dsdt();

	dsdt_line("");
	dsdt_line("  Scope (_SB.PCI0)");
	dsdt_line("  {");
	dsdt_line("    Device (HPET)");
	dsdt_line("    {");
	dsdt_line("      Name (_HID, EISAID(\"PNP0103\"))");
	dsdt_line("      Name (_UID, 0)");
	dsdt_line("      Name (_CRS, ResourceTemplate ()");
	dsdt_line("      {");
	dsdt_indent(4);
	dsdt_fixed_mem32(VHPET_BASE, VHPET_SIZE);
	dsdt_unindent(4);
	dsdt_line("      })");
	dsdt_line("    }");
	dsdt_line("  }");

	pm_write_dsdt(ctx, basl_ncpu);

	if (ctx->tpm_dev)
		tpm2_crb_fwrite_dsdt();

	dsdt_line("}");

	if (dsdt_error != 0)
		return dsdt_error;

	EFFLUSH(fp);

	return 0;
}
Ejemplo n.º 2
0
static int
basl_fwrite_dsdt(FILE *fp)
{
	int err;

	err = 0;
	dsdt_fp = fp;
	dsdt_error = 0;
	dsdt_indent_level = 0;

	dsdt_line("/*");
	dsdt_line(" * bhyve DSDT template");
	dsdt_line(" */");
	dsdt_line("DefinitionBlock (\"bhyve_dsdt.aml\", \"DSDT\", 2,"
		 "\"BHYVE \", \"BVDSDT  \", 0x00000001)");
	dsdt_line("{");
	dsdt_line("  Name (_S5, Package ()");
	dsdt_line("  {");
	dsdt_line("      0x05,");
	dsdt_line("      Zero,");
	dsdt_line("  })");

	pci_write_dsdt();

	dsdt_line("");
	dsdt_line("  Scope (_SB.PC00)");
	dsdt_line("  {");
	dsdt_line("    Device (HPET)");
	dsdt_line("    {");
	dsdt_line("      Name (_HID, EISAID(\"PNP0103\"))");
	dsdt_line("      Name (_UID, 0)");
	dsdt_line("      Name (_CRS, ResourceTemplate ()");
	dsdt_line("      {");
	dsdt_indent(4);
	dsdt_fixed_mem32(0xFED00000, 0x400);
	dsdt_unindent(4);
	dsdt_line("      })");
	dsdt_line("    }");
	dsdt_line("  }");
	dsdt_line("}");

	if (dsdt_error != 0)
		return (dsdt_error);

	EFFLUSH(fp);

	return (0);

err_exit:
	return (errno);
}
Ejemplo n.º 3
0
Archivo: rtc.c Proyecto: coyizumi/cs111
static void
rtc_dsdt(void)
{

	dsdt_line("");
	dsdt_line("Device (RTC)");
	dsdt_line("{");
	dsdt_line("  Name (_HID, EisaId (\"PNP0B00\"))");
	dsdt_line("  Name (_CRS, ResourceTemplate ()");
	dsdt_line("  {");
	dsdt_indent(2);
	dsdt_fixed_ioport(IO_RTC, 2);
	dsdt_fixed_irq(8);
	dsdt_unindent(2);
	dsdt_line("  })");
	dsdt_line("}");
}
Ejemplo n.º 4
0
static void tpm2_crb_fwrite_dsdt(void)
{
	dsdt_line("  Scope (\\_SB)");
	dsdt_line("  {");
	dsdt_line("    Device (TPM)");
	dsdt_line("    {");
	dsdt_line("      Name (_HID, \"MSFT0101\" /* TPM 2.0 Security Device */)  // _HID: Hardware ID");
	dsdt_line("      Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings");
	dsdt_line("      {");
	dsdt_indent(4);
	dsdt_fixed_mem32(TPM_CRB_MMIO_ADDR, TPM_CRB_MMIO_SIZE);
	dsdt_unindent(4);
	dsdt_line("      })");
	dsdt_line("      Method (_STA, 0, NotSerialized)  // _STA: Status");
	dsdt_line("      {");
	dsdt_line("        Return (0x0F)");
	dsdt_line("      }");
	dsdt_line("    }");
	dsdt_line("  }");
}