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