ia64/xen-unstable

changeset 4029:0b4083c2bdfd

bitkeeper revision 1.1159.258.32 (422e470bJa_VGcUAPdnpZWrD6n9uew)

Export Xen provided command line as /kern/xen/cmdline.
Signed-off-by: Christian Limpach <cl@NetBSD.org>
author cl349@firebug.cl.cam.ac.uk
date Wed Mar 09 00:44:59 2005 +0000 (2005-03-09)
parents 35896cd211c3
children 2a8ffe96dc3d 696112ffefa8
files netbsd-2.0-xen-sparse/sys/arch/xen/xen/hypervisor.c
line diff
     1.1 --- a/netbsd-2.0-xen-sparse/sys/arch/xen/xen/hypervisor.c	Wed Mar 09 00:37:56 2005 +0000
     1.2 +++ b/netbsd-2.0-xen-sparse/sys/arch/xen/xen/hypervisor.c	Wed Mar 09 00:44:59 2005 +0000
     1.3 @@ -52,7 +52,6 @@
     1.4  #include <machine/hypervisor.h>
     1.5  #include <machine/evtchn.h>
     1.6  
     1.7 -#ifdef DOM0OPS
     1.8  #include <sys/dirent.h>
     1.9  #include <sys/stat.h>
    1.10  #include <sys/tree.h>
    1.11 @@ -60,7 +59,6 @@
    1.12  #include <miscfs/specfs/specdev.h>
    1.13  #include <miscfs/kernfs/kernfs.h>
    1.14  #include <machine/kernfs_machdep.h>
    1.15 -#endif
    1.16  
    1.17  #if NXENNET > 0
    1.18  #include <net/if.h>
    1.19 @@ -187,9 +185,9 @@ hypervisor_attach(parent, self, aux)
    1.20  	hac.hac_xennpx.xa_device = "npx";
    1.21  	config_found(self, &hac.hac_xennpx, hypervisor_print);
    1.22  #endif
    1.23 +	xenkernfs_init();
    1.24  #ifdef DOM0OPS
    1.25  	if (xen_start_info.flags & SIF_PRIVILEGED) {
    1.26 -		xenkernfs_init();
    1.27  		xenprivcmd_init();
    1.28  		xenmachmem_init();
    1.29  		xenvfr_init();
    1.30 @@ -222,8 +220,7 @@ hypervisor_notify_via_evtchn(unsigned in
    1.31  	(void)HYPERVISOR_event_channel_op(&op);
    1.32  }
    1.33  
    1.34 -#ifdef DOM0OPS
    1.35 -
    1.36 +#define	READ_MODE	(S_IRUSR|S_IRGRP|S_IROTH)
    1.37  #define DIR_MODE	(S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
    1.38  
    1.39  kernfs_parentdir_t *kernxen_pkt;
    1.40 @@ -237,5 +234,9 @@ xenkernfs_init()
    1.41  	KERNFS_INITENTRY(dkt, DT_DIR, "xen", NULL, KFSsubdir, VDIR, DIR_MODE);
    1.42  	kernfs_addentry(NULL, dkt);
    1.43  	kernxen_pkt = KERNFS_ENTOPARENTDIR(dkt);
    1.44 +
    1.45 +	KERNFS_ALLOCENTRY(dkt, M_TEMP, M_WAITOK);
    1.46 +	KERNFS_INITENTRY(dkt, DT_REG, "cmdline", xen_start_info.cmd_line,
    1.47 +	    KFSstring, VREG, READ_MODE);
    1.48 +	kernfs_addentry(kernxen_pkt, dkt);
    1.49  }
    1.50 -#endif