1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2020 Google LLC
6 #include <acpi/acpigen.h>
7 #include <acpi/acpi_table.h>
8 #include <asm/acpigen.h>
10 void acpigen_write_empty_pct(struct acpi_ctx *ctx)
13 * Name (_PCT, Package (0x02)
20 * 0x0000000000000000, // Address
29 * 0x0000000000000000, // Address
34 static char stream[] = {
35 /* 00000030 "0._PCT.," */
36 0x08, 0x5f, 0x50, 0x43, 0x54, 0x12, 0x2c,
37 /* 00000038 "........" */
38 0x02, 0x11, 0x14, 0x0a, 0x11, 0x82, 0x0c, 0x00,
39 /* 00000040 "........" */
40 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
41 /* 00000048 "....y..." */
42 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x11, 0x14,
43 /* 00000050 "........" */
44 0x0a, 0x11, 0x82, 0x0c, 0x00, 0x7f, 0x00, 0x00,
45 /* 00000058 "........" */
46 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
49 acpigen_emit_stream(ctx, stream, ARRAY_SIZE(stream));
52 void acpigen_write_empty_ptc(struct acpi_ctx *ctx)
55 * Name (_PTC, Package (0x02)
62 * 0x0000000000000000, // Address
71 * 0x0000000000000000, // Address
76 struct acpi_gen_regaddr addr = {
77 .space_id = ACPI_ADDRESS_SPACE_FIXED,
85 acpigen_write_name(ctx, "_PTC");
86 acpigen_write_package(ctx, 2);
89 acpigen_write_register_resource(ctx, &addr);
92 acpigen_write_register_resource(ctx, &addr);