/* Copyright 1999-2002 Johan Rydberg, jrydberg@rtmk.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "tm.h" #include "host.h" #include "trace.h" #include "vm-object.h" /* Master host port. */ struct ipc_port *master_host_port; /* Initialize host system. */ void host_init (void) { kern_return_t kr; master_host_port = ipc_port_create_kernel (); assert (master_host_port); } /* Reboot host. HOST_PORT must be master host port. */ kern_return_t host_reboot (struct ipc_port *host_port) { if (host_port != master_host_port) return KERN_PROTECTION_FAILURE; panic ("??? implement"); return 0; } /* Create a new host memory object. OFFSET is offset into physical memory. SIZE should be page aligned. Right to object is returned in OBJECTP. */ kern_return_t host_memory_object_create (struct ipc_port *host_port, vm_offset_t offset, vm_size_t size, struct vm_object **objectp) { if (host_port != master_host_port) return KERN_PROTECTION_FAILURE; panic ("??? implement"); return 0; } /* ??? */ kern_return_t host_put (struct ipc_port *host_port, char *str, int len) { while (len--) printf ("%c", *str++); return KERN_SUCCESS; }