aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.rootkeys1
-rw-r--r--xen/arch/ia64/Makefile2
-rw-r--r--xen/arch/ia64/hpsimserial.c23
-rw-r--r--xen/arch/ia64/patch/linux-2.6.11/setup.c43
-rw-r--r--xen/arch/ia64/xensetup.c98
-rw-r--r--xen/include/asm-ia64/init.h2
6 files changed, 102 insertions, 67 deletions
diff --git a/.rootkeys b/.rootkeys
index a98c77a58f..81fc2bb5b5 100644
--- a/.rootkeys
+++ b/.rootkeys
@@ -1010,6 +1010,7 @@
421098b2PHgzf_Gg4R65YRNi_QzMKQ xen/arch/ia64/dom0_ops.c
421098b2O7jsNfzQXA1v3rbAc1QhpA xen/arch/ia64/dom_fw.c
421098b2ZlaBcyiuuPr3WpzaSDwg6Q xen/arch/ia64/domain.c
+42a08294zRikvZk_CR1iVojHjcVFZw xen/arch/ia64/hpsimserial.c
4239e98a_HX-FCIcXtVqY0BbrDqVug xen/arch/ia64/hypercall.c
4295e18f42gf1T-8W97A3KSlBaY1tA xen/arch/ia64/hyperprivop.S
421098b3LYAS8xJkQiGP7tiTlyBt0Q xen/arch/ia64/idle0_task.c
diff --git a/xen/arch/ia64/Makefile b/xen/arch/ia64/Makefile
index 568cbe5957..3e997229b0 100644
--- a/xen/arch/ia64/Makefile
+++ b/xen/arch/ia64/Makefile
@@ -4,7 +4,7 @@ include $(BASEDIR)/Rules.mk
OBJS = xensetup.o setup.o time.o irq.o ia64_ksyms.o process.o smp.o \
xenmisc.o pdb-stub.o acpi.o hypercall.o \
- machvec.o dom0_ops.o domain.o \
+ machvec.o dom0_ops.o domain.o hpsimserial.o \
idle0_task.o pal.o hpsim.o efi.o efi_stub.o ivt.o mm_contig.o \
xenmem.o sal.o cmdline.o mm_init.o tlb.o smpboot.o \
extable.o linuxextable.o xenirq.o xentime.o \
diff --git a/xen/arch/ia64/hpsimserial.c b/xen/arch/ia64/hpsimserial.c
new file mode 100644
index 0000000000..3e87aa3332
--- /dev/null
+++ b/xen/arch/ia64/hpsimserial.c
@@ -0,0 +1,23 @@
+/*
+ * HP Ski simulator serial I/O
+ *
+ * Copyright (C) 2004 Hewlett-Packard Co
+ * Dan Magenheimer <dan.magenheimer@hp.com>
+ */
+
+#include <linux/config.h>
+#include <xen/sched.h>
+#include <xen/serial.h>
+#include <asm/hpsim_ssc.h>
+
+static void hp_ski_putc(struct serial_port *port, char c)
+{
+ ia64_ssc(c,0,0,0,SSC_PUTCHAR);
+}
+
+static struct uart_driver hp_ski = { .putc = hp_ski_putc };
+
+void hpsim_serial_init(void)
+{
+ serial_register_uart(0, &hp_ski, 0);
+}
diff --git a/xen/arch/ia64/patch/linux-2.6.11/setup.c b/xen/arch/ia64/patch/linux-2.6.11/setup.c
index e7bc927d7d..2fea5662fd 100644
--- a/xen/arch/ia64/patch/linux-2.6.11/setup.c
+++ b/xen/arch/ia64/patch/linux-2.6.11/setup.c
@@ -1,5 +1,5 @@
---- /home/adsharma/disk2/xen-ia64/xeno-unstable-rebase.bk/xen/../../linux-2.6.11/arch/ia64/kernel/setup.c 2005-03-01 23:37:49.000000000 -0800
-+++ /home/adsharma/disk2/xen-ia64/xeno-unstable-rebase.bk/xen/arch/ia64/setup.c 2005-05-18 12:40:50.000000000 -0700
+--- ../../linux-2.6.11/arch/ia64/kernel/setup.c 2005-03-02 00:37:49.000000000 -0700
++++ arch/ia64/setup.c 2005-06-03 10:14:24.000000000 -0600
@@ -51,6 +51,10 @@
#include <asm/smp.h>
#include <asm/system.h>
@@ -11,7 +11,7 @@
#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
# error "struct cpuinfo_ia64 too big!"
-@@ -127,7 +130,16 @@
+@@ -127,7 +131,16 @@
range_end = min(end, rsvd_region[i].start);
if (range_start < range_end)
@@ -28,7 +28,7 @@
/* nothing more available in this segment */
if (range_end == end) return 0;
-@@ -185,7 +197,12 @@
+@@ -185,7 +198,12 @@
n++;
rsvd_region[n].start = (unsigned long) ia64_imva((void *)KERNEL_START);
@@ -41,7 +41,7 @@
n++;
#ifdef CONFIG_BLK_DEV_INITRD
-@@ -299,7 +316,11 @@
+@@ -299,17 +317,25 @@
}
void __init
@@ -53,22 +53,33 @@
{
unw_init();
-@@ -308,8 +329,14 @@
+ ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
+
*cmdline_p = __va(ia64_boot_param->command_line);
++#ifdef XEN
++ efi_init();
++#else
strlcpy(saved_command_line, *cmdline_p, COMMAND_LINE_SIZE);
-+#ifdef XEN
-+ cmdline_parse(*cmdline_p);
-+#undef CONFIG_ACPI_BOOT
-+#endif
efi_init();
-+#ifndef XEN
io_port_init();
+#endif
#ifdef CONFIG_IA64_GENERIC
{
-@@ -351,8 +378,18 @@
+@@ -336,6 +362,11 @@
+ }
+ #endif
+
++#ifdef XEN
++ early_cmdline_parse(cmdline_p);
++ cmdline_parse(*cmdline_p);
++#undef CONFIG_ACPI_BOOT
++#endif
+ if (early_console_setup(*cmdline_p) == 0)
+ mark_bsp_online();
+
+@@ -351,8 +382,18 @@
# endif
#endif /* CONFIG_APCI_BOOT */
@@ -87,7 +98,7 @@
/* process SAL system table: */
ia64_sal_init(efi.sal_systab);
-@@ -360,6 +397,10 @@
+@@ -360,6 +401,10 @@
cpu_physical_id(0) = hard_smp_processor_id();
#endif
@@ -98,7 +109,7 @@
cpu_init(); /* initialize the bootstrap CPU */
#ifdef CONFIG_ACPI_BOOT
-@@ -492,12 +533,14 @@
+@@ -492,12 +537,14 @@
{
}
@@ -113,7 +124,7 @@
void
identify_cpu (struct cpuinfo_ia64 *c)
-@@ -551,6 +594,12 @@
+@@ -551,6 +598,12 @@
}
c->unimpl_va_mask = ~((7L<<61) | ((1L << (impl_va_msb + 1)) - 1));
c->unimpl_pa_mask = ~((1L<<63) | ((1L << phys_addr_size) - 1));
@@ -126,7 +137,7 @@
}
void
-@@ -659,7 +708,11 @@
+@@ -659,7 +712,11 @@
| IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
atomic_inc(&init_mm.mm_count);
current->active_mm = &init_mm;
diff --git a/xen/arch/ia64/xensetup.c b/xen/arch/ia64/xensetup.c
index cb65ff67a2..162fe145e9 100644
--- a/xen/arch/ia64/xensetup.c
+++ b/xen/arch/ia64/xensetup.c
@@ -19,6 +19,7 @@
#include <asm/meminit.h>
#include <asm/page.h>
#include <asm/setup.h>
+#include <xen/string.h>
unsigned long xenheap_phys_end;
@@ -35,39 +36,18 @@ extern unsigned long domain0_ready;
int find_max_pfn (unsigned long, unsigned long, void *);
void start_of_day(void);
-/* opt_console: comma-separated list of console outputs. */
-#ifdef IA64
-unsigned char opt_console[30] = "com1";
-#else
-unsigned char opt_console[30] = "com1,vga";
-#endif
-/* opt_conswitch: a character pair controlling console switching. */
-/* Char 1: CTRL+<char1> is used to switch console input between Xen and DOM0 */
-/* Char 2: If this character is 'x', then do not auto-switch to DOM0 when it */
-/* boots. Any other value, or omitting the char, enables auto-switch */
-unsigned char opt_conswitch[5] = "a"; /* NB. '`' would disable switching. */
-/* opt_com[12]: Config serial port with a string <baud>,DPS,<io-base>,<irq>. */
-unsigned char opt_com1[30] = "", opt_com2[30] = "";
-/* opt_dom0_mem: Kilobytes of memory allocated to domain 0. */
-unsigned int opt_dom0_mem = 16000;
/* opt_noht: If true, Hyperthreading is ignored. */
-int opt_noht=0;
+int opt_noht = 0;
+boolean_param("noht", opt_noht);
+
/* opt_nosmp: If true, secondary processors are ignored. */
-int opt_nosmp=0;
-/* opt_noreboot: If true, machine will need manual reset on error. */
-int opt_noreboot=0;
-/* opt_watchdog: If true, run a watchdog NMI on each processor. */
-int opt_watchdog=0;
-/* opt_pdb: Name of serial port for Xen pervasive debugger (and enable pdb) */
-unsigned char opt_pdb[10] = "none";
-/* opt_tbuf_size: trace buffer size (in pages) */
-unsigned int opt_tbuf_size = 10;
-/* opt_sched: scheduler - default to Borrowed Virtual Time */
-char opt_sched[10] = "bvt";
-/* opt_leveltrigger, opt_edgetrigger: Force an IO-APIC-routed IRQ to be */
-/* level- or edge-triggered. */
-/* Example: 'leveltrigger=4,5,6,20 edgetrigger=21'. */
-char opt_leveltrigger[30] = "", opt_edgetrigger[30] = "";
+static int opt_nosmp = 0;
+boolean_param("nosmp", opt_nosmp);
+
+/* maxcpus: maximum number of CPUs to activate. */
+static unsigned int max_cpus = NR_CPUS;
+integer_param("maxcpus", max_cpus);
+
/*
* opt_xenheap_megabytes: Size of Xen heap in megabytes, including:
* xen image
@@ -80,23 +60,6 @@ char opt_leveltrigger[30] = "", opt_edgetrigger[30] = "";
*/
unsigned int opt_xenheap_megabytes = XENHEAP_DEFAULT_MB;
unsigned long xenheap_size = XENHEAP_DEFAULT_SIZE;
-/*
- * opt_nmi: one of 'ignore', 'dom0', or 'fatal'.
- * fatal: Xen prints diagnostic message and then hangs.
- * dom0: The NMI is virtualised to DOM0.
- * ignore: The NMI error is cleared and ignored.
- */
-#ifdef NDEBUG
-char opt_nmi[10] = "dom0";
-#else
-char opt_nmi[10] = "fatal";
-#endif
-/*
- * Comma-separated list of hexadecimal page numbers containing bad bytes.
- * e.g. 'badpage=0x3f45,0x8a321'.
- */
-char opt_badpage[100] = "";
-
extern long running_on_sim;
unsigned long xen_pstart;
@@ -133,6 +96,42 @@ static void __init do_initcalls(void)
(*call)();
}
+/*
+ * IPF loader only supports one commaind line currently, for
+ * both xen and guest kernel. This function provides pre-parse
+ * to mixed command line, to split it into two parts.
+ *
+ * User should split the parameters by "--", with strings after
+ * spliter for guest kernel. Missing "--" means whole line belongs
+ * to guest. Example:
+ * "com2=57600,8n1 console=com2 -- console=ttyS1 console=tty
+ * root=/dev/sda3 ro"
+ */
+void early_cmdline_parse(char **cmdline_p)
+{
+ char *guest_cmd;
+ char *split = "--";
+
+ if (*cmdline_p == NULL) {
+ saved_command_line[0] = '\0';
+ return;
+ }
+
+ guest_cmd = strstr(*cmdline_p, split);
+ /* If no spliter, whole line is for guest */
+ if (guest_cmd == NULL) {
+ guest_cmd = *cmdline_p;
+ *cmdline_p = NULL;
+ } else {
+ *guest_cmd = '\0'; /* Split boot parameters for xen and guest */
+ guest_cmd += strlen(split);
+ while (*guest_cmd == ' ') guest_cmd++;
+ }
+
+ strlcpy(saved_command_line, guest_cmd, COMMAND_LINE_SIZE);
+ return;
+}
+
void start_kernel(void)
{
unsigned char *cmdline;
@@ -154,7 +153,8 @@ void start_kernel(void)
early_setup_arch(&cmdline);
/* We initialise the serial devices very early so we can get debugging. */
- ns16550_init();
+ if (running_on_sim) hpsim_serial_init();
+ else ns16550_init();
serial_init_preirq();
init_console();
diff --git a/xen/include/asm-ia64/init.h b/xen/include/asm-ia64/init.h
index e828ab6d85..7e5df20da6 100644
--- a/xen/include/asm-ia64/init.h
+++ b/xen/include/asm-ia64/init.h
@@ -14,7 +14,7 @@
#define __exitdata \
__attribute_used__ __attribute__ ((__section__ (".data.exit")))
#define __initsetup \
- __attribute_used__ __attribute__ ((__section__ (".setup.init")))
+ __attribute_used__ __attribute__ ((__section__ (".init.setup")))
#define __init_call \
__attribute_used__ __attribute__ ((__section__ (".initcall1.init")))
#define __exit_call \