]>
Commit | Line | Data |
---|---|---|
2aa62f2b | 1 | /* $NetBSD: dig64.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */\r |
2 | \r | |
3 | /*-\r | |
4 | * Copyright (c) 2002 Marcel Moolenaar\r | |
5 | * All rights reserved.\r | |
6 | *\r | |
7 | * Redistribution and use in source and binary forms, with or without\r | |
8 | * modification, are permitted provided that the following conditions\r | |
9 | * are met:\r | |
10 | *\r | |
11 | * 1. Redistributions of source code must retain the above copyright\r | |
12 | * notice, this list of conditions and the following disclaimer.\r | |
13 | * 2. Redistributions in binary form must reproduce the above copyright\r | |
14 | * notice, this list of conditions and the following disclaimer in the\r | |
15 | * documentation and/or other materials provided with the distribution.\r | |
16 | *\r | |
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\r | |
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\r | |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r | |
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\r | |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r | |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r | |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r | |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r | |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r | |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r | |
27 | *\r | |
28 | * $FreeBSD$\r | |
29 | */\r | |
30 | \r | |
31 | #ifndef _MACHINE_DIG64_H_\r | |
32 | #define _MACHINE_DIG64_H_\r | |
33 | \r | |
34 | struct dig64_gas {\r | |
35 | uint8_t addr_space;\r | |
36 | uint8_t bit_width;\r | |
37 | uint8_t bit_offset;\r | |
38 | uint8_t _reserved_;\r | |
39 | /*\r | |
40 | * XXX using a 64-bit type for the address would cause padding and\r | |
41 | * using __packed would cause unaligned accesses...\r | |
42 | */\r | |
43 | uint32_t addr_low;\r | |
44 | uint32_t addr_high;\r | |
45 | };\r | |
46 | \r | |
47 | struct dig64_hcdp_entry {\r | |
48 | uint8_t type;\r | |
49 | #define DIG64_HCDP_CONSOLE 0\r | |
50 | #define DIG64_HCDP_DBGPORT 1\r | |
51 | uint8_t databits;\r | |
52 | uint8_t parity;\r | |
53 | uint8_t stopbits;\r | |
54 | uint8_t pci_segment;\r | |
55 | uint8_t pci_bus;\r | |
56 | uint8_t pci_device:5;\r | |
57 | uint8_t _reserved1_:3;\r | |
58 | uint8_t pci_function:3;\r | |
59 | uint8_t _reserved2_:3;\r | |
60 | uint8_t interrupt:1;\r | |
61 | uint8_t pci_flag:1;\r | |
62 | /*\r | |
63 | * XXX using a 64-bit type for the baudrate would cause padding and\r | |
64 | * using __packed would cause unaligned accesses...\r | |
65 | */\r | |
66 | uint32_t baud_low;\r | |
67 | uint32_t baud_high;\r | |
68 | struct dig64_gas address;\r | |
69 | uint16_t pci_devid;\r | |
70 | uint16_t pci_vendor;\r | |
71 | uint32_t irq;\r | |
72 | uint32_t pclock;\r | |
73 | uint8_t pci_interface;\r | |
74 | uint8_t _reserved3_[7];\r | |
75 | };\r | |
76 | \r | |
77 | struct dig64_hcdp_table {\r | |
78 | char signature[4];\r | |
79 | #define HCDP_SIGNATURE "HCDP"\r | |
80 | uint32_t length;\r | |
81 | uint8_t revision;\r | |
82 | uint8_t checksum;\r | |
83 | char oem_id[6];\r | |
84 | char oem_tbl_id[8];\r | |
85 | uint32_t oem_rev;\r | |
86 | char creator_id[4];\r | |
87 | uint32_t creator_rev;\r | |
88 | uint32_t entries;\r | |
89 | struct dig64_hcdp_entry entry[1];\r | |
90 | };\r | |
91 | \r | |
92 | #endif\r |