1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

check MCFG

This commit is contained in:
Antoine Cure 2020-02-10 00:15:37 +01:00 committed by Administrator
parent e07ba93742
commit 5d892df34e
4 changed files with 80 additions and 3 deletions

View File

@ -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)

38
include/io/pci.h Normal file
View File

@ -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 <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------//
#ifndef _KERNEL_H
#include <kernel.h>
#endif
#ifndef _IO_PCI_H
#define _IO_PCI_H
void pciGetDevice(ushort vendorID, ushort deviceID, int deviceType);
#endif

View File

@ -38,6 +38,8 @@
#include <po/shtdwn.h>
#include <init/boot.h>
#include <io/pci.h>
//
// Entry point of the Kaleid kernel
//
@ -92,6 +94,8 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
"This program comes with ABSOLUTELY NO WARRANTY.\n"
"This is free software, type `ver' for details.\n");
pciGetDevice(0,0,0);
ShStartShell();
//KeCrashSystem();

36
kaleid/kernel/io/pci.c Normal file
View File

@ -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 <https://www.gnu.org/licenses/>. //
//----------------------------------------------------------------------------//
#include <io/pci.h>
#include <io/acpi.h>
void pciGetDevice(ushort vendorID, ushort deviceID, int deviceType)
{
if(IoGetAcpiTable(SDT_MCFG) == NULL)
{
KernLog("Unable to access PCI configuration : MCFG table not reachable\n");
}
}