1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2020 Google LLC
7 #include <acpi/acpigen.h>
8 #include <acpi/acpi_table.h>
9 #include <asm/acpigen.h>
11 void acpigen_write_empty_pct(struct acpi_ctx *ctx)
14 * Name (_PCT, Package (0x02)
21 * 0x0000000000000000, // Address
30 * 0x0000000000000000, // Address
35 static char stream[] = {
36 /* 00000030 "0._PCT.," */
37 0x08, 0x5f, 0x50, 0x43, 0x54, 0x12, 0x2c,
38 /* 00000038 "........" */
39 0x02, 0x11, 0x14, 0x0a, 0x11, 0x82, 0x0c, 0x00,
40 /* 00000040 "........" */
41 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42 /* 00000048 "....y..." */
43 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x11, 0x14,
44 /* 00000050 "........" */
45 0x0a, 0x11, 0x82, 0x0c, 0x00, 0x7f, 0x00, 0x00,
46 /* 00000058 "........" */
47 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
50 acpigen_emit_stream(ctx, stream, ARRAY_SIZE(stream));
53 void acpigen_write_empty_ptc(struct acpi_ctx *ctx)
56 * Name (_PTC, Package (0x02)
63 * 0x0000000000000000, // Address
72 * 0x0000000000000000, // Address
77 struct acpi_gen_regaddr addr = {
78 .space_id = ACPI_ADDRESS_SPACE_FIXED,
86 acpigen_write_name(ctx, "_PTC");
87 acpigen_write_package(ctx, 2);
90 acpigen_write_register_resource(ctx, &addr);
93 acpigen_write_register_resource(ctx, &addr);