1 /* $NetBSD: nvm.h,v 1.1 2002/06/06 19:48:09 fredette Exp $ */
3 /* $OpenBSD: nvm.h,v 1.2 1998/11/23 03:28:22 mickey Exp $ */
6 * Copyright (c) 1990, 1994 The University of Utah and
7 * the Computer Systems Laboratory at the University of Utah (CSL).
10 * Permission to use, copy, modify and distribute this software is hereby
11 * granted provided that (1) source code retains these copyright, permission,
12 * and disclaimer notices, and (2) redistributions including binaries
13 * reproduce the notices in supporting documentation, and (3) all advertising
14 * materials mentioning features or use of this software display the following
15 * acknowledgement: ``This product includes software developed by the
16 * Computer Systems Laboratory at the University of Utah.''
18 * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
19 * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
20 * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
22 * CSL requests users of this software to return to csl-dist@cs.utah.edu any
23 * improvements that they make and grant CSL redistribution rights.
25 * Utah $Hdr: nvm.h 1.4 94/12/14$
26 * Author: Jeff Forys, University of Utah CSL
29 #ifndef _MACHINE_NVM_H_
30 #define _MACHINE_NVM_H_
33 * The PDC provides access to Non-Volatile Memory (NVM). If this
34 * is implemented (it's HVERSION dependent), the first 256 bytes
35 * are formatted as follows:
37 * 0x000 +----------------------------+
38 * | Implementation information |
39 * 0x024 +----------------------------+
43 * 0x080 +----------------------------+
46 * | OS Panic information |
49 * 0x100 +----------------------------+
51 * It appears that there are at least 256 bytes of NVM, and only
52 * the "OS Panic information" is not architected. This means that
53 * we can use locations 0x80 - 0xFF for saving information across
54 * boots (e.g. boot flags and boot device). I think we should use
55 * the higher portions of this space first, to avoid conflicting
56 * with possible future HP-PA plans for the NVM.
58 * The PDC requires that NVM be read/written to in word multiples.
62 * Boot flags and boot device (0xF4 - 0xFF).
65 #define NVM_BOOTDATA 0xF4 /* location of bootdata in NVM */
66 #define NVM_BOOTMAGIC 0xACCEDE /* magic used for bootdata cksum */
67 #define NVM_BOOTCKSUM(bd) \
68 ((unsigned int) NVM_BOOTMAGIC + (bd).flags + (bd).device)
71 unsigned int cksum
; /* NVM_BOOTMAGIC + flags + device */
72 unsigned int flags
; /* boot flags */
73 unsigned int device
; /* boot device */
76 #endif /* _MACHINE_NVM_H_ */