Changeset 154 for trunk/hal/x86_64/core/hal_apic.c
- Timestamp:
- Jul 7, 2017, 9:16:50 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_apic.c
r153 r154 179 179 } 180 180 181 void hal_com_send( char c)181 void hal_com_send(uint8_t chan, char c) 182 182 { 183 183 uint8_t mcr = in8(RS232_COM1_BASE + RS232_MCR); … … 185 185 186 186 while (!hal_com_transmit_empty()); 187 out8(RS232_COM1_BASE + RS232_DATA, chan | 0x80); 187 188 out8(RS232_COM1_BASE + RS232_DATA, c); 188 189 189 190 out8(RS232_COM1_BASE + RS232_MCR, mcr); 191 } 192 193 /* 194 * Called early to provide x86-specific messages. Interrupts disabled. 195 */ 196 void hal_com_init_early() 197 { 198 /* Disable all interrupts */ 199 out8(RS232_COM1_BASE + RS232_IER, 0x00); 200 201 /* Set baudrate */ 202 out8(RS232_COM1_BASE + RS232_LCR, LCR_DLAB); 203 out8(RS232_COM1_BASE + RS232_DIVLO, BAUDRATE_DIV); 204 out8(RS232_COM1_BASE + RS232_DIVHI, 0); 205 206 /* 8bits, no parity, one stop bit */ 207 out8(RS232_COM1_BASE + RS232_LCR, LCR_DATA8); 208 209 /* DTR set, and also DSR */ 210 out8(RS232_COM1_BASE + RS232_MCR, MCR_DTR|MCR_IR); 211 out8(RS232_COM1_BASE + RS232_MSR, MSR_DSR); 190 212 } 191 213
Note: See TracChangeset
for help on using the changeset viewer.