From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>,
Waldemar Brodkorb <mail@waldemar-brodkorb.de>
Subject: [Qemu-devel] [PATCH 4/9] hw/xtensa/xtfpga: use symbolic constants for bootparam tags
Date: Mon, 23 Jun 2014 20:12:51 +0400 [thread overview]
Message-ID: <1403539976-22581-5-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1403539976-22581-1-git-send-email-jcmvbkbc@gmail.com>
Import bootparam tag names from linux/arch/xtensa/include/asm/bootparam.h
No functional changes.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
hw/xtensa/bootparam.h | 10 ++++++++++
hw/xtensa/xtfpga.c | 6 +++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/hw/xtensa/bootparam.h b/hw/xtensa/bootparam.h
index 38ef32b..e6cf3b1 100644
--- a/hw/xtensa/bootparam.h
+++ b/hw/xtensa/bootparam.h
@@ -1,6 +1,16 @@
#ifndef HW_XTENSA_BOOTPARAM
#define HW_XTENSA_BOOTPARAM
+#define BP_TAG_COMMAND_LINE 0x1001 /* command line (0-terminated string)*/
+#define BP_TAG_INITRD 0x1002 /* ramdisk addr and size (bp_meminfo) */
+#define BP_TAG_MEMORY 0x1003 /* memory addr and size (bp_meminfo) */
+#define BP_TAG_SERIAL_BAUDRATE 0x1004 /* baud rate of current console. */
+#define BP_TAG_SERIAL_PORT 0x1005 /* serial device of current console */
+#define BP_TAG_FDT 0x1006 /* flat device tree addr */
+
+#define BP_TAG_FIRST 0x7B0B /* first tag with a version number */
+#define BP_TAG_LAST 0x7E0B /* last tag */
+
typedef struct BpTag {
uint16_t tag;
uint16_t size;
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 0aa3eeb..6d070b0 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -250,12 +250,12 @@ static void lx_init(const LxBoardDesc *board, MachineState *machine)
env->regs[2] = tagptr;
- tagptr = put_tag(tagptr, 0x7b0b, 0, NULL);
+ tagptr = put_tag(tagptr, BP_TAG_FIRST, 0, NULL);
if (cmdline_size > 1) {
- tagptr = put_tag(tagptr, 0x1001,
+ tagptr = put_tag(tagptr, BP_TAG_COMMAND_LINE,
cmdline_size, kernel_cmdline);
}
- tagptr = put_tag(tagptr, 0x7e0b, 0, NULL);
+ tagptr = put_tag(tagptr, BP_TAG_LAST, 0, NULL);
}
uint64_t elf_entry;
uint64_t elf_lowaddr;
--
1.8.1.4
next prev parent reply other threads:[~2014-06-23 16:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 16:12 [Qemu-devel] [PATCH 0/9] target-xtensa: linux booting improvements Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 1/9] hw/xtensa: remove extraneous xtensa_ prefix from file names Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 2/9] hw/xtensa: replace fprintfs with error_report Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 3/9] hw/xtensa/xtfpga: retrieve parameters from machine_opts Max Filippov
2014-06-23 16:12 ` Max Filippov [this message]
2014-06-23 16:12 ` [Qemu-devel] [PATCH 5/9] hw/xtensa/xtfpga: refactor bootparameters filling Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 6/9] hw/xtensa/xtfpga: add memory info to bootparam Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 7/9] hw/xtensa/xtfpga: implement uImage loading Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 8/9] hw/xtensa/xtfpga: implement DTB loading Max Filippov
2014-06-23 16:12 ` [Qemu-devel] [PATCH 9/9] hw/xtensa/xtfpga: implement initrd loading Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403539976-22581-5-git-send-email-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=mail@waldemar-brodkorb.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).