diff --git a/Makefile b/Makefile index eb556e1..56b822f 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ KernSources = kernel/ke/cpuid.c kernel/mm/paging.c \ kernel/sh/musage.c kernel/io/ata.c \ kernel/sh/argv.c kernel/ke/pit.c \ kernel/sh/testcmds.c kernel/mm/palloc.c \ - kernel/io/acpi.c + kernel/io/acpi.c kernel/io/pci.c KernObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(KernSources)) KernDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(KernSources)) @@ -228,7 +228,6 @@ $(KOBJDIR)/kernel/io/ata.o: $(KALEIDDIR)/kernel/io/ata.c \ @rm -f $@.1 $@.2 @echo ${CL2}[$@] ${CL}Compiled.${CL3} - ## DEPENDENCIES MAKEFILE ----------------------------------------------------- # $(KOBJDIR)/%.d: %.c | $(KOBJDIR) diff --git a/include/io/pci.h b/include/io/pci.h new file mode 100644 index 0000000..08c6ade --- /dev/null +++ b/include/io/pci.h @@ -0,0 +1,38 @@ +//----------------------------------------------------------------------------// +// GNU GPL OS/K // +// // +// Desc: // +// // +// // +// Copyright © 2018-2020 The OS/K Team // +// // +// This file is part of OS/K. // +// // +// OS/K is free software: you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation, either version 3 of the License, or // +// any later version. // +// // +// OS/K is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY//without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with OS/K. If not, see . // +//----------------------------------------------------------------------------// + + +#ifndef _KERNEL_H +#include +#endif + + +#ifndef _IO_PCI_H +#define _IO_PCI_H + + +void pciGetDevice(ushort vendorID, ushort deviceID, int deviceType); + + +#endif diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index 40ddcf9..ba93cab 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -38,6 +38,8 @@ #include #include +#include + // // Entry point of the Kaleid kernel // @@ -91,7 +93,9 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) KernLog("Copyright (C) 2018-2020 The OS/K Team\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "This is free software, type `ver' for details.\n"); - + + pciGetDevice(0,0,0); + ShStartShell(); //KeCrashSystem(); diff --git a/kaleid/kernel/io/pci.c b/kaleid/kernel/io/pci.c new file mode 100644 index 0000000..aaf1317 --- /dev/null +++ b/kaleid/kernel/io/pci.c @@ -0,0 +1,36 @@ +//----------------------------------------------------------------------------// +// GNU GPL OS/K // +// // +// Desc: // +// // +// // +// Copyright © 2018-2020 The OS/K Team // +// // +// This file is part of OS/K. // +// // +// OS/K is free software: you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation, either version 3 of the License, or // +// any later version. // +// // +// OS/K is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY//without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with OS/K. If not, see . // +//----------------------------------------------------------------------------// + + +#include +#include + + +void pciGetDevice(ushort vendorID, ushort deviceID, int deviceType) +{ + if(IoGetAcpiTable(SDT_MCFG) == NULL) + { + KernLog("Unable to access PCI configuration : MCFG table not reachable\n"); + } +}