refactor: introduce the partition_pkg type

To be able to load partition packages with the format
of transfer lists, introduce intermediate representation,
which holds all the ranges relevant for the loading of the
SP.

The SP Package is translated into this intermediate
representation.

Subsequent patches do the same for the transfer list structure.

The mapping of SPs artefacts (i.e. partition manifest, and
area of boot information) are mapped and unmapped as necessary,
using the structure partition_pkg.

The memory ranges introduced so far:
- Partition Manager.
- SPs image.
- Hob range(though it remains unused).

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ic9d0850202617a88070953f0f9075f78a1c8d7b6
diff --git a/inc/hf/partition_pkg.h b/inc/hf/partition_pkg.h
new file mode 100644
index 0000000..bdc03b8
--- /dev/null
+++ b/inc/hf/partition_pkg.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2024 The Hafnium Authors.
+ *
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file or at
+ * https://opensource.org/licenses/BSD-3-Clause.
+ */
+
+#pragma once
+
+#include "hf/addr.h"
+#include "hf/boot_params.h"
+#include "hf/types.h"
+
+/**
+ * Aggregates all the necessary ranges needed for Hafnium to
+ * load an SP.
+ */
+struct partition_pkg {
+	/* Memory range for the partition manifest. */
+	struct mem_range pm;
+	/* Memory range for the image. */
+	struct mem_range img;
+	/* Memory range for the HOB list. - optional, if absent set to 0. */
+	struct mem_range hob;
+	/* Memory range for the FF-A boot info descriptors. */
+	struct mem_range boot_info;
+	/* Memory range for the totality of the package. */
+	struct mem_range total;
+};
+
+bool partition_pkg_init(struct mm_stage1_locked stage1_locked,
+			paddr_t pkg_start, struct partition_pkg *pkg,
+			struct mpool *ppool);
+
+void partition_pkg_deinit(struct mm_stage1_locked stage1_locked,
+			  struct partition_pkg *pkg, struct mpool *ppool);