[PATCH v2 03/15] xen/dt: Add BOOTMOD_MICROCODE

Alejandro Vallejo posted 15 patches 4 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 03/15] xen/dt: Add BOOTMOD_MICROCODE
Posted by Alejandro Vallejo 4 months, 3 weeks ago
In preparation for x86 to start using bootmodule instead of boot_module

Signed-off-by: Alejandro Vallejo <agarciav@amd.com>
---
v2:
  * Added microcode detection in early probing
---
 xen/common/device-tree/bootfdt.c  | 2 ++
 xen/common/device-tree/bootinfo.c | 1 +
 xen/include/xen/bootfdt.h         | 1 +
 3 files changed, 4 insertions(+)

diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/bootfdt.c
index 9df80291b1..9daea06e57 100644
--- a/xen/common/device-tree/bootfdt.c
+++ b/xen/common/device-tree/bootfdt.c
@@ -351,6 +351,8 @@ static void __init process_multiboot_node(const void *fdt, int node,
         kind = BOOTMOD_XSM;
     else if ( fdt_node_check_compatible(fdt, node, "multiboot,device-tree") == 0 )
         kind = BOOTMOD_GUEST_DTB;
+    else if ( fdt_node_check_compatible(fdt, node, "multiboot,microcode") == 0 )
+        kind = BOOTMOD_MICROCODE;
     else
         kind = BOOTMOD_UNKNOWN;
 
diff --git a/xen/common/device-tree/bootinfo.c b/xen/common/device-tree/bootinfo.c
index 76d652c0de..717cfa0962 100644
--- a/xen/common/device-tree/bootinfo.c
+++ b/xen/common/device-tree/bootinfo.c
@@ -31,6 +31,7 @@ const char * __init boot_module_kind_as_string(bootmodule_kind kind)
     case BOOTMOD_RAMDISK: return "Ramdisk";
     case BOOTMOD_XSM:     return "XSM";
     case BOOTMOD_GUEST_DTB:     return "DTB";
+    case BOOTMOD_MICROCODE:     return "Microcode";
     case BOOTMOD_UNKNOWN: return "Unknown";
     default: BUG();
     }
diff --git a/xen/include/xen/bootfdt.h b/xen/include/xen/bootfdt.h
index 64db48f4fe..ff40f3078e 100644
--- a/xen/include/xen/bootfdt.h
+++ b/xen/include/xen/bootfdt.h
@@ -21,6 +21,7 @@ typedef enum {
     BOOTMOD_RAMDISK,
     BOOTMOD_XSM,
     BOOTMOD_GUEST_DTB,
+    BOOTMOD_MICROCODE,
     BOOTMOD_UNKNOWN
 }  bootmodule_kind;
 
-- 
2.43.0
Re: [PATCH v2 03/15] xen/dt: Add BOOTMOD_MICROCODE
Posted by Orzel, Michal 4 months, 3 weeks ago

On 05/06/2025 21:47, Alejandro Vallejo wrote:
> In preparation for x86 to start using bootmodule instead of boot_module
> 
> Signed-off-by: Alejandro Vallejo <agarciav@amd.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>

~Michal