]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: image: Add new image type for x64_64
authorSimon Glass <sjg@chromium.org>
Fri, 10 Oct 2014 14:21:57 +0000 (08:21 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 29 Oct 2014 02:44:04 +0000 (20:44 -0600)
This is a bit odd in that we are permitted to boot images for either, even
though they are separate architectures.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/bootm.c
common/image-fit.c
common/image.c
include/image.h

index 81e32617c30c4f0a329e9f85dfaf85d142c334f8..6b3ea8c61b69c180e146cf5607a7780e2726f996 100644 (file)
@@ -167,7 +167,8 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc,
        }
 
        /* If we have a valid setup.bin, we will use that for entry (x86) */
-       if (images.os.arch == IH_ARCH_I386) {
+       if (images.os.arch == IH_ARCH_I386 ||
+           images.os.arch == IH_ARCH_X86_64) {
                ulong len;
 
                ret = boot_get_setup(&images, IH_ARCH_I386, &images.ep, &len);
index a272ea2e83456d9a50018ffb1752b0e2016ddcf7..4ffc5aaa512cd10528f176dda4f764a8fd85150d 100644 (file)
@@ -1114,7 +1114,8 @@ int fit_image_check_arch(const void *fit, int noffset, uint8_t arch)
 
        if (fit_image_get_arch(fit, noffset, &image_arch))
                return 0;
-       return (arch == image_arch);
+       return (arch == image_arch) ||
+               (arch == IH_ARCH_I386 && image_arch == IH_ARCH_X86_64);
 }
 
 /**
index eb92e6323c03e55ee3e0025a17641bed60b40a59..b75a5ce29a669b398c5c652282753a9ee28471ff 100644 (file)
@@ -85,6 +85,7 @@ static const table_entry_t uimage_arch[] = {
        {       IH_ARCH_SANDBOX,        "sandbox",      "Sandbox",      },
        {       IH_ARCH_ARM64,          "arm64",        "AArch64",      },
        {       IH_ARCH_ARC,            "arc",          "ARC",          },
+       {       IH_ARCH_X86_64,         "x86_64",       "AMD x86_64",   },
        {       -1,                     "",             "",             },
 };
 
index a13a30289f691819c849834a1584c77a438fdc1a..07e9aed16d95190b3cebe2f19dcb29ef15ab63b2 100644 (file)
@@ -173,6 +173,7 @@ struct lmb;
 #define IH_ARCH_OPENRISC        21     /* OpenRISC 1000  */
 #define IH_ARCH_ARM64          22      /* ARM64        */
 #define IH_ARCH_ARC            23      /* Synopsys DesignWare ARC */
+#define IH_ARCH_X86_64         24      /* AMD x86_64, Intel and Via */
 
 /*
  * Image Types