URL
https://opencores.org/ocsvn/v586/v586/trunk
Subversion Repositories v586
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 101 to Rev 102
- ↔ Reverse comparison
Rev 101 → Rev 102
/v586/trunk/boot/boot.mem
96,7 → 96,7
00 |
BE |
00 |
00 |
80 |
0C |
00 |
E8 |
156,7 → 156,7
BF |
F0 |
FF |
3F |
4F |
00 |
BE |
00 |
398,9 → 398,9
00 |
B8 |
00 |
3C |
FC |
01 |
00 |
00 |
A3 |
E0 |
01 |
409,7 → 409,7
B8 |
00 |
00 |
40 |
50 |
00 |
A3 |
18 |
947,16 → 947,12
6F |
74 |
20 |
63 |
6F |
73 |
74 |
65 |
70 |
79 |
20 |
66 |
6C |
61 |
73 |
68 |
2E |
2E |
0A |
0D |
00 |
974,6 → 970,10
00 |
00 |
00 |
00 |
00 |
00 |
00 |
E9 |
2D |
FC |
/v586/trunk/boot/boot_128.mem
0,0 → 1,1026
B8 |
01 |
00 |
00 |
00 |
0F |
22 |
C0 |
EA |
20 |
FC |
0F |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
BC |
00 |
10 |
00 |
00 |
E8 |
B8 |
01 |
00 |
00 |
E8 |
EF |
01 |
00 |
00 |
B0 |
06 |
BA |
00 |
05 |
00 |
00 |
EE |
B0 |
02 |
BA |
00 |
05 |
00 |
00 |
EE |
B3 |
03 |
E8 |
B4 |
00 |
00 |
00 |
B3 |
3F |
E8 |
AD |
00 |
00 |
00 |
B3 |
FF |
E8 |
A6 |
00 |
00 |
00 |
B3 |
F0 |
E8 |
9F |
00 |
00 |
00 |
BF |
F0 |
FF |
0F |
00 |
BE |
00 |
80 |
0C |
00 |
E8 |
4A |
00 |
00 |
00 |
E8 |
AF |
01 |
00 |
00 |
B0 |
06 |
BA |
00 |
05 |
00 |
00 |
EE |
B0 |
02 |
BA |
00 |
05 |
00 |
00 |
EE |
B3 |
03 |
E8 |
74 |
00 |
00 |
00 |
B3 |
7F |
E8 |
6D |
00 |
00 |
00 |
B3 |
FF |
E8 |
66 |
00 |
00 |
00 |
B3 |
F0 |
E8 |
5F |
00 |
00 |
00 |
BF |
F0 |
FF |
4F |
00 |
BE |
00 |
00 |
0C |
00 |
E8 |
0A |
00 |
00 |
00 |
E8 |
6F |
01 |
00 |
00 |
E9 |
95 |
00 |
00 |
00 |
E8 |
7B |
00 |
00 |
00 |
89 |
D8 |
C1 |
C0 |
08 |
88 |
07 |
47 |
C1 |
C0 |
08 |
88 |
07 |
47 |
C1 |
C0 |
08 |
88 |
07 |
47 |
C1 |
C0 |
08 |
88 |
07 |
8A |
1F |
38 |
C3 |
74 |
1D |
FF |
35 |
00 |
00 |
00 |
00 |
FF |
35 |
00 |
00 |
00 |
00 |
E8 |
35 |
01 |
00 |
00 |
8F |
05 |
00 |
00 |
00 |
00 |
8F |
05 |
00 |
00 |
00 |
00 |
47 |
4E |
75 |
BB |
C3 |
66 |
BA |
00 |
05 |
B1 |
08 |
D0 |
C3 |
88 |
D8 |
24 |
01 |
EE |
0C |
02 |
EE |
34 |
02 |
EE |
D0 |
C3 |
FE |
C9 |
75 |
EF |
C3 |
B0 |
06 |
BA |
00 |
05 |
00 |
00 |
EE |
B0 |
02 |
BA |
00 |
05 |
00 |
00 |
EE |
B3 |
F0 |
E8 |
00 |
00 |
00 |
00 |
B0 |
06 |
BA |
00 |
05 |
00 |
00 |
EE |
C3 |
66 |
BA |
04 |
05 |
B0 |
20 |
EE |
B9 |
1E |
00 |
00 |
00 |
49 |
75 |
FD |
ED |
ED |
ED |
89 |
C3 |
C3 |
BC |
00 |
10 |
00 |
00 |
E8 |
8F |
00 |
00 |
00 |
BB |
00 |
FF |
0F |
00 |
B9 |
0E |
04 |
00 |
00 |
89 |
19 |
BF |
00 |
00 |
09 |
00 |
B9 |
00 |
04 |
00 |
00 |
B8 |
00 |
00 |
00 |
00 |
F3 |
AB |
BF |
00 |
08 |
09 |
00 |
89 |
3D |
28 |
02 |
09 |
00 |
BE |
20 |
FF |
0F |
00 |
B9 |
00 |
01 |
00 |
00 |
F3 |
A4 |
B0 |
01 |
A3 |
10 |
02 |
09 |
00 |
B8 |
00 |
FC |
01 |
00 |
A3 |
E0 |
01 |
09 |
00 |
B8 |
00 |
00 |
50 |
00 |
A3 |
18 |
02 |
09 |
00 |
B8 |
00 |
00 |
30 |
00 |
A3 |
1C |
02 |
09 |
00 |
B0 |
50 |
A2 |
07 |
00 |
09 |
00 |
B0 |
19 |
A2 |
0E |
00 |
09 |
00 |
E8 |
5F |
00 |
00 |
00 |
BE |
00 |
00 |
09 |
00 |
EA |
00 |
00 |
10 |
00 |
10 |
00 |
50 |
52 |
BA |
FD |
03 |
00 |
00 |
EC |
24 |
20 |
74 |
F6 |
BA |
F8 |
03 |
00 |
00 |
88 |
D8 |
EE |
5A |
58 |
C3 |
BA |
FB |
03 |
00 |
00 |
B0 |
83 |
EE |
BA |
F8 |
03 |
00 |
00 |
B0 |
01 |
EE |
BA |
F9 |
03 |
00 |
00 |
B0 |
00 |
EE |
BA |
FB |
03 |
00 |
00 |
B0 |
03 |
EE |
BA |
FA |
03 |
00 |
00 |
B0 |
07 |
EE |
B0 |
00 |
BA |
F9 |
03 |
00 |
00 |
EE |
BA |
FC |
03 |
00 |
00 |
EE |
BA |
F8 |
03 |
00 |
00 |
C3 |
BE |
B0 |
FF |
0F |
00 |
8A |
1E |
B0 |
00 |
38 |
C3 |
74 |
08 |
46 |
E8 |
9A |
FF |
FF |
FF |
EB |
F0 |
C3 |
EB |
FE |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
63 |
6F |
6E |
73 |
6F |
6C |
65 |
3D |
74 |
74 |
79 |
53 |
30 |
2C |
31 |
31 |
35 |
32 |
30 |
30 |
6E |
38 |
20 |
72 |
6F |
6F |
74 |
3D |
2F |
64 |
65 |
76 |
2F |
72 |
61 |
6D |
30 |
20 |
72 |
77 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
42 |
6F |
6F |
74 |
20 |
73 |
74 |
65 |
70 |
2E |
2E |
0A |
0D |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
E9 |
2D |
FC |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
00 |
EB |
DE |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
90 |
|
|
/v586/trunk/boot/test_128.s
0,0 → 1,301
.code32 |
/* start protected mode , no more CS/DS prefix */ |
start: |
movl $0x01,%eax |
movl %eax , %cr0 |
.code32 |
ljmp $0x0 , $0x0ffc20 |
.org 0x020 |
|
boot_spi: |
movl $0x1000, %esp |
call init_uart |
|
call banner |
|
mov $6,%al |
mov $0x500,%edx |
out %al,(%dx) |
mov $2,%al |
mov $0x500,%edx |
out %al,(%dx) |
movb $0x03,%bl |
call send8b_spi |
movb $0x3F,%bl |
call send8b_spi |
movb $0xFF,%bl |
call send8b_spi |
movb $0xF0,%bl |
call send8b_spi |
|
mov $0x0FFFF0,%edi |
mov $0x0c8000,%esi |
call fill_spi |
|
call banner |
|
mov $6,%al |
mov $0x500,%edx |
out %al,(%dx) |
mov $2,%al |
mov $0x500,%edx |
out %al,(%dx) |
movb $0x03,%bl |
call send8b_spi |
movb $0x7F,%bl |
call send8b_spi |
movb $0xFF,%bl |
call send8b_spi |
movb $0xF0,%bl |
call send8b_spi |
|
mov $0x4FFFF0,%edi |
mov $0x0c0000,%esi |
call fill_spi |
|
call banner |
|
jmp boot_linux |
|
fill_spi: |
call recv32b_spi |
mov %ebx ,%eax |
rol $8,%eax |
mov %al , (%edi) |
inc %edi |
rol $8,%eax |
mov %al , (%edi) |
inc %edi |
rol $8,%eax |
mov %al , (%edi) |
inc %edi |
rol $8,%eax |
mov %al , (%edi) |
mov (%edi), %bl |
cmp %al , %bl |
jz okpass |
push edi |
push esi |
call banner |
pop esi |
pop edi |
okpass: |
inc %edi |
dec %esi |
jnz fill_spi |
ret |
|
|
// send %bl to spi , msb first |
send8b_spi: |
movw $0x500,%dx |
movb $8,%cl |
rol $1,%bl |
nextbit: |
mov %bl , %al |
and $1, %al |
outb %al, (%dx) |
or $2, %al |
outb %al, (%dx) |
xor $2, %al |
outb %al, (%dx) |
rol $1,%bl |
dec %cl |
jnz nextbit |
ret |
|
//init spi |
mov $6,%al |
mov $0x500,%edx |
out %al,(%dx) |
mov $2,%al |
mov $0x500,%edx |
out %al,(%dx) |
mov $0xF0,%bl |
call sen8b_spi |
mov $6,%al |
mov $0x500,%edx |
out %al,(%dx) |
ret |
|
|
// receive spi to %ebx |
recv32b_spi: |
movw $0x504,%dx |
movb $32,%al |
outb %al, (%dx) |
mov $30,%ecx |
waitloop: |
dec %ecx |
jnz waitloop |
in (%dx), %eax |
in (%dx), %eax |
in (%dx), %eax |
mov %eax,%ebx |
ret |
|
boot_linux: |
movl $0x1000, %esp |
|
call init_uart |
/* setup ebda ptr at 0x40e*/ |
movl $0x0fff00 , %ebx |
movl $0x040e , %ecx |
mov %ebx , (%ecx) |
|
/* eax = ram size */ |
/* ebx = ramd size */ |
/* ecx = ptr to cmdline */ |
|
mov $0x90000, %edi |
mov $0x400 , %ecx |
mov $0 , %eax |
rep |
stosl |
|
/* command line */ |
mov $0x90800, %edi |
mov %edi , 0x90228 |
mov $0xfff20, %esi |
mov $0x100 , %ecx |
rep |
movsb |
|
/* loader type */ |
mov $1, %al |
mov %eax , 0x90210 |
|
/* mem size */ |
//movl $0x003c00 , %eax |
movl $0x01fc00 , %eax |
|
mov %eax , 0x901e0 |
|
/* initrd start */ |
mov $0x00500000 , %eax |
/* mov $0, %eax */ |
mov %eax , 0x90218 |
|
/* initrd size */ |
movl $0x00300000 , %eax |
/* movl $501047 , %eax */ |
/* movl $0 , %eax */ |
mov %eax , 0x9021c |
|
/* row cols */ |
mov $80,%al |
mov %al,0x90007 |
mov $25,%al |
mov %al,0x9000e |
|
call banner |
|
/* Jump to Uncompressed Kernel */ |
movl $0x00090000, %esi |
ljmp $0x10, $0x00100000 |
|
/* Other sub procs */ |
|
sendchar: |
push %eax |
push %edx |
/* wait if there is character to be sent */ |
wait_rdy: |
movl $0x3fd, %edx |
in (%dx),%al |
andb $0x20,%al |
jz wait_rdy |
movl $0x3f8, %edx |
mov %bl, %al |
outb %al, (%dx) |
pop %edx |
pop %eax |
ret |
|
init_uart: |
/* set 8N1 flow dlab =1*/ |
movl $0x3fb, %edx |
movb $0x83 , %al |
outb %al , (%dx) |
|
/* set DLL divisor 1 = 115200 bauds , 2= 57600 bauds , ...*/ |
movl $0x3f8, %edx |
movb $1 ,%al |
outb %al , (%dx) |
movl $0x3f9, %edx |
movb $0 ,%al |
outb %al , (%dx) |
|
/* set 8N1 flow dlab=0*/ |
movl $0x3fb, %edx |
movb $0x3 , %al |
outb %al , (%dx) |
|
/* disable fifo*/ |
movl $0x3fa, %edx |
movb $0x7 , %al |
outb %al , (%dx) |
|
/* */ |
movb $0 ,%al |
movl $0x3f9, %edx |
outb %al , (%dx) |
movl $0x3fc, %edx |
outb %al , (%dx) |
/* test char */ |
movl $0x3f8, %edx |
ret |
|
banner: |
mov $0xfffb0, %esi |
banner_loop: |
movb (%esi),%bl |
mov $0,%al |
cmp %al,%bl |
jz exit_banner |
inc %esi |
call sendchar |
jmp banner_loop |
exit_banner: |
ret |
|
final: |
jmp final |
|
/* ebda */ |
.org 0x0300 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
.byte 0 |
|
/* cmdline */ |
.org 0x0320 |
.asciz "console=ttyS0,115200n8 root=/dev/ram0 rw" |
|
/* banner */ |
.org 0x03b0 |
.ascii "Boot step.." |
.byte 10 |
.byte 13 |
.byte 0 |
|
/* init jump bios */ |
.org 0x3d0 |
.code16 |
start2: |
jmp start |
|
.org 0x3f0 |
.code16 |
jmp start2 |