Fri Oct 2 18:50:03 2009 UTC ()
Add support for VIA C7 temperature sensors (options VIA_C7TEMP)


(jmcneill)
diff -r1.52 -r1.53 src/sys/arch/x86/conf/files.x86
diff -r1.30 -r1.31 src/sys/arch/x86/include/cpuvar.h
diff -r1.16 -r1.17 src/sys/arch/x86/x86/identcpu.c
diff -r0 -r1.1 src/sys/arch/x86/x86/viac7temp.c

cvs diff -r1.52 -r1.53 src/sys/arch/x86/conf/files.x86 (expand / switch to unified diff)

--- src/sys/arch/x86/conf/files.x86 2009/04/30 00:07:23 1.52
+++ src/sys/arch/x86/conf/files.x86 2009/10/02 18:50:03 1.53
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: files.x86,v 1.52 2009/04/30 00:07:23 rmind Exp $ 1# $NetBSD: files.x86,v 1.53 2009/10/02 18:50:03 jmcneill Exp $
2 2
3# options for MP configuration through the MP spec 3# options for MP configuration through the MP spec
4defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI 4defflag opt_mpbios.h MPBIOS MPVERBOSE MPDEBUG MPBIOS_SCANPCI
5 5
6# MTRR support 6# MTRR support
7defflag MTRR 7defflag MTRR
8 8
9# Interrupt debug 9# Interrupt debug
10defflag opt_intrdebug.h INTRDEBUG 10defflag opt_intrdebug.h INTRDEBUG
11 11
12# PCI fixup options 12# PCI fixup options
13defflag opt_pcifixup.h PCI_ADDR_FIXUP PCI_BUS_FIXUP 13defflag opt_pcifixup.h PCI_ADDR_FIXUP PCI_BUS_FIXUP
14 PCI_INTR_FIXUP PCI_INTR_FIXUP_FORCE 14 PCI_INTR_FIXUP PCI_INTR_FIXUP_FORCE
@@ -16,26 +16,29 @@ defflag opt_pcifixup.h PCI_ADDR_FIXUP PC @@ -16,26 +16,29 @@ defflag opt_pcifixup.h PCI_ADDR_FIXUP PC
16# Intel Enhanced Speedstep 16# Intel Enhanced Speedstep
17defflag ENHANCED_SPEEDSTEP 17defflag ENHANCED_SPEEDSTEP
18defflag opt_est.h EST_FREQ_USERWRITE 18defflag opt_est.h EST_FREQ_USERWRITE
19 19
20# Intel On Die Temperature sensor 20# Intel On Die Temperature sensor
21defflag opt_intel_coretemp.h INTEL_CORETEMP: sysmon_envsys 21defflag opt_intel_coretemp.h INTEL_CORETEMP: sysmon_envsys
22 22
23# Pentium 4+ Thermal Monitor ODCM (aka On Demand Clock Modulation) 23# Pentium 4+ Thermal Monitor ODCM (aka On Demand Clock Modulation)
24defflag opt_intel_odcm.h INTEL_ONDEMAND_CLOCKMOD 24defflag opt_intel_odcm.h INTEL_ONDEMAND_CLOCKMOD
25 25
26# AMD Powernow/Cool`n'Quiet Technology 26# AMD Powernow/Cool`n'Quiet Technology
27defflag opt_powernow_k8.h POWERNOW_K8 27defflag opt_powernow_k8.h POWERNOW_K8
28 28
 29# VIA C7 Temperature sensor
 30defflag opt_via_c7temp.h VIA_C7TEMP: sysmon_envsys
 31
29# VIA PadLock support 32# VIA PadLock support
30defflag opt_viapadlock.h VIA_PADLOCK: opencrypto 33defflag opt_viapadlock.h VIA_PADLOCK: opencrypto
31file arch/x86/x86/via_padlock.c via_padlock 34file arch/x86/x86/via_padlock.c via_padlock
32 35
33# To be able to test for NetBSD/xen in shared files 36# To be able to test for NetBSD/xen in shared files
34defflag opt_xen.h DO_NOT_DEFINE 37defflag opt_xen.h DO_NOT_DEFINE
35 38
36define cpubus { [apid = -1] } 39define cpubus { [apid = -1] }
37define ioapicbus { [apid = -1] } 40define ioapicbus { [apid = -1] }
38define ipmibus {} 41define ipmibus {}
39 42
40# 43#
41# CPUs 44# CPUs
@@ -94,26 +97,29 @@ file arch/x86/isa/isa_machdep.c isa @@ -94,26 +97,29 @@ file arch/x86/isa/isa_machdep.c isa
94file arch/x86/x86/powernow_k8.c powernow_k8 97file arch/x86/x86/powernow_k8.c powernow_k8
95file arch/x86/x86/powernow_common.c powernow_k8 | powernow_k7 98file arch/x86/x86/powernow_common.c powernow_k8 | powernow_k7
96 99
97# Intel On Demand Clock Modulation 100# Intel On Demand Clock Modulation
98file arch/x86/x86/iclockmod.c intel_ondemand_clockmod 101file arch/x86/x86/iclockmod.c intel_ondemand_clockmod
99 102
100# Intel Enhanced Speedstep 103# Intel Enhanced Speedstep
101file arch/x86/x86/est.c enhanced_speedstep 104file arch/x86/x86/est.c enhanced_speedstep
102file arch/x86/x86/intel_busclock.c enhanced_speedstep 105file arch/x86/x86/intel_busclock.c enhanced_speedstep
103 106
104# Intel On-Die Temperature sensor 107# Intel On-Die Temperature sensor
105file arch/x86/x86/coretemp.c intel_coretemp 108file arch/x86/x86/coretemp.c intel_coretemp
106 109
 110# VIA C7 Temperature sensor
 111file arch/x86/x86/viac7temp.c via_c7temp
 112
107# IPMI device 113# IPMI device
108device ipmi: sysmon_envsys, sysmon_wdog 114device ipmi: sysmon_envsys, sysmon_wdog
109attach ipmi at ipmibus 115attach ipmi at ipmibus
110file arch/x86/x86/ipmi.c ipmi needs-flag 116file arch/x86/x86/ipmi.c ipmi needs-flag
111 117
112file arch/x86/x86/vga_post.c vga_post 118file arch/x86/x86/vga_post.c vga_post
113 119
114file arch/x86/x86/tprof_pmi.c tprof needs-flag 120file arch/x86/x86/tprof_pmi.c tprof needs-flag
115 121
116file arch/x86/pci/pci_machdep.c pci 122file arch/x86/pci/pci_machdep.c pci
117file arch/x86/pci/pci_intr_machdep.c pci 123file arch/x86/pci/pci_intr_machdep.c pci
118 124
119file arch/x86/pci/pciide_machdep.c pciide_common 125file arch/x86/pci/pciide_machdep.c pciide_common

cvs diff -r1.30 -r1.31 src/sys/arch/x86/include/cpuvar.h (expand / switch to unified diff)

--- src/sys/arch/x86/include/cpuvar.h 2009/10/02 15:05:42 1.30
+++ src/sys/arch/x86/include/cpuvar.h 2009/10/02 18:50:03 1.31
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cpuvar.h,v 1.30 2009/10/02 15:05:42 jmcneill Exp $ */ 1/* $NetBSD: cpuvar.h,v 1.31 2009/10/02 18:50:03 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by RedBack Networks Inc. 8 * by RedBack Networks Inc.
9 * 9 *
10 * Author: Bill Sommerfeld 10 * Author: Bill Sommerfeld
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -82,52 +82,57 @@ struct cpu_attach_args { @@ -82,52 +82,57 @@ struct cpu_attach_args {
82 int cpu_number; 82 int cpu_number;
83 int cpu_role; 83 int cpu_role;
84 const struct cpu_functions *cpu_func; 84 const struct cpu_functions *cpu_func;
85}; 85};
86 86
87#ifdef _KERNEL 87#ifdef _KERNEL
88 88
89#if defined(_KERNEL_OPT) 89#if defined(_KERNEL_OPT)
90#include "opt_multiprocessor.h" 90#include "opt_multiprocessor.h"
91#include "opt_enhanced_speedstep.h" 91#include "opt_enhanced_speedstep.h"
92#ifndef XEN 92#ifndef XEN
93#include "opt_intel_coretemp.h" 93#include "opt_intel_coretemp.h"
94#include "opt_intel_odcm.h" 94#include "opt_intel_odcm.h"
 95#include "opt_via_c7temp.h"
95#endif 96#endif
96#endif /* defined(_KERNEL_OPT) */ 97#endif /* defined(_KERNEL_OPT) */
97 98
98#ifdef MULTIPROCESSOR 99#ifdef MULTIPROCESSOR
99extern uint32_t cpus_running; 100extern uint32_t cpus_running;
100#endif 101#endif
101 102
102int x86_ipi(int, int, int); 103int x86_ipi(int, int, int);
103void x86_self_ipi(int); 104void x86_self_ipi(int);
104int x86_ipi_init(int); 105int x86_ipi_init(int);
105int x86_ipi_startup(int, int); 106int x86_ipi_startup(int, int);
106void x86_errata(void); 107void x86_errata(void);
107 108
108void identifycpu(struct cpu_info *); 109void identifycpu(struct cpu_info *);
109void identifycpu_cpuids(struct cpu_info *); 110void identifycpu_cpuids(struct cpu_info *);
110void cpu_init(struct cpu_info *); 111void cpu_init(struct cpu_info *);
111void cpu_init_tss(struct cpu_info *); 112void cpu_init_tss(struct cpu_info *);
112void cpu_init_first(void); 113void cpu_init_first(void);
113 114
114void x86_cpu_idle_init(void); 115void x86_cpu_idle_init(void);
115void x86_cpu_idle_halt(void); 116void x86_cpu_idle_halt(void);
116void x86_cpu_idle_mwait(void); 117void x86_cpu_idle_mwait(void);
117#ifdef XEN 118#ifdef XEN
118void x86_cpu_idle_xen(void); 119void x86_cpu_idle_xen(void);
119#endif 120#endif
120 121
 122#ifdef VIA_C7TEMP
 123void viac7temp_register(struct cpu_info *);
 124#endif
 125
121#ifdef INTEL_CORETEMP 126#ifdef INTEL_CORETEMP
122void coretemp_register(struct cpu_info *); 127void coretemp_register(struct cpu_info *);
123#endif 128#endif
124 129
125#ifdef INTEL_ONDEMAND_CLOCKMOD 130#ifdef INTEL_ONDEMAND_CLOCKMOD
126void clockmod_init(void); 131void clockmod_init(void);
127#endif 132#endif
128 133
129#ifdef ENHANCED_SPEEDSTEP 134#ifdef ENHANCED_SPEEDSTEP
130void est_init(int); 135void est_init(int);
131int via_get_bus_clock(struct cpu_info *); 136int via_get_bus_clock(struct cpu_info *);
132int viac7_get_bus_clock(struct cpu_info *); 137int viac7_get_bus_clock(struct cpu_info *);
133int p3_get_bus_clock(struct cpu_info *); 138int p3_get_bus_clock(struct cpu_info *);

cvs diff -r1.16 -r1.17 src/sys/arch/x86/x86/identcpu.c (expand / switch to unified diff)

--- src/sys/arch/x86/x86/identcpu.c 2009/04/30 00:07:23 1.16
+++ src/sys/arch/x86/x86/identcpu.c 2009/10/02 18:50:03 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: identcpu.c,v 1.16 2009/04/30 00:07:23 rmind Exp $ */ 1/* $NetBSD: identcpu.c,v 1.17 2009/10/02 18:50:03 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden, and by Jason R. Thorpe. 8 * by Frank van der Linden, and by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,31 +20,32 @@ @@ -20,31 +20,32 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.16 2009/04/30 00:07:23 rmind Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.17 2009/10/02 18:50:03 jmcneill Exp $");
34 34
35#include "opt_enhanced_speedstep.h" 35#include "opt_enhanced_speedstep.h"
36#include "opt_intel_odcm.h" 36#include "opt_intel_odcm.h"
37#include "opt_intel_coretemp.h" 37#include "opt_intel_coretemp.h"
 38#include "opt_via_c7temp.h"
38#include "opt_powernow_k8.h" 39#include "opt_powernow_k8.h"
39#include "opt_xen.h" 40#include "opt_xen.h"
40#ifdef i386 /* XXX */ 41#ifdef i386 /* XXX */
41#include "opt_powernow_k7.h" 42#include "opt_powernow_k7.h"
42#endif 43#endif
43 44
44#include <sys/param.h> 45#include <sys/param.h>
45#include <sys/systm.h> 46#include <sys/systm.h>
46#include <sys/device.h> 47#include <sys/device.h>
47 48
48#include <uvm/uvm_extern.h> 49#include <uvm/uvm_extern.h>
49 50
50#include <machine/specialreg.h> 51#include <machine/specialreg.h>
@@ -741,26 +742,38 @@ cpu_identify(struct cpu_info *ci) @@ -741,26 +742,38 @@ cpu_identify(struct cpu_info *ci)
741 742
742#ifdef ENHANCED_SPEEDSTEP 743#ifdef ENHANCED_SPEEDSTEP
743 if (cpu_feature2 & CPUID2_EST) { 744 if (cpu_feature2 & CPUID2_EST) {
744 if (rdmsr(MSR_MISC_ENABLE) & (1 << 16)) 745 if (rdmsr(MSR_MISC_ENABLE) & (1 << 16))
745 est_init(cpu_vendor); 746 est_init(cpu_vendor);
746 } 747 }
747#endif /* ENHANCED_SPEEDSTEP */ 748#endif /* ENHANCED_SPEEDSTEP */
748 749
749#ifdef INTEL_CORETEMP 750#ifdef INTEL_CORETEMP
750 if (cpu_vendor == CPUVENDOR_INTEL && cpuid_level >= 0x06) 751 if (cpu_vendor == CPUVENDOR_INTEL && cpuid_level >= 0x06)
751 coretemp_register(ci); 752 coretemp_register(ci);
752#endif 753#endif
753 754
 755#ifdef VIA_C7TEMP
 756 if (cpu_vendor == CPUVENDOR_IDT &&
 757 CPUID2FAMILY(ci->ci_signature) == 6 &&
 758 CPUID2MODEL(ci->ci_signature) >= 0x9) {
 759 uint32_t descs[4];
 760
 761 x86_cpuid(0xc0000000, descs);
 762 if (descs[0] >= 0xc0000002) /* has temp sensor */
 763 viac7temp_register(ci);
 764 }
 765#endif
 766
754#if defined(POWERNOW_K7) || defined(POWERNOW_K8) 767#if defined(POWERNOW_K7) || defined(POWERNOW_K8)
755 if (cpu_vendor == CPUVENDOR_AMD && powernow_probe(ci)) { 768 if (cpu_vendor == CPUVENDOR_AMD && powernow_probe(ci)) {
756 switch (CPUID2FAMILY(ci->ci_signature)) { 769 switch (CPUID2FAMILY(ci->ci_signature)) {
757#ifdef POWERNOW_K7 770#ifdef POWERNOW_K7
758 case 6: 771 case 6:
759 k7_powernow_init(); 772 k7_powernow_init();
760 break; 773 break;
761#endif 774#endif
762#ifdef POWERNOW_K8 775#ifdef POWERNOW_K8
763 case 15: 776 case 15:
764 k8_powernow_init(); 777 k8_powernow_init();
765 break; 778 break;
766#endif 779#endif

File Added: src/sys/arch/x86/x86/viac7temp.c
/* $NetBSD: viac7temp.c,v 1.1 2009/10/02 18:50:03 jmcneill Exp $ */

/*-
 * Copyright (c) 2009 Jared D. McNeill <jmcneill@invisible.ca>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: viac7temp.c,v 1.1 2009/10/02 18:50:03 jmcneill Exp $");

#include <sys/param.h>
#include <sys/kmem.h>
#include <sys/xcall.h>
#include <sys/cpu.h>
#include <sys/device.h>

#include <dev/sysmon/sysmonvar.h>

#include <machine/cpuvar.h>
#include <machine/specialreg.h>
#include <machine/cpufunc.h>

struct viac7temp_softc {
	struct cpu_info		*sc_ci;
	struct sysmon_envsys 	*sc_sme;
	envsys_data_t 		sc_sensor;
};

static void	viac7temp_refresh(struct sysmon_envsys *, envsys_data_t *);
static void	viac7temp_refresh_xcall(void *, void *);

void
viac7temp_register(struct cpu_info *ci)
{
	struct viac7temp_softc *sc;

	sc = kmem_zalloc(sizeof(struct viac7temp_softc), KM_SLEEP);

	sc->sc_sensor.units = ENVSYS_STEMP;
	sc->sc_sensor.flags = 0;
	sc->sc_sensor.monitor = true;
	strlcpy(sc->sc_sensor.desc, "temperature",
	    sizeof(sc->sc_sensor.desc));

	sc->sc_sme = sysmon_envsys_create();
	if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensor)) {
		sysmon_envsys_destroy(sc->sc_sme);
		goto bad;
	}

	/*
	 * Hook into the system monitor.
	 */
	sc->sc_sme->sme_name = device_xname(ci->ci_dev);
	sc->sc_sme->sme_cookie = sc;
	sc->sc_sme->sme_refresh = viac7temp_refresh;

	if (sysmon_envsys_register(sc->sc_sme)) {
		aprint_error_dev(ci->ci_dev,
		    "unable to register with sysmon\n");
		sysmon_envsys_destroy(sc->sc_sme);
		goto bad;
	}

	return;

bad:
	kmem_free(sc, sizeof(struct viac7temp_softc));
}

static void
viac7temp_refresh(struct sysmon_envsys *sme, envsys_data_t *edata)
{
	struct viac7temp_softc *sc = sme->sme_cookie;
	uint64_t where;

	where = xc_unicast(0, viac7temp_refresh_xcall, sc, edata, sc->sc_ci);
	xc_wait(where);
}

static void
viac7temp_refresh_xcall(void *arg0, void *arg1)
{
	/* struct viac7temp_softc *sc = (struct viac7temp_softc *)arg0; */
	envsys_data_t *edata = (envsys_data_t *)arg1;
	uint32_t descs[4];

	x86_cpuid(0xc0000002, descs);

	edata->value_cur = descs[0] >> 8;
	edata->value_cur *= 1000000;
	edata->value_cur += 273150000;
	edata->state = ENVSYS_SVALID;
}