setos

拙OS
Log | Files | Refs | LICENSE

commit 905898fdce5117298a54c419e06fa984bfbca3a9
parent 51649e44e038c92b3ad3b2e0c2001a5e56998c22
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Wed,  1 May 2024 08:38:52 +0900

align DCBAAP

Diffstat:
Msys/src/kernel/main.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/src/kernel/main.c b/sys/src/kernel/main.c @@ -95,18 +95,18 @@ kernel_main(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop) goto halt; } xhc.op->CONFIG |= 1; // CONFIG.MaxSlotsEn - cons_printf(&con0, "CONFIG: %x\n", xhc.op->CONFIG); + cons_printf(&con0, "set CONFIG.MaxSlotsEn: %x\n", xhc.op->CONFIG); // TODO: align DCBAAP in 64-byte. - xhc_device_context *DCBAAP[2] = {0}; + // I don't like __attribute__ + xhc_device_context *DCBAAP[2] __attribute__((aligned(64))) = {0}; if (((uint64) DCBAAP&~(uint64)0x3f) != (uint64) DCBAAP) { cons_printf(&con0, "DCBAAP not aligned: %x\n", (uint64) DCBAAP); goto halt; } xhc_device_context device_context; DCBAAP[1] = &device_context; - cons_printf(&con0, "DCBAAP: %x\n", xhc.op->DCBAAP); - xhc.op->DCBAAP = (uint64) DCBAAP&~(uint64)0x3f; - cons_printf(&con0, "DCBAAP: %x\n", xhc.op->DCBAAP); + xhc.op->DCBAAP = (uint64) DCBAAP; + cons_printf(&con0, "DCBAAP set to: %x\n", xhc.op->DCBAAP); cons_printf(&con0, "local apic id: %x\n", *(uint32 *) (0xfee00020) >> 24); uintptr pci_config_base = (uintptr) pci_xhc;