- Timestamp:
- Oct 4, 2018 1:44:55 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/PC/BIOS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/bios.c
r69501 r74613 62 62 63 63 static const char bios_cvs_version_string[] = "VirtualBox " VBOX_VERSION_STRING; 64 65 uint8_t read_byte(uint16_t seg, uint16_t offset)66 {67 return( *(seg:>(uint8_t *)offset) );68 }69 70 void write_byte(uint16_t seg, uint16_t offset, uint8_t data)71 {72 *(seg:>(uint8_t *)offset) = data;73 }74 75 uint16_t read_word(uint16_t seg, uint16_t offset)76 {77 return( *(seg:>(uint16_t *)offset) );78 }79 80 void write_word(uint16_t seg, uint16_t offset, uint16_t data)81 {82 *(seg:>(uint16_t *)offset) = data;83 }84 85 uint32_t read_dword(uint16_t seg, uint16_t offset)86 {87 return( *(seg:>(uint32_t *)offset) );88 }89 90 void write_dword(uint16_t seg, uint16_t offset, uint32_t data)91 {92 *(seg:>(uint32_t *)offset) = data;93 }94 64 95 65 uint8_t inb_cmos(uint8_t cmos_reg) -
trunk/src/VBox/Devices/PC/BIOS/floppy.c
r69501 r74613 59 59 60 60 extern uint16_t get_floppy_dpt(uint8_t drive_type); 61 62 // Local copies to slihgtly reduce stack usage.63 inline uint8_t read_byte(uint16_t seg, uint16_t offset)64 {65 return( *(seg:>(uint8_t *)offset) );66 }67 68 inline void write_byte(uint16_t seg, uint16_t offset, uint8_t data)69 {70 *(seg:>(uint8_t *)offset) = data;71 }72 73 61 74 62 ////////////////////// -
trunk/src/VBox/Devices/PC/BIOS/inlines.h
r69501 r74613 27 27 #define outw(p, v) outpw(p, v) 28 28 29 extern uint8_t read_byte(uint16_t seg, uint16_t offset); 30 extern uint16_t read_word(uint16_t seg, uint16_t offset); 31 extern uint32_t read_dword(uint16_t seg, uint16_t offset); 32 extern void write_byte(uint16_t seg, uint16_t offset, uint8_t data); 33 extern void write_word(uint16_t seg, uint16_t offset, uint16_t data); 34 extern void write_dword(uint16_t seg, uint16_t offset, uint32_t data); 29 /* Far byte/word/dword access routines. */ 30 31 inline uint8_t read_byte(uint16_t seg, uint16_t offset) 32 { 33 return( *(seg:>(uint8_t *)offset) ); 34 } 35 36 inline void write_byte(uint16_t seg, uint16_t offset, uint8_t data) 37 { 38 *(seg:>(uint8_t *)offset) = data; 39 } 40 41 inline uint16_t read_word(uint16_t seg, uint16_t offset) 42 { 43 return( *(seg:>(uint16_t *)offset) ); 44 } 45 46 inline void write_word(uint16_t seg, uint16_t offset, uint16_t data) 47 { 48 *(seg:>(uint16_t *)offset) = data; 49 } 50 51 inline uint32_t read_dword(uint16_t seg, uint16_t offset) 52 { 53 return( *(seg:>(uint32_t *)offset) ); 54 } 55 56 inline void write_dword(uint16_t seg, uint16_t offset, uint32_t data) 57 { 58 *(seg:>(uint32_t *)offset) = data; 59 } 60 35 61 36 62 void int_enable(void);
Note:
See TracChangeset
for help on using the changeset viewer.