mem: adjust MMIO addresses
This commit is contained in:
parent
1aaeeda22d
commit
b90946e1f8
5 changed files with 8 additions and 4 deletions
|
|
@ -266,6 +266,7 @@ void ahci_init()
|
|||
}
|
||||
abar = (hbamem_t *)((uintptr_t)dev->bar5 | hhdm_start);
|
||||
|
||||
|
||||
if (!(abar->ghc & (1 << 31))) {
|
||||
printf(LOG_WARN "AHCI controller not enabled\n");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ struct pci_device {
|
|||
uint16_t vendor_id;
|
||||
uint16_t device_id;
|
||||
|
||||
uint16_t segment_group;
|
||||
|
||||
uint8_t header_type;
|
||||
|
||||
paddr32_t bar0;
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
#define PACKED __attribute__((packed))
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#define KB 1024
|
||||
#define MB (1024 * KB)
|
||||
#define GB (1024 * MB)
|
||||
#define KB (1024ull)
|
||||
#define MB (KB * KB)
|
||||
#define GB (KB * MB)
|
||||
|
||||
void yield();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#define PAGE_XD (1 << 64)
|
||||
#define PAGE_PRESENT (1 << 0)
|
||||
#define PAGE_RW (1 << 1)
|
||||
#define PAGE_PCD (1 << 4)
|
||||
#define PAGE_USERMODE (1 << 2)
|
||||
|
||||
#ifndef __ASM__
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <kernel/mem.h>
|
||||
#include <kernel/slab.h>
|
||||
|
||||
#define SLAB_MIN_COUNT 16
|
||||
#define SLAB_MIN_COUNT 128
|
||||
#define SLAB_MIN_SIZE 0x10000ull /* 64 KiB */
|
||||
#define SLAB_ALIGN 7
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue