diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-04 20:29:36 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-04 20:29:36 +0000 |
commit | e60fe0a11a51af42cf6d9eb207982db16c7b2c7d (patch) | |
tree | a0f853f68bc252a66022a8935495a101fee13079 /sys/arch/loongson | |
parent | 2e4e588bfd06481ea41f15b947726a7a4161e403 (diff) |
By popular demand and peer pressure, check-in work in progress work to support
the Yeelong Lemote mips-based netbook. Kernel bits only for now, needs
polishing; most of this work done during h2k9 last month, although the
porting effort started earlier this year.
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r-- | sys/arch/loongson/include/pmon.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/sys/arch/loongson/include/pmon.h b/sys/arch/loongson/include/pmon.h new file mode 100644 index 00000000000..d946686b24b --- /dev/null +++ b/sys/arch/loongson/include/pmon.h @@ -0,0 +1,52 @@ +/* $OpenBSD: pmon.h,v 1.1 2009/08/04 20:29:35 miod Exp $ */ + +/* + * Copyright (c) 2009 Miodrag Vallat. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _MACHINE_PMON_H_ +#define _MACHINE_PMON_H_ + +#if defined(_KERNEL) || defined(STANDALONE) + +/* + * PMON2000 callvec definitions + */ + +/* 32-bit compatible types */ +typedef uint32_t pmon_size_t; +typedef int32_t pmon_ssize_t; +typedef int64_t pmon_off_t; + +int pmon_open(const char *, int, ...); +int pmon_close(int); +int pmon_read(int, void *, pmon_size_t); +pmon_ssize_t pmon_write(int, const void *, pmon_size_t); +pmon_off_t pmon_lseek(int, quad_t /* off_t */, int); +int pmon_printf(const char *, ...); +void pmon_cacheflush(void); +char * pmon_gets(char *); + +#define PMON_MAXLN 256 /* internal gets() size limit */ + +extern int32_t pmon_callvec; + +const char *pmon_getarg(const int); +const char *pmon_getenv(const char *); +void pmon_init(int32_t, int32_t, int32_t, int32_t); + +#endif /* _KERNEL || STANDALONE */ + +#endif /* _MACHINE_PMON_H_ */ |