mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 19:36:47 +00:00
🔧 include上级文件夹时,统一采用<>来指定文件
This commit is contained in:
parent
d53c7bd1c7
commit
d0ddb73788
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -104,7 +104,10 @@
|
||||
"spinlock.h": "c",
|
||||
"stat.h": "c",
|
||||
"video.h": "c",
|
||||
"libm.h": "c"
|
||||
"libm.h": "c",
|
||||
"ahci.h": "c",
|
||||
"slab.h": "c",
|
||||
"boot_info.h": "c"
|
||||
},
|
||||
"C_Cpp.errorSquiggles": "Enabled",
|
||||
"esbonio.sphinx.confDir": ""
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../common/kprint.h"
|
||||
#include "../../driver/interrupt/apic/apic.h"
|
||||
#include <common/kprint.h>
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
|
||||
/**
|
||||
* @brief 发送ipi消息
|
||||
|
@ -3,9 +3,9 @@
|
||||
//
|
||||
#include "printk.h"
|
||||
#include "kprint.h"
|
||||
#include "../driver/multiboot2/multiboot2.h"
|
||||
#include "../mm/mm.h"
|
||||
#include "../process/spinlock.h"
|
||||
#include <driver/multiboot2/multiboot2.h>
|
||||
#include <mm/mm.h>
|
||||
#include <process/spinlock.h>
|
||||
|
||||
#include <driver/uart/uart.h>
|
||||
#include <driver/video/video.h>
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "acpi.h"
|
||||
#include "../../common/printk.h"
|
||||
#include "../../common/kprint.h"
|
||||
#include "../multiboot2/multiboot2.h"
|
||||
#include "../../mm/mm.h"
|
||||
#include <common/printk.h>
|
||||
#include <common/kprint.h>
|
||||
#include <driver/multiboot2/multiboot2.h>
|
||||
#include <mm/mm.h>
|
||||
|
||||
#define acpi_get_RSDT_entry_vaddr(phys_addr) (ACPI_DESCRIPTION_HEDERS_BASE + (phys_addr)-acpi_RSDT_entry_phys_base) // 获取RSDT entry的虚拟地址
|
||||
// #define acpi_get_XSDT_entry_vaddr(phys_addr) (ACPI_DESCRIPTION_HEDERS_BASE + (phys_addr)-acpi_XSDT_entry_phys_base) // 获取XSDT entry的虚拟地址
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../common/glib.h"
|
||||
#include "../../mm/mm.h"
|
||||
#include <common/glib.h>
|
||||
#include <mm/mm.h>
|
||||
|
||||
#define ACPI_ICS_TYPE_PROCESSOR_LOCAL_APIC 0
|
||||
#define ACPI_ICS_TYPE_IO_APIC 1
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ahci.h"
|
||||
#include "../../../common/kprint.h"
|
||||
#include "../../../mm/slab.h"
|
||||
#include <common/kprint.h>
|
||||
#include <mm/slab.h>
|
||||
#include <syscall/syscall.h>
|
||||
#include <syscall/syscall_num.h>
|
||||
|
||||
@ -23,6 +23,7 @@ static int ahci_find_cmdslot(HBA_PORT *port);
|
||||
|
||||
// 计算HBA_MEM的虚拟内存地址
|
||||
#define cal_HBA_MEM_VIRT_ADDR(device_num) (AHCI_MAPPING_BASE + (ul)(((struct pci_device_structure_general_device_t *)(ahci_devs[device_num]))->BAR5 - ((((struct pci_device_structure_general_device_t *)(ahci_devs[0]))->BAR5) & PAGE_2M_MASK)))
|
||||
|
||||
/**
|
||||
* @brief 初始化ahci模块
|
||||
*
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "../block_device.h"
|
||||
#include "../../pci/pci.h"
|
||||
#include "../../../mm/mm.h"
|
||||
#include <driver/disk/block_device.h>
|
||||
#include <driver/pci/pci.h>
|
||||
#include <mm/mm.h>
|
||||
|
||||
/**
|
||||
* @todo 加入io调度器(当操作系统实现了多进程之后要加入这个)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ata.h"
|
||||
#include "../../common/kprint.h"
|
||||
#include "../interrupt/apic/apic.h"
|
||||
#include <common/kprint.h>
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
|
||||
struct apic_IO_APIC_RTE_entry entry;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
|
||||
// ======== PIO端口定义 ========
|
||||
#define PORT_DISK0_DATA 0x1f0 // 数据
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
#include "stdint.h"
|
||||
#include <process/semaphore.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "8259A.h"
|
||||
#include "../../../common/printk.h"
|
||||
#include "../../../common/kprint.h"
|
||||
#include "../../../exception/gate.h"
|
||||
#include <common/printk.h>
|
||||
#include <common/kprint.h>
|
||||
#include <exception/gate.h>
|
||||
|
||||
// 导出定义在irq.c中的中段门表
|
||||
extern void (*interrupt_table[24])(void);
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../../common/glib.h"
|
||||
#include "../../../exception/irq.h"
|
||||
#include <common/glib.h>
|
||||
#include <exception/irq.h>
|
||||
|
||||
#define PIC_EOI 0x20
|
||||
#define PIC_master 0x20 /* IO base address for master PIC */
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "apic.h"
|
||||
#include "../../../common/kprint.h"
|
||||
#include "../../../common/printk.h"
|
||||
#include "../../../common/cpu.h"
|
||||
#include "../../../common/glib.h"
|
||||
#include "../../../exception/gate.h"
|
||||
#include "../../acpi/acpi.h"
|
||||
#include <common/kprint.h>
|
||||
#include <common/printk.h>
|
||||
#include <common/cpu.h>
|
||||
#include <common/glib.h>
|
||||
#include <exception/gate.h>
|
||||
#include <driver/acpi/acpi.h>
|
||||
|
||||
#include <exception/softirq.h>
|
||||
#include <process/process.h>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../../common/asm.h"
|
||||
#include "../../../process/ptrace.h"
|
||||
#include "../../../exception/irq.h"
|
||||
#include "../../../mm/mm.h"
|
||||
#include <common/asm.h>
|
||||
#include <process/ptrace.h>
|
||||
#include <exception/irq.h>
|
||||
#include <mm/mm.h>
|
||||
|
||||
#define APIC_SUCCESS 0
|
||||
#define APIC_E_NOTFOUND 1
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "ps2_keyboard.h"
|
||||
#include "../interrupt/apic/apic.h"
|
||||
#include "../../mm/mm.h"
|
||||
#include "../../mm/slab.h"
|
||||
#include "../../common/printk.h"
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
#include <mm/mm.h>
|
||||
#include <mm/slab.h>
|
||||
#include <common/printk.h>
|
||||
#include <filesystem/VFS/VFS.h>
|
||||
#include <process/wait_queue.h>
|
||||
#include <process/spinlock.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
|
||||
#define PS2_KEYBOARD_INTR_VECTOR 0x21 // 键盘的中断向量号
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "ps2_mouse.h"
|
||||
#include "../interrupt/apic/apic.h"
|
||||
#include "../../mm/mm.h"
|
||||
#include "../../mm/slab.h"
|
||||
#include "../../common/printk.h"
|
||||
#include "../../common/kprint.h"
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
#include <mm/mm.h>
|
||||
#include <mm/slab.h>
|
||||
#include <common/printk.h>
|
||||
#include <common/kprint.h>
|
||||
|
||||
static struct ps2_mouse_input_buffer *ps2_mouse_buf_ptr = NULL;
|
||||
static int c = 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
|
||||
#define PS2_MOUSE_INTR_VECTOR 0x2c // 鼠标的中断向量号
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "multiboot2.h"
|
||||
#include "assert.h"
|
||||
|
||||
#include "../../common/glib.h"
|
||||
#include "../../common/kprint.h"
|
||||
#include <common/glib.h>
|
||||
#include <common/kprint.h>
|
||||
uintptr_t multiboot2_boot_info_addr;
|
||||
unsigned int multiboot2_magic;
|
||||
unsigned int multiboot2_boot_info_size;
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
#include "../../common/boot_info.h"
|
||||
#include "../acpi/acpi.h"
|
||||
#include <common/boot_info.h>
|
||||
#include <driver/acpi/acpi.h>
|
||||
|
||||
/// @see Multiboot2 Specification version 2.0.pdf
|
||||
// 启动后,在 32 位内核进入点,机器状态如下:
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "pci.h"
|
||||
#include "../../common/kprint.h"
|
||||
#include "../../mm/slab.h"
|
||||
#include <common/kprint.h>
|
||||
#include <mm/slab.h>
|
||||
|
||||
static uint count_device_list = 0;
|
||||
static void pci_checkBus(uint8_t bus);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
#include "stdint.h"
|
||||
|
||||
#define PORT_PCI_CONFIG_ADDRESS 0xcf8
|
||||
|
@ -1 +1,17 @@
|
||||
#include "usb.h"
|
||||
#include <common/kprint.h>
|
||||
#include <driver/pci/pci.h>
|
||||
|
||||
#define MAX_USB_NUM 8 // pci总线上的usb设备的最大数量
|
||||
|
||||
// 在pci总线上寻找到的usb设备控制器的header
|
||||
struct pci_device_structure_header_t *usb_pdevs[MAX_USB_NUM];
|
||||
|
||||
/**
|
||||
* @brief 初始化usb驱动程序
|
||||
*
|
||||
*/
|
||||
void usb_init()
|
||||
{
|
||||
kinfo("Initializing usb driver...");
|
||||
}
|
@ -1 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
// usb设备在pci总线上的class
|
||||
#define USB_CLASS 0xC
|
||||
#define USB_SUBCLASS 0x3
|
||||
|
||||
// 不同的usb设备在pci总线上的prog IF
|
||||
#define USB_TYPE_UHCI 0x0
|
||||
#define USB_TYPE_OHCI 0x10
|
||||
#define USB_TYPE_EHCI 0x20
|
||||
#define USB_TYPE_XHCI 0x30
|
||||
#define USB_TYPE_UNSPEC 0x80 // Unspecified
|
||||
#define USB_TYPE_DEVICE 0xfe // USB Device(Not controller)
|
||||
|
||||
/**
|
||||
* @brief 初始化usb驱动程序
|
||||
*
|
||||
*/
|
||||
void usb_init();
|
@ -9,7 +9,7 @@
|
||||
#ifndef __GATE_H__
|
||||
#define __GATE_H__
|
||||
|
||||
#include "../common/kprint.h"
|
||||
#include <common/kprint.h>
|
||||
#include <mm/mm.h>
|
||||
|
||||
//描述符表的结构体
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
// 对进行
|
||||
#if _INTR_8259A_
|
||||
#include "../driver/interrupt/8259A/8259A.h"
|
||||
#include <driver/interrupt/8259A/8259A.h>
|
||||
#else
|
||||
#include "../driver/interrupt/apic/apic.h"
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
#endif
|
||||
|
||||
#include "../common/asm.h"
|
||||
#include "../common/printk.h"
|
||||
#include <common/asm.h>
|
||||
#include <common/printk.h>
|
||||
#include "gate.h"
|
||||
#include <mm/slab.h>
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
|
||||
#include "../process/ptrace.h"
|
||||
#include <process/ptrace.h>
|
||||
|
||||
#define SMP_IRQ_NUM 10
|
||||
#define LOCAL_APIC_IRQ_NUM 10
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "trap.h"
|
||||
#include "gate.h"
|
||||
#include "../process/ptrace.h"
|
||||
#include "../common/kprint.h"
|
||||
#include <process/ptrace.h>
|
||||
#include <common/kprint.h>
|
||||
#include <process/process.h>
|
||||
#include <debug/traceback/traceback.h>
|
||||
|
||||
|
@ -8,9 +8,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../common/printk.h"
|
||||
#include "../common/glib.h"
|
||||
#include "../common/asm.h"
|
||||
#include <common/printk.h>
|
||||
#include <common/glib.h>
|
||||
#include <common/asm.h>
|
||||
|
||||
/**
|
||||
* @brief 初始化系统中断表
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "mm.h"
|
||||
#include "slab.h"
|
||||
#include "../common/printk.h"
|
||||
#include "../common/kprint.h"
|
||||
#include "../driver/multiboot2/multiboot2.h"
|
||||
#include <common/printk.h>
|
||||
#include <common/kprint.h>
|
||||
#include <driver/multiboot2/multiboot2.h>
|
||||
#include <process/process.h>
|
||||
|
||||
ul Total_Memory = 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
|
||||
// 每个页表的项数
|
||||
// 64位下,每个页表4k,每条页表项8B,故一个页表有512条
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "mm.h"
|
||||
#include "../common/glib.h"
|
||||
#include "../common/printk.h"
|
||||
#include "../common/kprint.h"
|
||||
#include <common/glib.h>
|
||||
#include <common/printk.h>
|
||||
#include <common/kprint.h>
|
||||
|
||||
#define SIZEOF_LONG_ALIGN(size) ((size + sizeof(long) - 1) & ~(sizeof(long) - 1))
|
||||
#define SIZEOF_INT_ALIGN(size) ((size + sizeof(int) - 1) & ~(sizeof(int) - 1))
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "process.h"
|
||||
|
||||
#include "../exception/gate.h"
|
||||
#include "../common/printk.h"
|
||||
#include "../common/kprint.h"
|
||||
#include "../syscall/syscall.h"
|
||||
#include "../syscall/syscall_num.h"
|
||||
#include <exception/gate.h>
|
||||
#include <common/printk.h>
|
||||
#include <common/kprint.h>
|
||||
#include <syscall/syscall.h>
|
||||
#include <syscall/syscall_num.h>
|
||||
#include <mm/slab.h>
|
||||
#include <sched/sched.h>
|
||||
#include <filesystem/fat32/fat32.h>
|
||||
|
@ -10,10 +10,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../common/cpu.h"
|
||||
#include "../common/glib.h"
|
||||
#include "../mm/mm.h"
|
||||
#include "../syscall/syscall.h"
|
||||
#include <common/cpu.h>
|
||||
#include <common/glib.h>
|
||||
#include <mm/mm.h>
|
||||
#include <syscall/syscall.h>
|
||||
#include "ptrace.h"
|
||||
#include <common/errno.h>
|
||||
#include <filesystem/VFS/VFS.h>
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "smp.h"
|
||||
#include "../common/kprint.h"
|
||||
#include "../driver/interrupt/apic/apic.h"
|
||||
#include "../exception/gate.h"
|
||||
#include "../common/cpu.h"
|
||||
#include "../mm/slab.h"
|
||||
#include "../process/process.h"
|
||||
#include "../process/spinlock.h"
|
||||
#include <common/kprint.h>
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
#include <exception/gate.h>
|
||||
#include <common/cpu.h>
|
||||
#include <mm/slab.h>
|
||||
#include <process/process.h>
|
||||
#include <process/spinlock.h>
|
||||
|
||||
#include <sched/sched.h>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include "../common/glib.h"
|
||||
#include <common/glib.h>
|
||||
|
||||
#include "../common/asm.h"
|
||||
#include "../driver/acpi/acpi.h"
|
||||
#include "../driver/interrupt/apic/apic.h"
|
||||
#include <common/asm.h>
|
||||
#include <driver/acpi/acpi.h>
|
||||
#include <driver/interrupt/apic/apic.h>
|
||||
|
||||
#define MAX_SUPPORTED_PROCESSOR_NUM 1024
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "syscall.h"
|
||||
#include "../process/process.h"
|
||||
#include <process/process.h>
|
||||
#include <exception/gate.h>
|
||||
#include <exception/irq.h>
|
||||
#include <driver/disk/ahci/ahci.h>
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "../common/glib.h"
|
||||
#include "../common/kprint.h"
|
||||
#include "../process/ptrace.h"
|
||||
#include <common/glib.h>
|
||||
#include <common/kprint.h>
|
||||
#include <process/ptrace.h>
|
||||
#include <common/unistd.h>
|
||||
// 定义最大系统调用数量
|
||||
#define MAX_SYSTEM_CALL_NUM 256
|
||||
|
Loading…
x
Reference in New Issue
Block a user