-
Notifications
You must be signed in to change notification settings - Fork 1
/
characteristics.go
84 lines (80 loc) · 2.05 KB
/
characteristics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package bios
// Characteristics bios字符集
type Characteristics uint64
// BIOS Characteristics
const (
Reserved0 Characteristics = 1 << iota
Reserved1
Unknown
NotSupported
ISASupported
MCASupported
EISASupported
PCISupported
PCMCIASupported
PlugPlaySupported
APMSupported
Upgradeable
ShadowingIsAllowed
VLVESASupported
ESCDSupported
BootFromCDSupported
SelectableBootSupported
BIOSROMIsSockectd
BootFromPCMCIASupported
EDDSupported
JPFloppyNECSupported
JPFloppyToshibaSupported
Floppy525_360KBSupported
Floppy525_1_2MBSupported
Floppy35_720KBSupported
Floppy35_2_88MBSupported
PrintScreenSupported
Keyboard8042Supported
SerialSupported
PrinterSupported
CGAMonoSupported
NECPC98
//Bit32:47 Reserved for BIOS vendor
//Bit47:63 Reserved for system vendor
)
func (b Characteristics) String() string {
var s string
chars := [...]string{
"BIOS characteristics not supported", /* 3 */
"ISA is supported",
"MCA is supported",
"EISA is supported",
"PCI is supported",
"PC Card (PCMCIA) is supported",
"PNP is supported",
"APM is supported",
"BIOS is upgradeable",
"BIOS shadowing is allowed",
"VLB is supported",
"ESCD support is available",
"Boot from CD is supported",
"Selectable boot is supported",
"BIOS ROM is socketed",
"Boot from PC Card (PCMCIA) is supported",
"EDD is supported",
"Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)",
"Japanese floppy for Toshiba 1.2 MB is supported (int 13h)",
"5.25\"/360 kB floppy services are supported (int 13h)",
"5.25\"/1.2 MB floppy services are supported (int 13h)",
"3.5\"/720 kB floppy services are supported (int 13h)",
"3.5\"/2.88 MB floppy services are supported (int 13h)",
"Print screen service is supported (int 5h)",
"8042 keyboard services are supported (int 9h)",
"Serial services are supported (int 14h)",
"Printer services are supported (int 17h)",
"CGA/mono video services are supported (int 10h)",
"NEC PC-98", /* 31 */
}
for i := uint32(4); i < 32; i++ {
if b&(1<<i) != 0 {
s += "\n\t\t" + chars[i-3]
}
}
return s
}