hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/x86/boot/main.c
....@@ -1,17 +1,16 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* -*- linux-c -*- ------------------------------------------------------- *
23 *
34 * Copyright (C) 1991, 1992 Linus Torvalds
45 * Copyright 2007 rPath, Inc. - All Rights Reserved
56 * Copyright 2009 Intel Corporation; author H. Peter Anvin
67 *
7
- * This file is part of the Linux kernel, and is made available under
8
- * the terms of the GNU General Public License version 2.
9
- *
108 * ----------------------------------------------------------------------- */
119
1210 /*
1311 * Main module for the real-mode kernel code
1412 */
13
+#include <linux/build_bug.h>
1514
1615 #include "boot.h"
1716 #include "string.h"
....@@ -34,10 +33,10 @@
3433 u16 cl_offset;
3534 };
3635 const struct old_cmdline * const oldcmd =
37
- (const struct old_cmdline *)OLD_CL_ADDRESS;
36
+ absolute_pointer(OLD_CL_ADDRESS);
3837
39
- BUILD_BUG_ON(sizeof boot_params != 4096);
40
- memcpy(&boot_params.hdr, &hdr, sizeof hdr);
38
+ BUILD_BUG_ON(sizeof(boot_params) != 4096);
39
+ memcpy(&boot_params.hdr, &hdr, sizeof(hdr));
4140
4241 if (!boot_params.hdr.cmd_line_ptr &&
4342 oldcmd->cl_magic == OLD_CL_MAGIC) {