“bb0a11cd14902971902987e2ed6f7107ae758bef”上不存在“...fluid/design/others/images/graph_construction_example.dot”
提交 5530427f 编写于 作者: I Igor Mammedov 提交者: Michael S. Tsirkin

acpi: extend aml_and() to accept target argument

Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 ca3df95d
...@@ -499,9 +499,9 @@ build_opcode_2arg_dst(uint8_t op, Aml *arg1, Aml *arg2, Aml *dst) ...@@ -499,9 +499,9 @@ build_opcode_2arg_dst(uint8_t op, Aml *arg1, Aml *arg2, Aml *dst)
} }
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefAnd */ /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefAnd */
Aml *aml_and(Aml *arg1, Aml *arg2) Aml *aml_and(Aml *arg1, Aml *arg2, Aml *dst)
{ {
return build_opcode_2arg_dst(0x7B /* AndOp */, arg1, arg2, NULL); return build_opcode_2arg_dst(0x7B /* AndOp */, arg1, arg2, dst);
} }
/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefOr */ /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefOr */
......
...@@ -274,7 +274,7 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, ...@@ -274,7 +274,7 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap,
aml_create_dword_field(aml_arg(3), aml_int(8), "CDW3")); aml_create_dword_field(aml_arg(3), aml_int(8), "CDW3"));
aml_append(ifctx, aml_store(aml_name("CDW2"), aml_name("SUPP"))); aml_append(ifctx, aml_store(aml_name("CDW2"), aml_name("SUPP")));
aml_append(ifctx, aml_store(aml_name("CDW3"), aml_name("CTRL"))); aml_append(ifctx, aml_store(aml_name("CDW3"), aml_name("CTRL")));
aml_append(ifctx, aml_store(aml_and(aml_name("CTRL"), aml_int(0x1D)), aml_append(ifctx, aml_store(aml_and(aml_name("CTRL"), aml_int(0x1D), NULL),
aml_name("CTRL"))); aml_name("CTRL")));
ifctx1 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(0x1)))); ifctx1 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(0x1))));
......
...@@ -470,7 +470,7 @@ static void build_append_pcihp_notify_entry(Aml *method, int slot) ...@@ -470,7 +470,7 @@ static void build_append_pcihp_notify_entry(Aml *method, int slot)
Aml *if_ctx; Aml *if_ctx;
int32_t devfn = PCI_DEVFN(slot, 0); int32_t devfn = PCI_DEVFN(slot, 0);
if_ctx = aml_if(aml_and(aml_arg(0), aml_int(0x1U << slot))); if_ctx = aml_if(aml_and(aml_arg(0), aml_int(0x1U << slot), NULL));
aml_append(if_ctx, aml_notify(aml_name("S%.02X", devfn), aml_arg(1))); aml_append(if_ctx, aml_notify(aml_name("S%.02X", devfn), aml_arg(1)));
aml_append(method, if_ctx); aml_append(method, if_ctx);
} }
...@@ -670,7 +670,8 @@ static Aml *build_prt(void) ...@@ -670,7 +670,8 @@ static Aml *build_prt(void)
aml_store(aml_shiftright(pin, aml_int(2), NULL), slot)); aml_store(aml_shiftright(pin, aml_int(2), NULL), slot));
/* lnk_idx = (slot + pin) & 3 */ /* lnk_idx = (slot + pin) & 3 */
aml_append(while_ctx, aml_append(while_ctx,
aml_store(aml_and(aml_add(pin, slot, NULL), aml_int(3)), lnk_idx)); aml_store(aml_and(aml_add(pin, slot, NULL), aml_int(3), NULL),
lnk_idx));
/* route[2] = "LNK[D|A|B|C]", selection based on pin % 3 */ /* route[2] = "LNK[D|A|B|C]", selection based on pin % 3 */
aml_append(while_ctx, initialize_route(route, "LNKD", lnk_idx, 0)); aml_append(while_ctx, initialize_route(route, "LNKD", lnk_idx, 0));
...@@ -685,7 +686,8 @@ static Aml *build_prt(void) ...@@ -685,7 +686,8 @@ static Aml *build_prt(void)
aml_index(route, aml_int(0)))); aml_index(route, aml_int(0))));
/* route[1] = pin & 3 */ /* route[1] = pin & 3 */
aml_append(while_ctx, aml_append(while_ctx,
aml_store(aml_and(pin, aml_int(3)), aml_index(route, aml_int(1)))); aml_store(aml_and(pin, aml_int(3), NULL),
aml_index(route, aml_int(1))));
/* res[pin] = route */ /* res[pin] = route */
aml_append(while_ctx, aml_store(route, aml_index(res, pin))); aml_append(while_ctx, aml_store(route, aml_index(res, pin)));
/* pin++ */ /* pin++ */
......
...@@ -251,7 +251,7 @@ Aml *aml_to_integer(Aml *arg); ...@@ -251,7 +251,7 @@ Aml *aml_to_integer(Aml *arg);
Aml *aml_to_hexstring(Aml *src, Aml *dst); Aml *aml_to_hexstring(Aml *src, Aml *dst);
Aml *aml_to_buffer(Aml *src, Aml *dst); Aml *aml_to_buffer(Aml *src, Aml *dst);
Aml *aml_store(Aml *val, Aml *target); Aml *aml_store(Aml *val, Aml *target);
Aml *aml_and(Aml *arg1, Aml *arg2); Aml *aml_and(Aml *arg1, Aml *arg2, Aml *dst);
Aml *aml_or(Aml *arg1, Aml *arg2, Aml *dst); Aml *aml_or(Aml *arg1, Aml *arg2, Aml *dst);
Aml *aml_lor(Aml *arg1, Aml *arg2); Aml *aml_lor(Aml *arg1, Aml *arg2);
Aml *aml_shiftleft(Aml *arg1, Aml *count); Aml *aml_shiftleft(Aml *arg1, Aml *count);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册