From patchwork Thu Feb 1 18:18:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 126567 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1951825ljc; Thu, 1 Feb 2018 10:21:44 -0800 (PST) X-Google-Smtp-Source: AH8x226rSY49mgtQaYCwAxet7B8XHYHa+MpBzfbFOtRwlNwIzKM9Bxbw7NalBlZIeqfL2NU0XODl X-Received: by 10.37.102.76 with SMTP id z12mr8521356ybm.86.1517509304270; Thu, 01 Feb 2018 10:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517509304; cv=none; d=google.com; s=arc-20160816; b=RU978s4CPB67y2IUTFrOXCnsbgbry2xmbBjFq2SsmSz5YdixtnKwgCIXKDxss4zies WmJOMp2ZmxNCgR26PCy4uhbRN3aUVMRHEijnfR0ChOMwi7DdHfDoc7pmsAjqq4l4Mbl/ /JiD0PTWc4zaBfnAhGu8cQgURMltGpxIsUMgdMjz6s/7vgycC+1FJpgGiFCKHsIOrE5h dxklH2xAvagh5ifPIkvov6oHwVvRX6fCW5/s0/d0urFhAbBf5lWXC4loUbzowfp0Vdl0 K5mSKT0lKrRi1Lt4FsB07KL2ldgglzZrxyV5OMWFslD9AOMyfW8nvSZcg9H+5Xf+TPM5 m+tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:arc-authentication-results; bh=Zq23JpxbJVT93z21CPQf+ORBTM8KRTVSM3STUs5Cp6E=; b=vUEeKudnrpDbY9gBcjSinqQL2YRyrQ+UPXOwTcQhNI8FHs6ULlBltAbrpRn7Yy/MqI EDJVb1TLnjXTZrxzp4Vt40Og4f1GKWK0JcnUtS8MTvli66v6XBu4z5EV0dcZfs+pBFGZ 3L8gzikfEXdmnM9OhOvGLhTbBbpDP/TmnjdZaV7LZC2Ub18p+cBOMjxP0tVMNMROVGQR 5k1A2nBpc82VP7+2ZgZ4xoyg+Q3nG5TZglhHFXVp+6SeDPfWgowtZ/Dl1WbFYiutKkiU VMizdVKC/lal+HcjgKLVre6PpTTIyljBqKFyTiajcx3r571Jds3yz4Re2H2Riwji7B6i YdLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=N05r+thx; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t83si30835ywb.721.2018.02.01.10.21.44 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 01 Feb 2018 10:21:44 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=N05r+thx; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=grub-devel-bounces+patch=linaro.org@gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehJUV-0004up-K8 for patch@linaro.org; Thu, 01 Feb 2018 13:21:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehJS1-0003nb-OO for grub-devel@gnu.org; Thu, 01 Feb 2018 13:19:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehJS0-0003QF-MK for grub-devel@gnu.org; Thu, 01 Feb 2018 13:19:09 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:40645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehJS0-0003NW-Fa for grub-devel@gnu.org; Thu, 01 Feb 2018 13:19:08 -0500 Received: by mail-wm0-x243.google.com with SMTP id v123so7515512wmd.5 for ; Thu, 01 Feb 2018 10:19:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=58d3AvtE8zlfZWwP1YiJo0ISwxHdMb+CboCO4Y5rEko=; b=N05r+thxlOo9HQYdbrccdCI5rWNzMAGKa+BRUy+PDz6K0qLLaUsYOKEMMIBz8qKoao 4WUBNWmRFU6kMqlWSd4LbxIQavECUlxPsrkzBzun1XYtkuBwNY7w60sm9NxzbgoKuHnB ZYmb/AbeEj/uX3B5S1kQK1r3HMlxotI0x9C1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=58d3AvtE8zlfZWwP1YiJo0ISwxHdMb+CboCO4Y5rEko=; b=t3Btks1UgTeKKeo3E33liM89TCsfctnxbSl+PVB/HV6mBXX5Y0fGYaR0nzHRB/mTcB uRehTPG3UFLQEgbS8CsiSrYQicP1XUOnGvrUw3mjsn92J9z90AZXz0O2OlL/NJlU6kuc WDPuY3vujM2P7RIsyQdOJODAT58MClhx3O4kTmYNt8H9h3l2cx8DOnm3lkaaWsdzxqNZ LcXHdMPs5IiWjwF5oW1Swt45v6SXqwhf+FtQ2OJJa/gD0AWy5xgyjTnugUnNKU6NBEtK ZfejHQ6W35VBBYgCEaK8JEdsQow7O1TNvcRhzjAAKngzbj+NTTAFDgu7Cwj0vadgmPnC NdOg== X-Gm-Message-State: AKwxyte6rpP1xPMOXiZ6n1qFoNBwIm42mCDE1/87yjyNW6KoWSEOsV/m sT1xk7+0XoyXRHFb7azuDsLE96JJhlc= X-Received: by 10.28.62.203 with SMTP id l194mr26344385wma.121.1517509147196; Thu, 01 Feb 2018 10:19:07 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92316-cmbg19-2-0-cust118.5-4.cable.virginm.net. [82.12.0.119]) by smtp.gmail.com with ESMTPSA id b11sm163911wrf.23.2018.02.01.10.19.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 10:19:06 -0800 (PST) From: Leif Lindholm To: grub-devel@gnu.org Subject: [PATCH 04/10] i386: make struct linux_kernel_header architecture specific Date: Thu, 1 Feb 2018 18:18:52 +0000 Message-Id: <20180201181858.1472-5-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180201181858.1472-1-leif.lindholm@linaro.org> References: <20180201181858.1472-1-leif.lindholm@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Cc: Daniel Kiper MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" struct linux_kernel_header -> struct linux_i386_kernel_header Signed-off-by: Leif Lindholm --- grub-core/commands/file.c | 2 +- grub-core/loader/i386/linux.c | 2 +- grub-core/loader/i386/pc/linux.c | 6 +++--- grub-core/loader/i386/xen_file.c | 2 +- include/grub/i386/linux.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- 2.11.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel Reviewed-by: Daniel Kiper diff --git a/grub-core/commands/file.c b/grub-core/commands/file.c index 474666d3a..63c84499b 100644 --- a/grub-core/commands/file.c +++ b/grub-core/commands/file.c @@ -497,7 +497,7 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args) case IS_X86_LINUX32: case IS_X86_LINUX: { - struct linux_kernel_header lh; + struct linux_i386_kernel_header lh; if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh)) break; if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55)) diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c index 9bd5afb65..44301e126 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -678,7 +678,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[]) { grub_file_t file = 0; - struct linux_kernel_header lh; + struct linux_i386_kernel_header lh; grub_uint8_t setup_sects; grub_size_t real_size, prot_size, prot_file_size; grub_ssize_t len; diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c index 31a687644..b69cb7a3a 100644 --- a/grub-core/loader/i386/pc/linux.c +++ b/grub-core/loader/i386/pc/linux.c @@ -121,7 +121,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[]) { grub_file_t file = 0; - struct linux_kernel_header lh; + struct linux_i386_kernel_header lh; grub_uint8_t setup_sects; grub_size_t real_size; grub_ssize_t len; @@ -387,7 +387,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), { grub_size_t size = 0; grub_addr_t addr_max, addr_min; - struct linux_kernel_header *lh; + struct linux_i386_kernel_header *lh; grub_uint8_t *initrd_chunk; grub_addr_t initrd_addr; grub_err_t err; @@ -405,7 +405,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), goto fail; } - lh = (struct linux_kernel_header *) grub_linux_real_chunk; + lh = (struct linux_i386_kernel_header *) grub_linux_real_chunk; if (!(lh->header == grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE) && grub_le_to_cpu16 (lh->version) >= 0x0200)) diff --git a/grub-core/loader/i386/xen_file.c b/grub-core/loader/i386/xen_file.c index 6e76e16aa..77a93e7b2 100644 --- a/grub-core/loader/i386/xen_file.c +++ b/grub-core/loader/i386/xen_file.c @@ -26,7 +26,7 @@ grub_elf_t grub_xen_file (grub_file_t file) { grub_elf_t elf; - struct linux_kernel_header lh; + struct linux_i386_kernel_header lh; grub_file_t off_file; grub_uint32_t payload_offset, payload_length; grub_uint8_t magic[6]; diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h index 3ff432be9..0bd758817 100644 --- a/include/grub/i386/linux.h +++ b/include/grub/i386/linux.h @@ -85,7 +85,7 @@ enum }; /* For the Linux/i386 boot protocol version 2.10. */ -struct linux_kernel_header +struct linux_i386_kernel_header { grub_uint8_t code1[0x0020]; grub_uint16_t cl_magic; /* Magic number 0xA33F */