Kevin O'Connor | 1f2c307 | 2009-05-06 23:35:59 -0400 | [diff] [blame] | 1 | // Rom layout and bios assembler to C interface. |
| 2 | // |
Kevin O'Connor | 36feea9 | 2012-02-11 10:49:45 -0500 | [diff] [blame] | 3 | // Copyright (C) 2009-2012 Kevin O'Connor <kevin@koconnor.net> |
Kevin O'Connor | 1f2c307 | 2009-05-06 23:35:59 -0400 | [diff] [blame] | 4 | // |
| 5 | // This file may be distributed under the terms of the GNU LGPLv3 license. |
| 6 | |
| 7 | |
Julian Pidancet | 7c6509c | 2011-12-19 05:07:55 +0000 | [diff] [blame] | 8 | #include "config.h" // CONFIG_* |
Kevin O'Connor | 1f2c307 | 2009-05-06 23:35:59 -0400 | [diff] [blame] | 9 | #include "entryfuncs.S" // ENTRY_* |
| 10 | |
| 11 | |
| 12 | /**************************************************************** |
| 13 | * Rom Header |
| 14 | ****************************************************************/ |
| 15 | |
| 16 | .section .rom.header |
Kevin O'Connor | 36feea9 | 2012-02-11 10:49:45 -0500 | [diff] [blame] | 17 | .code16gcc |
Kevin O'Connor | 1f2c307 | 2009-05-06 23:35:59 -0400 | [diff] [blame] | 18 | .global _rom_header, _rom_header_size, _rom_header_checksum |
| 19 | _rom_header: |
| 20 | .word 0xaa55 |
| 21 | _rom_header_size: |
| 22 | .byte 0 |
| 23 | _rom_header_entry: |
| 24 | jmp _optionrom_entry |
| 25 | _rom_header_checksum: |
Kevin O'Connor | c9d3c2d | 2010-01-01 12:53:32 -0500 | [diff] [blame] | 26 | .byte 0 |
| 27 | _rom_header_other: |
Julian Pidancet | 7c6509c | 2011-12-19 05:07:55 +0000 | [diff] [blame] | 28 | .space 17 |
| 29 | _rom_header_pcidata: |
| 30 | #if CONFIG_VGA_PCI == 1 |
| 31 | .word rom_pci_data |
| 32 | #else |
| 33 | .word 0 |
| 34 | #endif |
| 35 | _rom_header_pnpdata: |
| 36 | .word 0 |
Kevin O'Connor | 72b5e45 | 2011-12-23 23:01:48 -0500 | [diff] [blame] | 37 | _rom_header_other2: |
| 38 | .word 0 |
| 39 | _rom_header_signature: |
| 40 | .asciz "IBM" |
Kevin O'Connor | 1f2c307 | 2009-05-06 23:35:59 -0400 | [diff] [blame] | 41 | |
| 42 | |
| 43 | /**************************************************************** |
| 44 | * Entry points |
| 45 | ****************************************************************/ |
| 46 | |
Kevin O'Connor | 9961f99 | 2012-01-21 11:53:44 -0500 | [diff] [blame] | 47 | DECLFUNC entry_104f05 |
| 48 | entry_104f05: |
| 49 | ENTRY_ARG vbe_104f05 |
| 50 | lretw |
| 51 | |
Kevin O'Connor | 1f2c307 | 2009-05-06 23:35:59 -0400 | [diff] [blame] | 52 | DECLFUNC _optionrom_entry |
| 53 | _optionrom_entry: |
| 54 | ENTRY_ARG vga_post |
| 55 | lretw |
| 56 | |
Kevin O'Connor | 9f193b9 | 2009-05-16 23:31:27 -0400 | [diff] [blame] | 57 | DECLFUNC entry_10 |
| 58 | entry_10: |
| 59 | ENTRY_ARG handle_10 |
| 60 | iretw |