-/*
- * stdarg.h
- * Modified for use in 15-410 at CMU
- * Zachary Anderson(zra)
- */
-
-/*
- * Copyright (c) 1994 The University of Utah and the Flux Group.
- * All rights reserved.
- *
- * This file is part of the Flux OSKit. The OSKit is free software, also known
- * as "open source;" you can redistribute it and/or modify it under the terms
- * of the GNU General Public License (GPL), version 2, as published by the Free
- * Software Foundation (FSF). To explore alternate licensing terms, contact
- * the University of Utah at csl-dist@cs.utah.edu or +1-801-585-3271.
- *
- * The OSKit is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GPL for more details. You should have
- * received a copy of the GPL along with the OSKit; see the file COPYING. If
- * not, write to the FSF, 59 Temple Place #330, Boston, MA 02111-1307, USA.
- */
-
-/*
- * Mach Operating System
- * Copyright (c) 1993 Carnegie Mellon University.
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-
-
#ifndef _STDARG_H_
#define _STDARG_H_
-#define __va_size(type) ((sizeof(type)+3) & ~0x3)
+/* This is awful, but really these are compiler intrinsics, so we use the
+ * GNU compiler intrinsics.
+ */
-#ifndef _VA_LIST_
-#define _VA_LIST_
-typedef char * va_list;
+#ifdef __GNUC__
+typedef __builtin_va_list va_list;
+#define va_start(v,l) __builtin_va_start(v,l)
+#define va_end(v) __builtin_va_end(v)
+#define va_arg(v,l) __builtin_va_arg(v,l)
+#define va_copy(d,s) __builtin_va_copy(d,s)
+#else
+#error "Don't know how to use varargs not on GNUC, sorry."
#endif
-#define va_start(pvar, lastarg) \
- ((pvar) = (char*)(void*)&(lastarg) + __va_size(lastarg))
-#define va_end(pvar)
-#define va_arg(pvar,type) \
- ((pvar) += __va_size(type), \
- *((type *)((pvar) - __va_size(type))))
-
-#endif /* _STDARG_H_ */
+#endif
+/* stdint.h
+ * Standard integer types
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef _STDINT_H
#define _STDINT_H
+/* reg-82801b.h
+ * Register macros for Intel 82801B
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef _REG_82801B_H
#define _REG_82801B_H
+/* output.h
+ * Register macros for Intel 82815
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef _REG_82815_H
#define _REG_82815_H
+/* serial.h
+ * Prototypes for serial output routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef SERIAL_H
#define SERIAL_H
+/* smi.h
+ * Prototypes for generic SMI handling routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef SMI_H
#define SMI_H
+/* string.h
+ * Stub string.h
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <minilib.h>
+/* text.h
+ * Prototypes for text rendering routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef _TEXT_H
#include <stdint.h>
+/* output.h
+ * Prototypes for timer handling routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef TIMER_H
#define TIMER_H
+/* vga-overlay.h
+ * Prototype for VGA text overlay routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef VGA_OVERLAY_H
#define VGA_OVERLAY_H
-/** @file console.c
- * @brief A console driver.
+/* console.c
+ * A console driver.
+ *
+ * Copyright (c) 2008 Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
*
- * @author Joshua Wise (jwise) <joshua@joshuawise.com>
- * @bug None known
*/
#include <console.h>
+/* minilib.c
+ * General-purpose C library routines.
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include "console.h"
#include <minilib.h>
#include <output.h>
+
/* We have both _memcpy and memcpy, because gcc might be able to do better in lwip.
* For small things, gcc inlines its memcpy, but for large things, we call out
* to this memcpy.
+/* serial.c
+ * Serial output routines.
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <minilib.h>
#include <io.h>
+/* etherboot-compat.h
+ * EtherBoot driver compatibility routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
+
#ifndef _ETHERBOOT_COMPAT_H
#define _ETHERBOOT_COMPAT_H
+/* net.c
+ * Top-level network glue code
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <pci.h>
#include <smram.h>
#include <pci-bother.h>
+/* net.h
+ * Top-level network clue code headers
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef _NET_H
#define _NET_H
+/* rfb.c
+ * Remote framebuffer server
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <stdint.h>
#include <minilib.h>
#include <output.h>
+/* rfb.h
+ * Remote framebuffer server
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef _RFB_H
#define _RFB_H
+/* drivers.c
+ * PCI driver table
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <pci.h>
extern struct pci_driver a3c90x_driver;
+; entry.asm
+; SMI entry point
+; NetWatch system management mode administration console
+;
+; Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+; This program is free software; you can redistribute and/or modify it under
+; the terms found in the file LICENSE in the root of this source tree.
+
org 0xA8000
[bits 16]
entry:
+/* firstrun.c
+ * First-run handler
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <io.h>
#include <smi.h>
#include <pci.h>
+/* keyboard.c
+ * Keyboard scan code conversion and injection.
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include "keyboard.h"
#include <stdint.h>
#include <minilib.h>
+/* main.c
+ * Main post-paging entry point.
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <io.h>
#include <smram.h>
#include <video_defines.h>
+/* packet.c
+ * OS-to-NetWatch communication packet interface
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <stdint.h>
#include "packet.h"
+/* packet.h
+ * OS-to-NetWatch communication packet interface
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef _PAGETABLE_H
#define _PAGETABLE_H
+# pagingstub-asm.s
+# Paging-enable helper routines
+# NetWatch system management mode administration console
+#
+# Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+# This program is free software; you can redistribute and/or modify it under
+# the terms found in the file LICENSE in the root of this source tree.
.globl set_cr0
+/* pagingstub.c
+ * Paging enable routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
+
#include <io.h>
#include <smram.h>
#include <video_defines.h>
+/* smi.c
+ * First-run SMI C entry point
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <io.h>
#include <smram.h>
#include <video_defines.h>
+/* traps.c
+ * Trap handling routines
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <output.h>
#include <io.h>
#include <paging.h>
+/* traps.h
+ * Trap handling macros
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#ifndef TRAPS_H
#define TRAPS_H
+/* vga-overlay.c
+ * VGA text overlay code
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
#include <io.h>
#include <smram.h>
#include <video_defines.h>
-/** Page table and page directory flags.
+/* vm_flags.h
+ * Page table and page directory flags.
+ * NetWatch system management mode administration console
*
- * From intel-sys.pdf.
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
*
- * @author Jacob Potter (jdpotter)
*/
#ifndef _VM_FLAGS_H