Expose the kernel driver definitions

This commit is contained in:
Pierre Pronchery 2018-09-18 01:58:43 +02:00
parent 24ba28ce24
commit 1b44719632
38 changed files with 50 additions and 49 deletions

View File

@ -0,0 +1 @@
dist=Makefile,bus.h,clock.h,console.h,display.h,pic.h

View File

@ -1 +1,2 @@
subdirs=drivers
dist=Makefile,intr.h,platform.h dist=Makefile,intr.h,platform.h

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "bus.h" #include <kernel/drivers/bus.h>
/* public */ /* public */

View File

@ -6,8 +6,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include "kernel/intr.h" #include <kernel/intr.h>
#include "drivers/bus/cmos.h" #include "cmos.h"
#if defined(__amd64__) || defined(__i386__) #if defined(__amd64__) || defined(__i386__)

View File

@ -7,7 +7,7 @@
#ifndef UKERNEL_DRIVERS_BUS_CMOS_H #ifndef UKERNEL_DRIVERS_BUS_CMOS_H
# define UKERNEL_DRIVERS_BUS_CMOS_H # define UKERNEL_DRIVERS_BUS_CMOS_H
# include "drivers/bus.h" # include <kernel/drivers/bus.h>
/* types */ /* types */

View File

@ -6,8 +6,8 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#include <kernel/drivers/bus.h>
#include "arch/arch.h" #include "arch/arch.h"
#include "../bus.h"
#if defined(__amd64__) || defined(__i386__) #if defined(__amd64__) || defined(__i386__)

View File

@ -26,10 +26,10 @@ sources=vga.c
#sources #sources
[cmos.c] [cmos.c]
depends=../bus.h,cmos.h depends=../../../include/kernel/drivers/bus.h,cmos.h
[ioport.c] [ioport.c]
depends=../bus.h depends=../../../include/kernel/drivers/bus.h
[tty.c] [tty.c]
depends=../bus.h depends=../../../include/kernel/drivers/bus.h

View File

@ -6,7 +6,7 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#include "../bus.h" #include <kernel/drivers/bus.h>
/* private */ /* private */

View File

@ -6,8 +6,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include "kernel/intr.h" #include <kernel/intr.h>
#include "drivers/bus.h" #include <kernel/drivers/bus.h>
#if defined(__amd64__) || defined(__i386__) #if defined(__amd64__) || defined(__i386__)

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "clock.h" #include <kernel/drivers/clock.h>
/* private */ /* private */

View File

@ -6,8 +6,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include "drivers/clock.h" #include <kernel/drivers/clock.h>
#include "drivers/clock/cmos.h" #include "cmos.h"
/* private */ /* private */

View File

@ -5,7 +5,7 @@
#include <stddef.h> #include <stddef.h>
#include "drivers/clock.h" #include <kernel/drivers/clock.h>
/* private */ /* private */

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "console.h" #include <kernel/drivers/console.h>
/* private */ /* private */

View File

@ -5,7 +5,7 @@
#include <string.h> #include <string.h>
#include "drivers/console.h" #include <kernel/drivers/console.h>
#include "stdio.h" #include "stdio.h"

View File

@ -6,7 +6,7 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#include "drivers/console.h" #include <kernel/drivers/console.h>
#include "uart.h" #include "uart.h"

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "display.h" #include <kernel/drivers/display.h>
/* private */ /* private */

View File

@ -9,7 +9,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include "drivers/display.h" #include <kernel/drivers/display.h>
#include "vesa.h" #include "vesa.h"

View File

@ -10,7 +10,7 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "drivers/display.h" #include <kernel/drivers/display.h>
#include "vga.h" #include "vga.h"
/* macros */ /* macros */

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "pic.h" #include <kernel/drivers/pic.h>
/* private */ /* private */

View File

@ -6,8 +6,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include "drivers/pic.h" #include <kernel/drivers/pic.h>
#include "drivers/pic/i8259a.h" #include "i8259a.h"
/* private */ /* private */

View File

@ -6,7 +6,7 @@ asflags_force=$(CFLAGSF) $(CFLAGS) -c
cflags_force=`../../tools/platform.sh -V UKERNEL_CFLAGS -C "$$ARCH"` cflags_force=`../../tools/platform.sh -V UKERNEL_CFLAGS -C "$$ARCH"`
cflags=-W -Wall -g -O2 cflags=-W -Wall -g -O2
ldflags_force=`../../tools/platform.sh -V UKERNEL_LDFLAGS -C "$$ARCH"` ldflags_force=`../../tools/platform.sh -V UKERNEL_LDFLAGS -C "$$ARCH"`
dist=Makefile,bus.h,clock.h,console.h,display.h,pic.h dist=Makefile
#targets #targets
[bus.o] [bus.o]
@ -31,16 +31,16 @@ sources=pic.c
#sources #sources
[bus.c] [bus.c]
depends=bus.h,bus/ioport.c depends=../../include/kernel/drivers/bus.h,bus/ioport.c
[clock.c] [clock.c]
depends=bus.h,clock.h depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/clock.h
[console.c] [console.c]
depends=bus.h,console.h depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/console.h
[display.c] [display.c]
depends=bus.h,display.h depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/display.h
[pic.c] [pic.c]
depends=bus.h,pic.h depends=../../include/kernel/drivers/bus.h,../../include/kernel/drivers/pic.h

View File

@ -6,15 +6,15 @@
#if defined(__amd64__) || defined(__i386__) #if defined(__amd64__) || defined(__i386__)
# include <stdio.h> # include <stdio.h>
# include <kernel/drivers/bus.h>
# include <kernel/drivers/clock.h>
# include <kernel/drivers/console.h>
# include <kernel/drivers/display.h>
# include <kernel/drivers/pic.h>
# include "arch/amd64/gdt.h" # include "arch/amd64/gdt.h"
# include "arch/i386/gdt.h" # include "arch/i386/gdt.h"
# include "arch/i386/idt.h" # include "arch/i386/idt.h"
# include "drivers/boot/multiboot.h" # include "drivers/boot/multiboot.h"
# include "drivers/bus.h"
# include "drivers/clock.h"
# include "drivers/console.h"
# include "drivers/display.h"
# include "drivers/pic.h"
# ifndef KERNEL_CONSOLE # ifndef KERNEL_CONSOLE
# define KERNEL_CONSOLE "uart" # define KERNEL_CONSOLE "uart"

View File

@ -102,7 +102,7 @@ $name $type $busname $args"
echo "#include <stddef.h>" echo "#include <stddef.h>"
echo "$devices" | while read name type busname args; do echo "$devices" | while read name type busname args; do
[ -n "$name" ] || continue [ -n "$name" ] || continue
echo "#include \"drivers/${type}.h\"" echo "#include <kernel/drivers/${type}.h>"
done done
#begin the function #begin the function

View File

@ -16,7 +16,7 @@ depends=../../include/ctype.h
depends=../../include/errno.h depends=../../include/errno.h
[ssp.c] [ssp.c]
depends=../../include/stdlib.h,../drivers/console.h,ssp.h depends=../../include/stdlib.h,../../include/kernel/drivers/console.h,ssp.h
[stdio.c] [stdio.c]
depends=../../include/stdio.h,../../include/string.h depends=../../include/stdio.h,../../include/string.h
@ -31,4 +31,4 @@ depends=../../include/string.h
depends=../../include/sys/mman.h depends=../../include/sys/mman.h
[time.c] [time.c]
depends=../../include/time.h,../drivers/clock.h depends=../../include/time.h,../../include/kernel/drivers/clock.h

View File

@ -5,7 +5,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "drivers/console.h" #include <kernel/drivers/console.h>
#if defined(__SSP__) #if defined(__SSP__)

View File

@ -6,7 +6,7 @@
#include <stddef.h> #include <stddef.h>
#include <time.h> #include <time.h>
#include "drivers/clock.h" #include <kernel/drivers/clock.h>
/* functions */ /* functions */

View File

@ -7,7 +7,7 @@
#include <stddef.h> #include <stddef.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include "drivers/console.h" #include <kernel/drivers/console.h>
/* private */ /* private */

View File

@ -8,12 +8,12 @@
# include <stdint.h> # include <stdint.h>
# include <stdio.h> # include <stdio.h>
# include <string.h> # include <string.h>
# include <kernel/drivers/bus.h>
# include <kernel/drivers/console.h>
# include <kernel/drivers/display.h>
# include "arch/amd64/gdt.h" # include "arch/amd64/gdt.h"
# include "arch/i386/gdt.h" # include "arch/i386/gdt.h"
# include "drivers/boot/multiboot.h" # include "drivers/boot/multiboot.h"
# include "drivers/bus.h"
# include "drivers/console.h"
# include "drivers/display.h"
# ifndef LOADER_CONSOLE # ifndef LOADER_CONSOLE
# define LOADER_CONSOLE "uart" # define LOADER_CONSOLE "uart"

View File

@ -75,7 +75,7 @@ depends=../drivers/display/vga.c
depends=$(OBJDIR)../lib/libuKernel.a depends=$(OBJDIR)../lib/libuKernel.a
[multiboot.c] [multiboot.c]
depends=../drivers/boot/multiboot.h,../drivers/bus.h,../drivers/console.h depends=../drivers/boot/multiboot.h,../../include/kernel/drivers/bus.h,../../include/kernel/drivers/console.h
[start.S] [start.S]
depends=../arch/i386/intr.S,../arch/i386/loader.S depends=../arch/i386/intr.S,../arch/i386/loader.S

View File

@ -6,7 +6,6 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "drivers/bus.h"
#include "drivers/bus/tty.c" #include "drivers/bus/tty.c"

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "drivers/clock.h" #include <kernel/drivers/clock.h>
/* private */ /* private */

View File

@ -7,7 +7,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "drivers/console.h" #include <kernel/drivers/console.h>
/* private */ /* private */

View File

@ -45,7 +45,7 @@ depends=$(OBJDIR)crtbegin.o,$(OBJDIR)crtend.o,$(OBJDIR)start.o,$(OBJDIR)../src/l
depends=../src/drivers/bus.c,../src/drivers/bus/tty.c depends=../src/drivers/bus.c,../src/drivers/bus/tty.c
[console.c] [console.c]
depends=../src/drivers/console.h depends=../include/kernel/drivers/console.h
[crti.S] [crti.S]
depends=../src/common/crti.S,../src/arch/amd64/crti.S,../src/arch/i386/crti.S depends=../src/common/crti.S,../src/arch/amd64/crti.S,../src/arch/i386/crti.S