Merge branch 'pci' into shell
This commit is contained in:
commit
cffb941feb
|
@ -0,0 +1,2 @@
|
|||
*.c linguist-language=C
|
||||
*.h linguist-language=C
|
|
@ -1,12 +0,0 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: os-k-team
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
53
Makefile
53
Makefile
|
@ -38,11 +38,13 @@ ASM=nasm
|
|||
LD=x86_64-elf-ld
|
||||
OBJCOPY=x86_64-elf-objcopy
|
||||
CCNAME=x86_64-elf-gcc
|
||||
|
||||
# Flags
|
||||
ASMFLAGS=-f elf64
|
||||
LDFLAGS=-melf_x86_64
|
||||
COPTIM=-O2
|
||||
CWARNS=-Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Werror=implicit-function-declaration -Werror=return-type #-Wpadded
|
||||
CINCLUDES=-Iinclude
|
||||
CINCLUDES=-Iinclude -Iinclude/drivers -Iinclude/kernel
|
||||
CFLAGS1=-nostdlib -ffreestanding -mcmodel=large -std=gnu11 -fstack-protector-all -fdump-rtl-expand
|
||||
CFLAGS2= -c -mno-red-zone -mno-mmx -mno-sse -mno-sse2
|
||||
CFLAGS= $(CFLAGS1) $(CFLAGS2)
|
||||
|
@ -50,12 +52,15 @@ CFLAGS_MATHS= $(CFLAGS1) -c -mno-red-zone -mno-mmx
|
|||
|
||||
ifeq ($(mode), release)
|
||||
CFLAGS += -D_NO_DEBUG
|
||||
CFLAGS_MATHS += -D_NO_DEBUG
|
||||
dep += dust
|
||||
endif
|
||||
ifeq ($(mode), debug)
|
||||
CFLAGS += -g
|
||||
CFLAGS_MATHS += -g
|
||||
endif
|
||||
|
||||
# GCC
|
||||
KCC=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS) $(CINCLUDES) \
|
||||
-D_OSK_SOURCE -D_KALEID_KERNEL
|
||||
|
||||
|
@ -66,7 +71,6 @@ KCC_MATHS=$(CCNAME) $(COPTIM) $(CWARNS) $(CFLAGS_MATHS) $(CINCLUDES) \
|
|||
MBRDIR=boot/grub
|
||||
LOADERDIR=boot/loader
|
||||
KALEIDDIR=kaleid
|
||||
INCLUDEDIR=include
|
||||
OBJDIR=build/obj
|
||||
KOBJDIR=build/obj/kaleid
|
||||
LOBJDIR=build/obj/boot
|
||||
|
@ -113,14 +117,25 @@ KernSources = kernel/ke/cpuid.c kernel/mm/paging.c \
|
|||
kernel/ke/rtc.c kernel/io/keyb.c \
|
||||
kernel/io/spkr.c kernel/po/shtdwn.c \
|
||||
kernel/sh/shell.c kernel/sh/shcmds.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/pci.c
|
||||
kernel/sh/musage.c kernel/sh/argv.c \
|
||||
kernel/ke/pit.c kernel/sh/testcmds.c \
|
||||
kernel/mm/palloc.c kernel/io/acpi.c \
|
||||
kernel/io/pci.c
|
||||
|
||||
KernObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(KernSources))
|
||||
KernDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(KernSources))
|
||||
|
||||
# Drivers sources
|
||||
DriverSources = drivers/ata.c
|
||||
|
||||
DriverObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(DriverSources))
|
||||
DriverDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(DriverSources))
|
||||
|
||||
-include $(LibCDep)
|
||||
-include $(KernDep)
|
||||
-include $(DriverDep)
|
||||
|
||||
|
||||
## MISC MAKEFILE ------------------------------------------------------------- #
|
||||
|
||||
./ProjectTree: ./.stylehlp_sh
|
||||
|
@ -137,17 +152,14 @@ wc:
|
|||
@cat $(shell find -name *.[ch]) $(shell find -name *.asm) $(shell find -name *.inc) | wc -l
|
||||
|
||||
egypt: CFLAGS := -DNDEBUG $(filter-out -fstack-protector-all,$(CFLAGS))
|
||||
egypt: dust $(LibCObj) $(KernObj)
|
||||
egypt: dust $(LibCObj) $(KernObj) $(DriverObj)
|
||||
@find -name '*.expand' -o -name '*.expand' | xargs cat > rtl_exp.out
|
||||
@egypt < rtl_exp.out | dot -Tps -o osk-graph.ps
|
||||
@rm -f rtl_exp.out
|
||||
@evince osk-graph.ps &
|
||||
|
||||
|
||||
## LIB C MAKEFILE ------------------------------------------------------------ #
|
||||
|
||||
-include $(LibCDep)
|
||||
|
||||
$(KOBJDIR)/libc/atoi.o: $(KALEIDDIR)/libc/atoi.c | $(KOBJDIR)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(KCC) -D_NEED_ATOI $< -o $@.1
|
||||
|
@ -174,9 +186,7 @@ $(KOBJDIR)/libc/mem.o: $(KALEIDDIR)/libc/mem.c | $(KOBJDIR)
|
|||
@echo ${CL2}[$@] ${CL}Compiled.${CL3}
|
||||
|
||||
|
||||
## KERNEL MAKEFILE ----------------------------------------------------------- #
|
||||
|
||||
-include $(KernDep)
|
||||
## KERNEL SPECIAL RECIPES MAKEFILE ------------------------------------------- #
|
||||
|
||||
$(KOBJDIR)/kernel/ke/idt.o: $(KALEIDDIR)/kernel/ke/idt.c \
|
||||
$(KALEIDDIR)/kernel/ke/isr.asm | $(KOBJDIR)
|
||||
|
@ -219,15 +229,17 @@ $(KOBJDIR)/kernel/mm/gdt.o: $(KALEIDDIR)/kernel/mm/gdt.c \
|
|||
@rm -f $@.1 $@.2
|
||||
@echo ${CL2}[$@] ${CL}Compiled.${CL3}
|
||||
|
||||
$(KOBJDIR)/kernel/io/ata.o: $(KALEIDDIR)/kernel/io/ata.c \
|
||||
$(KALEIDDIR)/kernel/io/ata.asm | $(KOBJDIR)
|
||||
## DRIVERS SPECIAL RECIPES MAKEFILE ------------------------------------------ #
|
||||
|
||||
$(KOBJDIR)/drivers/ata.o: $(KALEIDDIR)/drivers/ata.c $(KALEIDDIR)/drivers/ata.asm | $(KOBJDIR)
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(ASM) $(ASMFLAGS) $(KALEIDDIR)/kernel/io/ata.asm -o $@.1
|
||||
@$(ASM) $(ASMFLAGS) $(KALEIDDIR)/drivers/ata.asm -o $@.1
|
||||
@$(KCC) $< -o $@.2
|
||||
@$(LD) $(LDFLAGS) -r $@.1 $@.2 -o $@
|
||||
@rm -f $@.1 $@.2
|
||||
@echo ${CL2}[$@] ${CL}Compiled.${CL3}
|
||||
|
||||
|
||||
## DEPENDENCIES MAKEFILE ----------------------------------------------------- #
|
||||
|
||||
$(KOBJDIR)/%.d: %.c | $(KOBJDIR)
|
||||
|
@ -235,7 +247,6 @@ $(KOBJDIR)/%.d: %.c | $(KOBJDIR)
|
|||
@$(KCC) -MM -MT $(@:%.d=%.o) -MF $@ $<
|
||||
@echo ${CL2}[$@] ${CL}Dependencies generated.${CL3}
|
||||
|
||||
|
||||
## MAIN MAKEFILE ------------------------------------------------------------- #
|
||||
|
||||
$(KOBJDIR)/%.o: %.c | $(KOBJDIR)
|
||||
|
@ -246,14 +257,16 @@ $(KOBJDIR)/%.o: %.c | $(KOBJDIR)
|
|||
$(BINDIR)/kaleid: $(LOBJDIR)/kaleid.x86_64
|
||||
@echo ${CL2}[$@] ${NC}Objcopy...${CL3}
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(OBJCOPY) -I elf64-x86-64 -O elf32-i386 $(LOBJDIR)/kaleid.x86_64 $(BINDIR)/kaleid
|
||||
@$(OBJCOPY) -I elf64-x86-64 -O elf32-i386 $(LOBJDIR)/kaleid.x86_64 \
|
||||
$(BINDIR)/kaleid
|
||||
@echo ${CL2}[$@] ${CL}Success.${CL3}
|
||||
|
||||
$(LOBJDIR)/kaleid.x86_64: $(LibCObj) $(KernObj) $(LOBJDIR)/loader.o $(BUILDDIR)/kernel.ld
|
||||
$(LOBJDIR)/kaleid.x86_64: $(LibCObj) $(KernObj) $(DriverObj) \
|
||||
$(LOBJDIR)/loader.o $(BUILDDIR)/kernel.ld
|
||||
@echo ${CL2}[$@] ${NC}Linking kernel objects...${CL3}
|
||||
@mkdir -p $(shell dirname $@)
|
||||
@$(LD) $(LDFLAGS) -T $(BUILDDIR)/kernel.ld \
|
||||
$(LOBJDIR)/loader.o $(KernObj) $(LibCObj) \
|
||||
$(LOBJDIR)/loader.o $(KernObj) $(DriverObj) $(LibCObj) \
|
||||
-o $(LOBJDIR)/kaleid.x86_64
|
||||
@echo ${CL2}[$@] ${CL}Success.${CL3}
|
||||
|
||||
|
|
80
ProjectTree
80
ProjectTree
|
@ -47,48 +47,52 @@
|
|||
│ ├── install-os-k.sh
|
||||
│ └── kernel.ld
|
||||
├── include
|
||||
│ ├── ex
|
||||
│ │ ├── lock.h
|
||||
│ │ └── malloc.h
|
||||
│ ├── init
|
||||
│ │ ├── boot.h
|
||||
│ │ └── mboot.h
|
||||
│ ├── io
|
||||
│ │ ├── acpi.h
|
||||
│ │ ├── ata.h
|
||||
│ │ ├── cursor.h
|
||||
│ │ ├── keyb.h
|
||||
│ │ ├── pci.h
|
||||
│ │ ├── spkr.h
|
||||
│ │ └── vga.h
|
||||
│ ├── ke
|
||||
│ │ ├── cpuid.h
|
||||
│ │ ├── idt.h
|
||||
│ │ ├── proc.h
|
||||
│ │ ├── sched.h
|
||||
│ │ ├── spinlock.h
|
||||
│ │ └── time.h
|
||||
│ ├── lib
|
||||
│ │ ├── buf.h
|
||||
│ │ └── list.h
|
||||
│ ├── mm
|
||||
│ │ ├── gdt.h
|
||||
│ │ ├── heap.h
|
||||
│ │ ├── malloc.h
|
||||
│ │ ├── map.h
|
||||
│ │ ├── paging.h
|
||||
│ │ └── palloc.h
|
||||
│ ├── po
|
||||
│ │ └── shtdwn.h
|
||||
│ ├── sh
|
||||
│ │ ├── argv.h
|
||||
│ │ └── shell.h
|
||||
│ ├── drivers
|
||||
│ │ └── ata.h
|
||||
│ ├── kernel
|
||||
│ │ ├── ex
|
||||
│ │ │ ├── lock.h
|
||||
│ │ │ └── malloc.h
|
||||
│ │ ├── init
|
||||
│ │ │ ├── boot.h
|
||||
│ │ │ └── mboot.h
|
||||
│ │ ├── io
|
||||
│ │ │ ├── acpi.h
|
||||
│ │ │ ├── cursor.h
|
||||
│ │ │ ├── keyb.h
|
||||
│ │ │ ├── pci.h
|
||||
│ │ │ ├── spkr.h
|
||||
│ │ │ └── vga.h
|
||||
│ │ ├── ke
|
||||
│ │ │ ├── cpuid.h
|
||||
│ │ │ ├── idt.h
|
||||
│ │ │ ├── proc.h
|
||||
│ │ │ ├── sched.h
|
||||
│ │ │ ├── spinlock.h
|
||||
│ │ │ └── time.h
|
||||
│ │ ├── mm
|
||||
│ │ │ ├── gdt.h
|
||||
│ │ │ ├── heap.h
|
||||
│ │ │ ├── malloc.h
|
||||
│ │ │ ├── map.h
|
||||
│ │ │ ├── paging.h
|
||||
│ │ │ └── palloc.h
|
||||
│ │ ├── po
|
||||
│ │ │ └── shtdwn.h
|
||||
│ │ └── sh
|
||||
│ │ ├── argv.h
|
||||
│ │ └── shell.h
|
||||
│ ├── asm.h
|
||||
│ ├── errno.h
|
||||
│ ├── kernel.h
|
||||
│ ├── libbuf.h
|
||||
│ ├── libc.h
|
||||
│ ├── liblist.h
|
||||
│ └── vers.h
|
||||
├── kaleid
|
||||
│ ├── drivers
|
||||
│ │ ├── ata.asm
|
||||
│ │ └── ata.c
|
||||
│ ├── kernel
|
||||
│ │ ├── init
|
||||
│ │ │ ├── info.c
|
||||
|
@ -97,8 +101,6 @@
|
|||
│ │ │ └── table.c
|
||||
│ │ ├── io
|
||||
│ │ │ ├── acpi.c
|
||||
│ │ │ ├── ata.asm
|
||||
│ │ │ ├── ata.c
|
||||
│ │ │ ├── cursor.c
|
||||
│ │ │ ├── keyb.c
|
||||
│ │ │ ├── pci.c
|
||||
|
@ -164,4 +166,4 @@
|
|||
├── ProjectTree
|
||||
└── README.md
|
||||
|
||||
28 directories, 111 files
|
||||
30 directories, 111 files
|
||||
|
|
Binary file not shown.
|
@ -35,11 +35,18 @@
|
|||
//
|
||||
// Device registers offsets
|
||||
//
|
||||
#define PCI_REG_VENDOR 0
|
||||
#define PCI_REG_DEVICE 2
|
||||
#define PCI_REG_COMMAND 4
|
||||
#define PCI_REG_STATUS 6
|
||||
//..
|
||||
#define PCI_REG_VENDOR 0x00
|
||||
#define PCI_REG_DEVICE 0x02
|
||||
#define PCI_REG_COMMAND 0x04
|
||||
#define PCI_REG_STATUS 0x06
|
||||
#define PCI_REG_REVISION 0x08
|
||||
#define PCI_REG_PROGIF 0x09
|
||||
#define PCI_REG_SUBCLASS 0x0A
|
||||
#define PCI_REG_CLASS 0x0B
|
||||
#define PCI_REG_CACHE_LINE_SIZE 0x0C
|
||||
#define PCI_REG_LATENCY_TIMER 0x0D
|
||||
#define PCI_REG_HEADER_TYPE 0x0E
|
||||
#define PCI_REG_BIST 0x0F
|
||||
#define PCI_REG_BAR0 0x10
|
||||
#define PCI_REG_BAR1 0x14
|
||||
#define PCI_REG_BAR2 0x18
|
||||
|
@ -57,6 +64,10 @@
|
|||
struct PciDev_t {
|
||||
ushort vendorID;
|
||||
ushort deviceID;
|
||||
|
||||
uchar classID;
|
||||
uchar subclassID;
|
||||
|
||||
void* configAddr;
|
||||
};
|
||||
|
||||
|
@ -66,6 +77,7 @@ struct PciDev_t {
|
|||
void IoInitPCI();
|
||||
void IoPciEnumerate();
|
||||
PciDev_t *IoPciGetDevice(ushort vendorID, ushort deviceID);
|
||||
PciDev_t *IoPciGetDeviceByClass(uchar classID, uchar subclassID);
|
||||
|
||||
uchar IoPciReadConfigByte(PciDev_t *device, ushort offset);
|
||||
ushort IoPciReadConfigWord(PciDev_t *device, ushort offset);
|
|
@ -27,7 +27,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef _LIB_LIST_H
|
||||
#include <lib/list.h>
|
||||
#include <liblist.h>
|
||||
#endif
|
||||
|
||||
#ifndef _KALKERN_PROC_H
|
|
@ -27,7 +27,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef _LIB_LIST_H
|
||||
#include <lib/list.h>
|
||||
#include <liblist.h>
|
||||
#endif
|
||||
|
||||
#ifndef _MM_MALLOC_H
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <io/ata.h>
|
||||
#include <drivers/ata.h>
|
||||
#include <io/vga.h>
|
||||
|
||||
void IoDumpFirstSector(void)
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <io/keyb.h>
|
||||
#include <ke/idt.h>
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <mm/paging.h>
|
||||
|
||||
static void *pciConfigBaseAddress = NULL;
|
||||
static MCFG_t *MCFG_table = NULL;
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
|
@ -114,8 +115,11 @@ void IoPciEnumerate()
|
|||
for(uchar device = 0; device < 32; device++) {
|
||||
for(uchar function = 0; function < 8; function++) {
|
||||
ushort vendor = pciReadConfigWord((uchar)bus, device, function, PCI_REG_VENDOR);
|
||||
if(bus * device * function > MCFG_table->length) break;
|
||||
if(vendor == 0xffff) continue;
|
||||
DebugLog("PCI device vendor: %x, device: %x\n",
|
||||
DebugLog("PCI device class: %x, subclass: %x, vendor: %x, device: %x\n",
|
||||
pciReadConfigByte((uchar)bus, device, function, PCI_REG_CLASS),
|
||||
pciReadConfigByte((uchar)bus, device, function, PCI_REG_SUBCLASS),
|
||||
vendor,
|
||||
pciReadConfigWord((uchar)bus, device, function, PCI_REG_DEVICE)
|
||||
);
|
||||
|
@ -136,9 +140,38 @@ PciDev_t *IoPciGetDevice(ushort vendorID, ushort deviceID)
|
|||
for(uchar function = 0; function < 8; function++) {
|
||||
if(vendorID == pciReadConfigWord((uchar)bus, device, function, PCI_REG_VENDOR)
|
||||
&& deviceID == pciReadConfigWord((uchar)bus, device, function, PCI_REG_DEVICE)) {
|
||||
if(bus * device * function > MCFG_table->length) break;
|
||||
PciDev_t *pciDevicePtr = (PciDev_t *)malloc(sizeof(PciDev_t));
|
||||
pciDevicePtr->vendorID = vendorID;
|
||||
pciDevicePtr->deviceID = deviceID;
|
||||
pciDevicePtr->classID = pciReadConfigByte((uchar)bus, device, function, PCI_REG_CLASS);
|
||||
pciDevicePtr->subclassID = pciReadConfigByte((uchar)bus, device, function, PCI_REG_SUBCLASS);
|
||||
pciDevicePtr->configAddr = pciGetConfigAddr((uchar)bus, device, function, 0);
|
||||
return pciDevicePtr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PciDev_t *IoPciGetDeviceByClass(uchar classID, uchar subclassID)
|
||||
{
|
||||
if(pciConfigBaseAddress == NULL) {
|
||||
KeStartPanic("Unable to access PCI configuration : MCFG table not reachable\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for(ushort bus = 0; bus < 256; bus++) {
|
||||
for(uchar device = 0; device < 32; device++) {
|
||||
for(uchar function = 0; function < 8; function++) {
|
||||
if(classID == pciReadConfigByte((uchar)bus, device, function, PCI_REG_CLASS)
|
||||
&& subclassID == pciReadConfigByte((uchar)bus, device, function, PCI_REG_SUBCLASS)) {
|
||||
PciDev_t *pciDevicePtr = (PciDev_t *)malloc(sizeof(PciDev_t));
|
||||
pciDevicePtr->vendorID = pciReadConfigWord((uchar)bus, device, function, PCI_REG_VENDOR);
|
||||
pciDevicePtr->deviceID = pciReadConfigWord((uchar)bus, device, function, PCI_REG_DEVICE);
|
||||
pciDevicePtr->classID = classID;
|
||||
pciDevicePtr->subclassID = subclassID;
|
||||
pciDevicePtr->configAddr = pciGetConfigAddr((uchar)bus, device, function, 0);
|
||||
return pciDevicePtr;
|
||||
}
|
||||
|
@ -150,21 +183,23 @@ PciDev_t *IoPciGetDevice(ushort vendorID, ushort deviceID)
|
|||
|
||||
void IoInitPCI()
|
||||
{
|
||||
MCFG_t *MCFG_table = (MCFG_t*)IoGetAcpiTable(SDT_MCFG);
|
||||
MCFG_table = (MCFG_t*)IoGetAcpiTable(SDT_MCFG);
|
||||
if(MCFG_table == NULL) {
|
||||
KeStartPanic("Unable to access PCI configuration : MCFG table not reachable\n");
|
||||
}
|
||||
pciConfigBaseAddress = MCFG_table->pciConfigBaseAddress;
|
||||
DebugLog("PCI Config Base address = 0x%p\n", pciConfigBaseAddress);
|
||||
|
||||
IoPciEnumerate();
|
||||
|
||||
// Give R/W access to the configuration space
|
||||
int maxI = (256 * 32 * 8 * 4096) / KPAGESIZE;
|
||||
int maxI = (MCFG_table->length) / KPAGESIZE; // More secure,
|
||||
for(int i=0; i < maxI; i++)
|
||||
{
|
||||
// XXX verify that page is marked busy
|
||||
|
||||
MmMapPage((void *)((ulong)pciConfigBaseAddress + i * KPAGESIZE),
|
||||
(void *)((ulong)pciConfigBaseAddress + i * KPAGESIZE),
|
||||
PRESENT | READWRITE);
|
||||
}
|
||||
|
||||
IoPciEnumerate();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <io/spkr.h>
|
||||
#include <ke/time.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
extern bool KeIdtIsInitialized;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <init/boot.h>
|
||||
#include <io/cursor.h>
|
||||
#include <io/vga.h>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <init/boot.h>
|
||||
#include <ke/idt.h>
|
||||
#include <io/vga.h>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <kernel.h>
|
||||
#include <ke/time.h>
|
||||
#include <io/vga.h>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <ke/proc.h>
|
||||
#include <io/vga.h>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <ke/time.h>
|
||||
#include <ke/idt.h>
|
||||
#include <ke/sched.h>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <ke/time.h>
|
||||
#include <ke/idt.h>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <mm/heap.h>
|
||||
#include <mm/paging.h>
|
||||
#include <mm/map.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <io/vga.h>
|
||||
#include <ke/time.h>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <mm/palloc.h>
|
||||
#include <mm/map.h>
|
||||
#include <io/vga.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <ke/time.h>
|
||||
|
||||
//---------
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <asm.h>
|
||||
#include <ke/proc.h>
|
||||
#include <ke/sched.h>
|
||||
#include <lib/list.h>
|
||||
#include <liblist.h>
|
||||
#include <ke/time.h>
|
||||
|
||||
bool PsInitialized = false;
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
#include <vers.h>
|
||||
#include <mm/paging.h>
|
||||
#include <mm/map.h>
|
||||
#include <io/ata.h>
|
||||
#include <drivers/ata.h>
|
||||
#include <io/vga.h>
|
||||
#include <io/spkr.h>
|
||||
#include <ke/time.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <sh/shell.h>
|
||||
#include <po/shtdwn.h>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <io/vga.h>
|
||||
#include <io/keyb.h>
|
||||
#include <io/spkr.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <sh/argv.h>
|
||||
#include <sh/shell.h>
|
||||
#include <po/shtdwn.h>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <asm.h>
|
||||
#include <vers.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <ex/argv.h>
|
||||
#include <init/boot.h>
|
||||
#include <ke/time.h>
|
||||
|
@ -34,7 +34,7 @@
|
|||
#include <io/keyb.h>
|
||||
#include <po/shtdwn.h>
|
||||
#include <ke/cpuid.h>
|
||||
#include <io/ata.h>
|
||||
#include <drivers/ata.h>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
#include <mm/paging.h>
|
||||
#include <mm/palloc.h>
|
||||
#include <mm/map.h>
|
||||
#include <io/ata.h>
|
||||
#include <drivers/ata.h>
|
||||
#include <io/vga.h>
|
||||
#include <io/spkr.h>
|
||||
#include <ke/time.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <sh/shell.h>
|
||||
#include <po/shtdwn.h>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
//
|
||||
// Closes a buffer, not flushing unless the proper flag is set
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
//
|
||||
// Erases buf's content
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
#ifdef _KALEID_KERNEL
|
||||
#include <ke/time.h>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
// Straightforward functions
|
||||
int BGetFlags(Buffer_t *buf) { return buf->flags; }
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
#include <ex/malloc.h>
|
||||
|
||||
Buffer_t *BStdIn, *BStdOut, *BStdDbg;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
#ifdef _KALEID_KERNEL
|
||||
#include <io/vga.h>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
//
|
||||
// Writes a character on a buffer
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
#if 0
|
||||
error_t BReadBuf(Buffer_t *buf, uchar *out, size_t n)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//----------------------------------------------------------------------------//
|
||||
|
||||
#if 0
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
//
|
||||
// Builds string reading from buf according to fmt
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
void BEnableAutoScroll(Buffer_t *buf) { buf->flags |= BF_AUTOSCROLL; }
|
||||
void BDisableAutoScroll(Buffer_t *buf) { buf->flags &= ~BF_AUTOSCROLL; }
|
||||
|
|
|
@ -22,5 +22,5 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// along with OS/K. If not, see <https://www.gnu.org/licenses/>. //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
//
|
||||
// XXX
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <libc.h>
|
||||
#include <lib/buf.h>
|
||||
#include <libbuf.h>
|
||||
|
||||
long strtol(const char *str, char **endp, int base) {
|
||||
ulong n;
|
||||
|
|
Loading…
Reference in New Issue