summaryrefslogtreecommitdiff
path: root/src/cpu/i386/bist32_fail.inc
blob: f467b065bcc016a48aa3507af8a7e89a18294642 (plain)
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


	jmp bist32_fail_0
bist32_fail:
	movl	%eax, %ebp

#if 1
#define SIO_BASE  0x2e
#define SIO_INDEX SIO_BASE
#define SIO_DATA  SIO_BASE+1
#define SIO_WRITE_CONFIG(value, reg) \
	movb	reg, %al		; \
	outb	%al, $(SIO_INDEX)	; \
	movb	value, %al		; \
	outb	%al, $(SIO_DATA)

#define SIO_READ_CONFIG(reg) \
	movb	reg, %al		; \
	outb	%al, $(SIO_INDEX)	; \
	inb	$(SIO_DATA), %al

#define SIO_SET_LOGICAL_DEVICE(device) \
	SIO_WRITE_CONFIG(device, $0x07)

	/* Enable serial 1 */
	SIO_SET_LOGICAL_DEVICE($3)
	SIO_WRITE_CONFIG($1, $0x30)
	SIO_WRITE_CONFIG($0x3, $0x60)
	SIO_WRITE_CONFIG($0xf8, $0x61)

#endif	
	CALLSP(serial_init)
	CONSOLE_DEBUG_TX_STRING($str_bist_failed)
	CONSOLE_DEBUG_TX_HEX32(%ebp)
	CONSOLE_DEBUG_TX_STRING($str_bist_newline)
	jmp .Lhlt

bist32_fail_0:

.section ".rom.data"
str_bist_failed:	.string "BIST failed: "
str_bist_newline:	.string "\r\n"
.previous