From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH v2 1/3] x86/boot: Early data should live in init.rodata
Date: Mon, 28 Apr 2014 14:06:42 +0100 [thread overview]
Message-ID: <1398690404-9559-2-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1398690404-9559-1-git-send-email-andrew.cooper3@citrix.com>
No real change as these were already in the init section, but does move it out
of a text section.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
---
v2: All data can live in init.rodata
Fix up some missing @progbits
Pad before gdt_boot_descr to align its long.
---
xen/arch/x86/boot/cmdline.S | 4 ++++
xen/arch/x86/boot/head.S | 14 +++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/xen/arch/x86/boot/cmdline.S b/xen/arch/x86/boot/cmdline.S
index e1f4595..00687eb 100644
--- a/xen/arch/x86/boot/cmdline.S
+++ b/xen/arch/x86/boot/cmdline.S
@@ -329,6 +329,8 @@ cmdline_parse_early:
popa
ret
+ .pushsection .init.rodata, "a", @progbits
+
.Lvga_text_modes: /* rows, mode_number */
.word 25,VIDEO_80x25
.word 50,VIDEO_80x50
@@ -361,3 +363,5 @@ cmdline_parse_early:
.asciz "no"
.Ledd_opt:
.asciz "edd"
+
+ .popsection
diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index 1777c17..0d87b27 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -32,11 +32,19 @@ ENTRY(start)
/* Checksum: must be the negated sum of the first two fields. */
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
- .section .init.text, "ax"
+ .section .init.rodata, "a", @progbits
+ .align 4
+
+ .word 0
+gdt_boot_descr:
+ .word 6*8-1
+ .long sym_phys(trampoline_gdt)
.Lbad_cpu_msg: .asciz "ERR: Not a 64-bit CPU!"
.Lbad_ldr_msg: .asciz "ERR: Not a Multiboot bootloader!"
+ .section .init.text, "ax", @progbits
+
bad_cpu:
mov $(sym_phys(.Lbad_cpu_msg)),%esi # Error message
jmp print_err
@@ -59,10 +67,6 @@ print_err:
stosb # Write an attribute to the VGA framebuffer
jmp 1b
-gdt_boot_descr:
- .word 6*8-1
- .long sym_phys(trampoline_gdt)
-
__start:
cld
cli
--
1.7.10.4
next prev parent reply other threads:[~2014-04-28 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 13:06 [PATCH v2 0/3] Improvements to x86 boot code Andrew Cooper
2014-04-28 13:06 ` Andrew Cooper [this message]
2014-04-28 13:06 ` [PATCH v2 2/3] x86/boot: Move some __high_start code and data into init sections Andrew Cooper
2014-04-28 14:04 ` Jan Beulich
2014-04-28 14:09 ` Andrew Cooper
2014-04-28 14:45 ` Jan Beulich
2014-04-28 14:49 ` Andrew Cooper
2014-04-28 14:55 ` [PATCH v3 " Andrew Cooper
2014-04-28 13:06 ` [PATCH v2 3/3] x86/boot: Use 'hlt' inside terminal loops Andrew Cooper
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=1398690404-9559-2-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.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).