Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cscope.*
*.debug
Makeconf.local
.DS_Store
*.swp
drivers/acpi/acpica/source/
third-party/libpfm/COPYING
third-party/libpfm/Makefile
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ COMMON_FLAGS += -DKTF_ACPICA
endif

AFLAGS := $(COMMON_FLAGS) -D__ASSEMBLY__ -nostdlib -nostdinc
CFLAGS := $(COMMON_FLAGS) -std=gnu99 -O3 -g -Wall -Wextra -ffreestanding -nostdlib -nostdinc
CFLAGS := $(COMMON_FLAGS) -std=gnu99 -O2 -g -Wall -Wextra -ffreestanding -nostdlib -nostdinc
CFLAGS += -mno-red-zone -mno-mmx -mno-sse -mno-sse2
CFLAGS += -fno-stack-protector -fno-exceptions -fno-builtin -fomit-frame-pointer -fcf-protection="none"
CFLAGS += -mcmodel=kernel -fno-pic -fno-asynchronous-unwind-tables -fno-unwind-tables
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void init_apic(unsigned int cpu, apic_mode_t mode) {
* X2APIC uses MSRs for accesses, so no mapping needed.
*/
if (apic_mode == APIC_MODE_XAPIC)
vmap_4k(apic_get_base(apic_base), apic_base.base, L1_PROT);
vmap_4k(apic_get_base(apic_base), apic_base.base, L1_PROT_NOCACHE);

spiv.reg = apic_read(APIC_SPIV);
spiv.vector = 0xFF;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/ioapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ ioapic_t *add_ioapic(uint8_t id, uint8_t version, bool enabled, uint64_t base_ad
ioapic->gsi_base = gsi_base;

ioapic->virt_address = vmap_4k(paddr_to_virt(ioapic->base_address),
paddr_to_mfn(ioapic->base_address), L1_PROT);
paddr_to_mfn(ioapic->base_address), L1_PROT_NOCACHE);
BUG_ON(!ioapic->virt_address);

return ioapic;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bool init_hpet(uint8_t dst_cpus) {
#endif

hpet_base_mfn = paddr_to_mfn(address);
vmap_4k(_ptr(address), hpet_base_mfn, L1_PROT);
vmap_4k(_ptr(address), hpet_base_mfn, L1_PROT_NOCACHE);
config = (acpi_hpet_timer_t *) (address + HPET_OFFSET_TIMER_0_CONFIG_CAP_REG);
general = (acpi_hpet_general_t *) (address + HPET_OFFSET_GENERAL_CAP_REG);
main_counter = (uint64_t *) (address + HPET_OFFSET_GENERAL_MAIN_COUNTER_REG);
Expand Down
6 changes: 3 additions & 3 deletions drivers/vga.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void vga_write(void *vga_memory, const char *buf, size_t len, vga_color_t color)
void map_vga_area(void) {
for (mfn_t vga_mfn = paddr_to_mfn(VGA_START_ADDR);
vga_mfn < paddr_to_mfn(VGA_END_ADDR); vga_mfn++) {
vmap_4k(mfn_to_virt(vga_mfn), vga_mfn, L1_PROT);
kmap_4k(vga_mfn, L1_PROT);
vmap_4k(mfn_to_virt(vga_mfn), vga_mfn, L1_PROT_NOCACHE);
kmap_4k(vga_mfn, L1_PROT_NOCACHE);
}
}
}
2 changes: 1 addition & 1 deletion include/mm/regions.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define EBDA_ADDR_ENTRY 0x40E

#define BIOS_ACPI_ROM_START 0xE0000
#define BIOS_ACPI_ROM_STOP 0xFFFFF
#define BIOS_ACPI_ROM_STOP 0x100000

#define BIOS_ROM_ADDR_START 0xF0000

Expand Down
2 changes: 1 addition & 1 deletion include/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct task {
void *arg;

unsigned long result;
} __aligned(PAGE_SIZE);
};
typedef struct task task_t;

/* External declarations */
Expand Down