1*768423b8Smartin /* $NetBSD: bootinfo.h,v 1.5 2014/03/31 11:25:49 martin Exp $ */ 2*768423b8Smartin 3*768423b8Smartin /*- 4*768423b8Smartin * Copyright (c) 2001 The NetBSD Foundation, Inc. 5*768423b8Smartin * All rights reserved. 6*768423b8Smartin * 7*768423b8Smartin * Redistribution and use in source and binary forms, with or without 8*768423b8Smartin * modification, are permitted provided that the following conditions 9*768423b8Smartin * are met: 10*768423b8Smartin * 1. Redistributions of source code must retain the above copyright 11*768423b8Smartin * notice, this list of conditions and the following disclaimer. 12*768423b8Smartin * 2. Redistributions in binary form must reproduce the above copyright 13*768423b8Smartin * notice, this list of conditions and the following disclaimer in the 14*768423b8Smartin * documentation and/or other materials provided with the distribution. 15*768423b8Smartin * 16*768423b8Smartin * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 17*768423b8Smartin * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18*768423b8Smartin * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19*768423b8Smartin * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 20*768423b8Smartin * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21*768423b8Smartin * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22*768423b8Smartin * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23*768423b8Smartin * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24*768423b8Smartin * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25*768423b8Smartin * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26*768423b8Smartin * POSSIBILITY OF SUCH DAMAGE. 27*768423b8Smartin */ 28*768423b8Smartin 29*768423b8Smartin #define PS2_MEMORY_SIZE (32 * 1024 * 1024) 30*768423b8Smartin 31*768423b8Smartin #define BOOTINFO_BLOCK_SIZE 0x1000 32*768423b8Smartin #define BOOTINFO_BLOCK_BASE (PS2_MEMORY_SIZE - BOOTINFO_BLOCK_SIZE) 33*768423b8Smartin 34*768423b8Smartin #define BOOTINFO_DEVCONF 0x00 35*768423b8Smartin #define BOOTINFO_DEVCONF_SPD_PRESENT 0x100 36*768423b8Smartin 37*768423b8Smartin #define BOOTINFO_OPTION_PTR 0x04 38*768423b8Smartin #define BOOTINFO_RTC 0x10 39*768423b8Smartin #define BOOTINFO_PCMCIA_TYPE 0x1c 40*768423b8Smartin #define BOOTINFO_SYSCONF 0x20 41*768423b8Smartin 42*768423b8Smartin #define BOOTINFO_REF(x) \ 43*768423b8Smartin (*(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(BOOTINFO_BLOCK_BASE + (x))) 44*768423b8Smartin 45*768423b8Smartin struct bootinfo_rtc { 46*768423b8Smartin u_int8_t __reserved1; 47*768423b8Smartin u_int8_t sec; 48*768423b8Smartin u_int8_t min; 49*768423b8Smartin u_int8_t hour; 50*768423b8Smartin u_int8_t __reserved2; 51*768423b8Smartin u_int8_t day; 52*768423b8Smartin u_int8_t mon; 53*768423b8Smartin u_int8_t year; 54*768423b8Smartin } __attribute__((__packed__)); 55