feat: reformatted code

This commit is contained in:
2021-02-10 18:56:47 +01:00
parent 2b295db30a
commit 90ef4522ca
16 changed files with 47 additions and 38 deletions

View File

@@ -61,6 +61,7 @@ typedef struct pci_driver pci_driver;
typedef struct pci_device pci_device;
typedef u8 (*pci_driver_validate)(const pci_device *);
typedef u8 (*pci_driver_initialize)(pci_device *);
typedef struct pci_driver {
@@ -152,4 +153,5 @@ void pci_config_write_word(u8 bus, u8 slot, u8 func, u8 offset, u16 value);
void pci_config_write_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 value);
void pci_init_bar(pci_device *device, u8 bar_index);
#endif //NEW_KERNEL_PCI_H

View File

@@ -31,6 +31,7 @@ unsigned short port_word_in(unsigned short port) {
void port_word_out(unsigned short port, unsigned short data) {
__asm__("out %%ax, %%dx" : : "a" (data), "d" (port));
}
unsigned int port_double_word_in(unsigned int port) {
unsigned int result;
__asm__("in %%dx, %%eax" : "=a" (result) : "d" (port));

View File

@@ -61,4 +61,5 @@ void port_word_out_repeat(unsigned short port, unsigned short *data, int buffer_
void port_word_in_repeat(unsigned short port, unsigned short *data, int buffer_size);
void port_double_word_in_repeat(unsigned short port, unsigned int *data, int buffer_size);
#endif