Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1952 | art_zh | 1 | include 'cfg_bios.inc' |
2 | use16 |
||
3 | ;org 0 |
||
4 | |||
5 | rom_header: |
||
6 | ; PnP Option ROM header |
||
7 | rom_signature dw 0xAA55 ; +0 : magic |
||
8 | rom_length db BIOS_BOOT_BLOCK_SIZE ; +2 : number of 512byte blocks |
||
9 | rom_entry: |
||
10 | jmp init_entry ; +3 : initialization entry point |
||
11 | db 'AZ' |
||
12 | rom_reserved rb 0x11 ; +7 : reserved (17 bytes) |
||
13 | rom_pci_struc dw pci_header ; +18h : offset to PCI data structure |
||
14 | rom_expansion dw pnp_header ; +1Ah : offset to expansion header structure |
||
15 | |||
16 | align 16 |
||
17 | pnp_header: |
||
18 | ; PnP Expansion Header |
||
19 | pnp_signature db '$PnP' ; +0 : magic |
||
20 | pnp_revision db 1 ; +4 : revision |
||
21 | pnp_length db 2 ; +5 : length (in 16byte paragraphs) |
||
22 | pnp_next dw 0 ; +6 : offset of the next header (0 if none) |
||
23 | pnp_reserv1 db 0 ; +8 |
||
24 | pnp_checksum db 0 ; +9 : checksum |
||
25 | pnp_devid dd 0x0 ; +A : device identifier |
||
26 | pnp_manstr dw manstr ; +E : pointer to manufacturer string |
||
27 | pnp_prodstr dw prodstr ; +10 : pointer to product name string |
||
28 | pnp_devtype1 db 2 ; +12 : device type code |
||
29 | pnp_devtype2 dw 0x000 |
||
30 | pnp_devind db 0x14 ; +15 : device indicators |
||
31 | pnp_bcv dw 0 ; +16 : boot connection vector (must be 0) |
||
32 | pnp_discv dw 0 ; +18 : disconnect vector |
||
33 | pnp_bev dw boot_entry ; +1A : boot entry vector |
||
34 | pnp_reserv2 dw 0 ; +1C |
||
35 | pnp_info dw 0 ; +1E : static resource information vector |
||
36 | |||
37 | align 16 |
||
38 | pci_header: |
||
39 | ; PCI Data Structure |
||
40 | pci_magic db 'PCIR' ; +0 : magic |
||
41 | pci_vendor dw BIOS_PCI_VENDOR ; +4 : |
||
42 | pci_device dw BIOS_PCI_DEVICE ; +6 : sb700 PCI bridge |
||
43 | pci_vdata dw 0 ; +8 : vital product data offset |
||
44 | pci_length dw 0x18 ; +A : PCI data structure length |
||
45 | pci_classrev dd BIOS_PCI_CLASS ; +C : rev.00 + class 04.00.00 |
||
46 | pci_size dw BIOS_BOOT_BLOCK_SIZE ; +10 : image length (512byte blocks) |
||
47 | pci_rev dw 0 ; +12 |
||
48 | pci_codetype db 0 ; +14 : x86 |
||
49 | pci_indicator db 0x80 ; +15 : last image |
||
50 | pci_reserved dw 0 |
||
51 | |||
52 | align 4 |
||
53 | manstr: |
||
54 | db 'Kolibri-A Operation System',0 |
||
55 | prodstr: |
||
56 | db 'ver.ROM-0.1',0 |
||
57 | |||
58 | align 4 |
||
59 | boot_entry: |
||
60 | @@: |
||
61 | |||
62 | |||
63 | boot_failure: |
||
64 | int 18h ; return to BIOS Boot sequence |
||
65 | |||
66 | align 4 |
||
67 | init_entry: |
||
68 | xor ax, ax |
||
69 | mov [cs:rom_length], al |
||
70 | mov al, 0x20 |
||
71 | retf |
||
72 | |||
73 | |||
74 | check = 0 |
||
75 | repeat $-$$ |
||
76 | load a byte from $$+%-1 |
||
77 | check = a + check |
||
78 | end repeat |
||
79 | |||
80 | check_byte db 0x100 - (check mod 256) |
||
81 | |||
82 | times (512-$) db 0 |