Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser,fdtQueryEngine: Fix parser bug with queries
When using dtb queries on a type that has multiple instances, when the second or additional instances are evaluated, their settings have bad values: `gpio_mux_server1.gpio.dtb = dtb({})` instead of the expected: `gpio_mux_server1.gpio.dtb = dtb({"path" : "/gpio@2200000"})`. This is due to a parser bug that mutates the internal dictionary object instead of mutating a copy. Switching to a deep copy avoids mutating the AST object. ``` component GPIOMUXServer { emits FDT dummy_source; consumes FDT gpio; consumes FDT mux; composition { connection seL4DTBHardware gpio_conn(from dummy_source, to gpio); connection seL4DTBHardware mux_conn(from dummy_source, to mux); } configuration { gpio.dtb = dtb({"path" : "/gpio@2200000"}); mux.dtb = dtb({"path" : "/pinmux@2430000"}); } } assembly { composition { component GPIOMUXServer gpio_mux_server0; component GPIOMUXServer gpio_mux_server1; } configuration {} } ``` Signed-off-by: Kent McLeod <[email protected]>
- Loading branch information