Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Add xbd to the list of valid disks.
details: https://anonhg.NetBSD.org/src/rev/77c26c7ec236
branches: trunk
changeset: 1009611:77c26c7ec236
user: bouyer <bouyer%NetBSD.org@localhost>
date: Tue Apr 28 15:43:34 2020 +0000
description:
Add xbd to the list of valid disks.
Remove hardcoded root on xbd0 for Xen PVHVM, now that the x86 findroot()
knowns about xbd disks.
diffstat:
sys/arch/x86/x86/x86_autoconf.c | 5 +++--
sys/arch/xen/xen/hypervisor.c | 39 ++-------------------------------------
2 files changed, 5 insertions(+), 39 deletions(-)
diffs (86 lines):
diff -r 0bf7932e0b3e -r 77c26c7ec236 sys/arch/x86/x86/x86_autoconf.c
--- a/sys/arch/x86/x86/x86_autoconf.c Tue Apr 28 15:12:28 2020 +0000
+++ b/sys/arch/x86/x86/x86_autoconf.c Tue Apr 28 15:43:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_autoconf.c,v 1.80 2020/04/25 15:26:18 bouyer Exp $ */
+/* $NetBSD: x86_autoconf.c,v 1.81 2020/04/28 15:43:34 bouyer Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.80 2020/04/25 15:26:18 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.81 2020/04/28 15:43:34 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -99,6 +99,7 @@
device_is_a(dv, "sd") ||
device_is_a(dv, "wd") ||
device_is_a(dv, "ld") ||
+ device_is_a(dv, "xbd") ||
device_is_a(dv, "ed"));
}
diff -r 0bf7932e0b3e -r 77c26c7ec236 sys/arch/xen/xen/hypervisor.c
--- a/sys/arch/xen/xen/hypervisor.c Tue Apr 28 15:12:28 2020 +0000
+++ b/sys/arch/xen/xen/hypervisor.c Tue Apr 28 15:43:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.77 2020/04/28 13:27:29 bouyer Exp $ */
+/* $NetBSD: hypervisor.c,v 1.78 2020/04/28 15:43:34 bouyer Exp $ */
/*
* Copyright (c) 2005 Manuel Bouyer.
@@ -53,7 +53,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.77 2020/04/28 13:27:29 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.78 2020/04/28 15:43:34 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -499,41 +499,6 @@
const struct sysctlnode *node = NULL;
#ifdef XENPVHVM
- /*
- * Set the boot device to xbd0a.
- * We claim this is a reasonable default which is picked up
- * later as the rootfs device.
- *
- * We need to do this because the HVM domain loader uses the
- * regular BIOS based native boot(8) procedure, which sets the
- * boot device to the native driver/partition of whatever was
- * detected by the native bootloader.
- */
-
- struct btinfo_rootdevice bi;
- snprintf(bi.devname, 6, "xbd0a");
- bi.common.type = BTINFO_ROOTDEVICE;
- bi.common.len = sizeof(struct btinfo_rootdevice);
-
- /* From i386/multiboot.c */
- int i, len;
- vaddr_t data;
- extern struct bootinfo bootinfo;
- struct bootinfo *bip = (struct bootinfo *)&bootinfo;
- len = bi.common.len;
-
- data = (vaddr_t)&bip->bi_data;
- for (i = 0; i < bip->bi_nentries; i++) {
- struct btinfo_common *tmp;
-
- tmp = (struct btinfo_common *)data;
- data += tmp->len;
- }
- if (data + len < (vaddr_t)&bip->bi_data + sizeof(bip->bi_data)) {
- memcpy((void *)data, &bi, len);
- bip->bi_nentries++;
- }
-
/* disable emulated devices */
if (inw(XEN_MAGIC_IOPORT) == XMI_MAGIC) {
outw(XEN_MAGIC_IOPORT, XMI_UNPLUG_IDE_DISKS | XMI_UNPLUG_NICS);
Home |
Main Index |
Thread Index |
Old Index