[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] xen/arm: Add support for booting gzip compressed uImages



Hi Michal,

On 02/02/2023 08:49, Michal Orzel wrote:
@@ -265,11 +284,14 @@ static __init int kernel_decompress(struct bootmodule 
*mod)
  #define IH_ARCH_ARM             2       /* ARM          */
  #define IH_ARCH_ARM64           22      /* ARM64        */
+/* uImage Compression Types */
+#define IH_COMP_GZIP            1
+
  /*
   * Check if the image is a uImage and setup kernel_info
   */
  static int __init kernel_uimage_probe(struct kernel_info *info,
-                                      paddr_t addr, paddr_t size)
+                                      struct bootmodule *mod)
  {
      struct {
          __be32 magic;   /* Image Header Magic Number */
@@ -287,6 +309,8 @@ static int __init kernel_uimage_probe(struct kernel_info 
*info,
      } uimage;
uint32_t len;
+    paddr_t addr = mod->start;
+    paddr_t size = mod->size;
if ( size < sizeof(uimage) )
          return -EINVAL;

Shouldn't we return -ENOENT here?

The rest look good to me.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.