mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 18:26:32 +00:00
O1能跑的代码
This commit is contained in:
@ -10,6 +10,8 @@
|
||||
#include <process/process.h>
|
||||
#include <sched/sched.h>
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize("O0")
|
||||
// 导出定义在irq.c中的中段门表
|
||||
extern void (*interrupt_table[24])(void);
|
||||
|
||||
@ -650,6 +652,7 @@ void apic_ioapic_edge_ack(ul irq_num) // 边沿触发
|
||||
*
|
||||
* @param irq_num
|
||||
*/
|
||||
|
||||
void apic_local_apic_edge_ack(ul irq_num)
|
||||
{
|
||||
// 向EOI寄存器写入0x00表示结束中断
|
||||
@ -660,6 +663,7 @@ void apic_local_apic_edge_ack(ul irq_num)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 读取指定类型的 Interrupt Control Structure
|
||||
*
|
||||
@ -734,4 +738,5 @@ void apic_make_rte_entry(struct apic_IO_APIC_RTE_entry *entry, uint8_t vector, u
|
||||
entry->destination.logical.logical_dest = dest_apicID;
|
||||
entry->destination.logical.reserved1 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma GCC pop_options
|
@ -4,6 +4,8 @@
|
||||
#include <common/kprint.h>
|
||||
#include <sched/sched.h>
|
||||
|
||||
// #pragma GCC push_options
|
||||
// #pragma GCC optimize("O0")
|
||||
uint64_t apic_timer_ticks_result = 0;
|
||||
|
||||
void apic_timer_enable(uint64_t irq_num)
|
||||
|
@ -10,6 +10,8 @@ extern uint64_t apic_timer_ticks_result;
|
||||
|
||||
#define APIC_TIMER_IRQ_NUM 151
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize("O0")
|
||||
/**
|
||||
* @brief 设置apic定时器的分频计数
|
||||
*
|
||||
@ -78,4 +80,6 @@ extern uint64_t apic_timer_ticks_result;
|
||||
* @brief 初始化local APIC定时器
|
||||
*
|
||||
*/
|
||||
void apic_timer_init();
|
||||
void apic_timer_init();
|
||||
|
||||
#pragma GCC optimize("O0")
|
Reference in New Issue
Block a user