Introduce a DT-based manifest

These are first steps towards a new manifest format. A new "device_tree"
build target is introduced to compile DTS files to DTB, and
`generate_initrd.py` now does not produce a "vms.txt" file. Instead
"initrd" targets are expected to provide a path to a DTS manifest in the
format:

    /dts-v1/;

    / {
      hypervisor {
        vm1 {
	  debug_name = "primary";
	};

	vm2 {
	  debug_name = "secondary1";
	  kernel_filename = "filename";
	  vcpu_count = <N>;
          mem_size = <M>;
	};

	...
      };
    };

The information provided in the manifest matches "vms.txt".

Bug: 117551352
Test: manifest_test.cc
Test: used by hftest
Change-Id: I6b70bd44d2b110c4f7a6b971018c834084b6d8c4
diff --git a/test/linux/BUILD.gn b/test/linux/BUILD.gn
index 84e72bc..fcc5907 100644
--- a/test/linux/BUILD.gn
+++ b/test/linux/BUILD.gn
@@ -57,11 +57,10 @@
 initrd("linux_test") {
   testonly = true
 
+  manifest = "manifest.dts"
   primary_vm = "//third_party:linux__prebuilt"
   primary_initrd = ":linux_test_initrd"
   secondary_vms = [ [
-        "1048576",
-        "1",
         "socket0",
         ":socket_vm0",
       ] ]
diff --git a/test/linux/manifest.dts b/test/linux/manifest.dts
new file mode 100644
index 0000000..5437968
--- /dev/null
+++ b/test/linux/manifest.dts
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2019 The Hafnium Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/dts-v1/;
+
+/ {
+	hypervisor {
+		vm1 {
+			debug_name = "primary";
+		};
+
+		vm2 {
+			debug_name = "socket0";
+			vcpu_count = <1>;
+			mem_size = <0x100000>;
+			kernel_filename = "socket0";
+		};
+	};
+};
diff --git a/test/vmapi/gicv3/BUILD.gn b/test/vmapi/gicv3/BUILD.gn
index 162a84a..196f169 100644
--- a/test/vmapi/gicv3/BUILD.gn
+++ b/test/vmapi/gicv3/BUILD.gn
@@ -41,10 +41,9 @@
 initrd("gicv3_test") {
   testonly = true
 
+  manifest = "manifest.dts"
   primary_vm = ":gicv3_test_vm"
   secondary_vms = [ [
-        "1048576",
-        "1",
         "services0",
         "services:gicv3_service_vm0",
       ] ]
diff --git a/test/vmapi/gicv3/manifest.dts b/test/vmapi/gicv3/manifest.dts
new file mode 100644
index 0000000..4e90046
--- /dev/null
+++ b/test/vmapi/gicv3/manifest.dts
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2019 The Hafnium Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/dts-v1/;
+
+/ {
+	hypervisor {
+		vm1 {
+			debug_name = "primary";
+		};
+
+		vm2 {
+			debug_name = "services0";
+			vcpu_count = <1>;
+			mem_size = <0x100000>;
+			kernel_filename = "services0";
+		};
+	};
+};
diff --git a/test/vmapi/primary_only/BUILD.gn b/test/vmapi/primary_only/BUILD.gn
index cad9077..ecb197a 100644
--- a/test/vmapi/primary_only/BUILD.gn
+++ b/test/vmapi/primary_only/BUILD.gn
@@ -30,6 +30,6 @@
 
 initrd("primary_only_test") {
   testonly = true
-
+  manifest = "manifest.dts"
   primary_vm = ":primary_only_test_vm"
 }
diff --git a/test/vmapi/primary_only/manifest.dts b/test/vmapi/primary_only/manifest.dts
new file mode 100644
index 0000000..0e1b082
--- /dev/null
+++ b/test/vmapi/primary_only/manifest.dts
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2019 The Hafnium Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/dts-v1/;
+
+/ {
+	hypervisor {
+		vm1 {
+			debug_name = "primary";
+		};
+	};
+};
diff --git a/test/vmapi/primary_with_secondaries/BUILD.gn b/test/vmapi/primary_with_secondaries/BUILD.gn
index d24570f..60b78a0 100644
--- a/test/vmapi/primary_with_secondaries/BUILD.gn
+++ b/test/vmapi/primary_with_secondaries/BUILD.gn
@@ -47,23 +47,19 @@
 initrd("primary_with_secondaries_test") {
   testonly = true
 
+  manifest = "manifest.dts"
+
   primary_vm = ":primary_with_secondaries_test_vm"
   secondary_vms = [
     [
-      "1048576",
-      "1",
       "services0",
       "services:service_vm0",
     ],
     [
-      "1048576",
-      "1",
       "services1",
       "services:service_vm1",
     ],
     [
-      "1048576",
-      "2",
       "services2",
       "services:service_vm2",
     ],
diff --git a/test/vmapi/primary_with_secondaries/manifest.dts b/test/vmapi/primary_with_secondaries/manifest.dts
new file mode 100644
index 0000000..741becd
--- /dev/null
+++ b/test/vmapi/primary_with_secondaries/manifest.dts
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2019 The Hafnium Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/dts-v1/;
+
+/ {
+	hypervisor {
+		vm1 {
+			debug_name = "primary";
+		};
+
+		vm2 {
+			debug_name = "services0";
+			vcpu_count = <1>;
+			mem_size = <0x100000>;
+			kernel_filename = "services0";
+		};
+
+		vm3 {
+			debug_name = "services1";
+			vcpu_count = <1>;
+			mem_size = <0x100000>;
+			kernel_filename = "services1";
+		};
+
+		vm4 {
+			debug_name = "services2";
+			vcpu_count = <2>;
+			mem_size = <0x100000>;
+			kernel_filename = "services2";
+		};
+	};
+};