Initial commit for reference project.

Change-Id: I3cb14334705fa7a83192b54fa6f3e2ada5362a84
diff --git a/hikey/BUILD.gn b/hikey/BUILD.gn
new file mode 100644
index 0000000..4b7c185
--- /dev/null
+++ b/hikey/BUILD.gn
@@ -0,0 +1,26 @@
+# Copyright 2018 Google LLC
+#
+# 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.
+
+source_set("hikey") {
+  sources = [
+    "fdt.S",
+    "initrd.S",
+    "plat.c",
+  ]
+  inputs = [
+    "fdt.dtb",
+    "initrd.img",
+  ]
+  include_dirs = [ "." ]
+}
diff --git a/hikey/fdt.S b/hikey/fdt.S
new file mode 100644
index 0000000..77c33e3
--- /dev/null
+++ b/hikey/fdt.S
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * 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.
+ */
+
+.section .plat.fdt, "a"
+.incbin "fdt.dtb"
+# Pad with a page to accomodate modifications.
+# TODO: remove when FDT modification is removed.
+.fill 4096, 1, 0
diff --git a/hikey/fdt.dtb b/hikey/fdt.dtb
new file mode 100644
index 0000000..7b05018
--- /dev/null
+++ b/hikey/fdt.dtb
Binary files differ
diff --git a/hikey/initrd.S b/hikey/initrd.S
new file mode 100644
index 0000000..fa8ce0c
--- /dev/null
+++ b/hikey/initrd.S
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * 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.
+ */
+
+.section .plat.initrd, "a"
+.incbin "initrd.img"
diff --git a/hikey/initrd.img b/hikey/initrd.img
new file mode 100644
index 0000000..9bdac5e
--- /dev/null
+++ b/hikey/initrd.img
Binary files differ
diff --git a/hikey/plat.c b/hikey/plat.c
new file mode 100644
index 0000000..6701c71
--- /dev/null
+++ b/hikey/plat.c
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2018 Google LLC
+ *
+ * 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.
+ */
+
+#include "hf/cpu.h"
+
+uintreg_t plat_get_kernel_arg(void)
+{
+	return 0;
+}