From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1is6HI-0000O2-0X for mharc-grub-devel@gnu.org; Thu, 16 Jan 2020 09:37:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46528) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is2Mk-0003Op-4G for grub-devel@gnu.org; Thu, 16 Jan 2020 05:27:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is2Mi-0007jo-5P for grub-devel@gnu.org; Thu, 16 Jan 2020 05:27:05 -0500 Received: from m4a0073g.houston.softwaregrp.com ([15.124.2.131]:32892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1is2Mh-0007bH-VJ for grub-devel@gnu.org; Thu, 16 Jan 2020 05:27:04 -0500 Received: FROM m4a0073g.houston.softwaregrp.com (15.120.17.146) BY m4a0073g.houston.softwaregrp.com WITH ESMTP; Thu, 16 Jan 2020 10:24:32 +0000 Received: from M9W0067.microfocus.com (2002:f79:be::f79:be) by M4W0334.microfocus.com (2002:f78:1192::f78:1192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 16 Jan 2020 10:21:44 +0000 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (15.124.72.12) by M9W0067.microfocus.com (15.121.0.190) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Thu, 16 Jan 2020 10:21:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A4hKdN39TsC+A1mEhIujJ2F9+jhPafHQI8fefJHg5ER8A3mNDUEH/fZHRWIvd37RsNKgD4tqSj03caCt9rdeE2K6eWCIFvO4RcN1lVsDsFVYZ9WZxuXEBMTkIcMUY3Rfm3MNY9lIeAvPBY/jsmOwxqE67ZZ1+0m0sDE7E4YIhD2Qo722JRW+YUFGkTvfS8bS6xzs88rbjtqIHdONOjbI0d8UxTUmTFaA6wd2YCwuMOGiplIXoPJwZUHn2eveqZ9gLUNXKBhj/4OFwto/06Aacd3mEDTfdrBjxo3GLcO0GRpiMfuZDs6d/W5WykumeM44ARvPXye/JT3CcHPQzOBWQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Dtt894wB5B/6W3PEUPMYpv594IdaZKW0h1bioqNRi5M=; b=gb6v+tZWnGS1xNuxnlwj209Y8wYrovkFoHpbfW6xUT+H9sN890sFVeJIZ35sxu7eb9Dy178mjDBFA3lnEmDZg0U5HTZhLA+rdrW/AzPbxFZzlL9nVAiy2NXg6PrXJLU9ODYdMMr1aoTHHLDnNHXvWkmWOLXZpRyb/l9ui7i4DOuunlw87T749MfA6kZ7tK5/aQ+t7lWGr3Im+BbY8iGxhZ2PaipokUv1HbA+O+VgLFVuw4xlPfuHCn2mfLLE1+djFXtwWmhdO60ROySfAIn2dRrG2W7NwpZv3IZAedX9RSN+vCDu7bHd7BpngOXcTKk3hlVwaM3ROxFVDxJz06GZ/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from SN1PR18MB2126.namprd18.prod.outlook.com (52.132.196.157) by SN1PR18MB2254.namprd18.prod.outlook.com (52.132.200.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2644.20; Thu, 16 Jan 2020 10:21:43 +0000 Received: from SN1PR18MB2126.namprd18.prod.outlook.com ([fe80::68a8:34cd:7c1c:f49d]) by SN1PR18MB2126.namprd18.prod.outlook.com ([fe80::68a8:34cd:7c1c:f49d%3]) with mapi id 15.20.2644.015; Thu, 16 Jan 2020 10:21:43 +0000 Received: from localhost.localdomain (60.251.47.115) by HK2P15301CA0006.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.0 via Frontend Transport; Thu, 16 Jan 2020 10:21:41 +0000 From: Chester Lin To: "grub-devel@gnu.org" CC: "agraf@csgraf.de" , "daniel.kiper@oracle.com" , "alistair.francis@wdc.com" , Chester Lin Subject: [PATCH 1/2] RISC-V: Correct linux headers' definitions Thread-Topic: [PATCH 1/2] RISC-V: Correct linux headers' definitions Thread-Index: AQHVzFa/FKnZIGczSUyt+goHb/27Ig== Date: Thu, 16 Jan 2020 10:21:43 +0000 Message-ID: <20200116102106.25136-2-clin@suse.com> References: <20200116102106.25136-1-clin@suse.com> In-Reply-To: <20200116102106.25136-1-clin@suse.com> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2P15301CA0006.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::16) To SN1PR18MB2126.namprd18.prod.outlook.com (2603:10b6:802:29::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=clin@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.24.0 x-originating-ip: [60.251.47.115] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4ff1abab-2fa0-46cb-c58c-08d79a6de202 x-ms-traffictypediagnostic: SN1PR18MB2254: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3631; x-forefront-prvs: 02843AA9E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(376002)(396003)(39860400002)(136003)(346002)(366004)(189003)(199004)(6506007)(86362001)(69590400006)(6486002)(6916009)(6512007)(71200400001)(966005)(5660300002)(8676002)(2616005)(81156014)(54906003)(8936002)(55236004)(956004)(316002)(81166006)(16526019)(186003)(1076003)(107886003)(66446008)(64756008)(66556008)(66476007)(66946007)(26005)(478600001)(52116002)(4326008)(2906002)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:SN1PR18MB2254; H:SN1PR18MB2126.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iB6bh7pMgzOrT21GSV6bviasOTotGat8C7Isfs3rJC09RkyMQ04uAM4CS/mHUxGvBbZVq3XdKbglXj84IwRKjny/e3+DR6nJxtOBMsPds+cGd2EKqwEPAScb+spsUIuxijxs4Dl7+7wVmftqxgkWDfzIbPjT7ZW0IFT3QB3aIv4Ljj6EBUKkHatvOQQ734ol3edxqw6ga1kW0trDZZVq+LuqyxfPSXn77Ptx5ohkNIZt4u5SEXbJfvf9/McYca40yLumU4uP7RVkkykYOtoKxqWDWA4tj52tmfm+UGz7KJfVNM4BgxJQp4saKSpeks1vESse4H/6FPo7FdXssf1sb3JJ3OPEGg/NgPNYMPAarPSsZiX3sN+t4bxvdptqoItQP68L/Ip58WBPIuaA4eeJmoiyoxoaOqWIhOazx5ZXM+W9YTf16ZecZE/EV76cj55tJLa+zmB2mNhMhRqgsr156NbaJnuOsIqfgE2XmTE1ExsyXQjlKxaKXtKAunPZYJ3OaUYBvFEDrZtNfl5dwyVNoNFouT0p/sXN0DjpO6XzlgpL188fW3UvcelKWMIUbXbJ4f4RDNKHd9WSTTK+BqDBRQ== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4ff1abab-2fa0-46cb-c58c-08d79a6de202 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2020 10:21:43.1628 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: mA7XzyqsV+sM7zehQ4NKIlZ8yujP7uyfWa1ltNqSDX4GEPqSFx/+qm29KRwj/6Et X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR18MB2254 X-OriginatorOrg: suse.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 15.124.2.131 X-Mailman-Approved-At: Thu, 16 Jan 2020 09:37:41 -0500 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jan 2020 10:27:07 -0000 Adjust the image hedaers based on the current definition in RISC-V LINUX. Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.g= it/tree/arch/riscv/include/asm/image.h Signed-off-by: Chester Lin --- include/grub/riscv32/linux.h | 4 ++-- include/grub/riscv64/linux.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/grub/riscv32/linux.h b/include/grub/riscv32/linux.h index 512b777c8..4bb831e52 100644 --- a/include/grub/riscv32/linux.h +++ b/include/grub/riscv32/linux.h @@ -19,7 +19,7 @@ #ifndef GRUB_RISCV32_LINUX_HEADER #define GRUB_RISCV32_LINUX_HEADER 1 =20 -#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x52534356 /* 'RSCV' */ +#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x05435352 /* 'RSC\x5' */ =20 /* From linux/Documentation/riscv/booting.txt */ struct linux_riscv_kernel_header @@ -32,7 +32,7 @@ struct linux_riscv_kernel_header grub_uint64_t res2; /* reserved */ grub_uint64_t res3; /* reserved */ grub_uint64_t res4; /* reserved */ - grub_uint32_t magic; /* Magic number, little endian, "RSCV" */ + grub_uint32_t magic; /* Magic number, little endian, "RSC\x05" */ grub_uint32_t hdr_offset; /* Offset of PE/COFF header */ }; =20 diff --git a/include/grub/riscv64/linux.h b/include/grub/riscv64/linux.h index 3630c30fb..e4676cf5f 100644 --- a/include/grub/riscv64/linux.h +++ b/include/grub/riscv64/linux.h @@ -19,7 +19,7 @@ #ifndef GRUB_RISCV64_LINUX_HEADER #define GRUB_RISCV64_LINUX_HEADER 1 =20 -#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x52534356 /* 'RSCV' */ +#define GRUB_LINUX_RISCV_MAGIC_SIGNATURE 0x05435352 /* 'RSC\x5' */ =20 #define GRUB_EFI_PE_MAGIC 0x5A4D =20 @@ -32,9 +32,9 @@ struct linux_riscv_kernel_header grub_uint64_t res0; /* reserved */ grub_uint64_t res1; /* reserved */ grub_uint64_t res2; /* reserved */ - grub_uint64_t res3; /* reserved */ + grub_uint64_t res3; /* reserved */ grub_uint64_t res4; /* reserved */ - grub_uint32_t magic; /* Magic number, little endian, "RSCV" */ + grub_uint32_t magic; /* Magic number, little endian, "RSC\x05" */ grub_uint32_t hdr_offset; /* Offset of PE/COFF header */ }; =20 --=20 2.24.0