From ee265c87673cff4aaa8a785ece0e6c249a13cb1f Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sun, 21 Aug 2022 19:13:48 +0200 Subject: [PATCH] ZealBooter: Move sys_pci_buses assignment to zealbooter.c --- src/Kernel/KStart16.ZC | 3 +-- src/Kernel/KStart32.ZC | 1 - src/Kernel/MultiProc.ZC | 1 - zealbooter/zealbooter.c | 2 ++ 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Kernel/KStart16.ZC b/src/Kernel/KStart16.ZC index 0c365d1b..32b47e61 100755 --- a/src/Kernel/KStart16.ZC +++ b/src/Kernel/KStart16.ZC @@ -33,7 +33,7 @@ MEM_E820:: DU8 MEM_E820_ENTRIES_NUM * sizeof(CMemE820) DUP (0); MEM_PHYSICAL_SPACE:: DU64 0; SYS_GDT_PTR:: DU16 sizeof(CGDT) - 1; DU64 0; -SYS_PCI_BUSES:: DU16 256; +SYS_PCI_BUSES:: DU16 0; ALIGN 16, OC_NOP @@ -54,7 +54,6 @@ SYS_FONT_PTR:: DU32 0; SYS_VBE_INFO:: DU8 sizeof(CVBEInfo) DUP(0); SYS_VBE_MODES:: DU8 sizeof(CVBEModeShort) * VBE_MODES_NUM DUP(0); - SYS_VBE_FINAL_MODE:: DU8 sizeof(CVBEMode) DUP(0); SYS_VBE_FINAL_MODE_NUM::DU16 0; //mode number of final mode set #assert $$ - SYS_KERNEL == sizeof(CKernel) - sizeof(CZXE) diff --git a/src/Kernel/KStart32.ZC b/src/Kernel/KStart32.ZC index bfcc0b01..de374c30 100755 --- a/src/Kernel/KStart32.ZC +++ b/src/Kernel/KStart32.ZC @@ -105,7 +105,6 @@ CORE0_32BIT_INIT:: //Entry point for $LK,"BootRAM",A="MN:BootRAM"$. //Patch abs addresses MOV ECX, U32 CPatchTableAbsAddr.abs_address_count[ESI] LEA ESI, U32 CPatchTableAbsAddr.abs_address[ESI] - @@05: LODSD ADD EAX, EDI ADD U32 [EAX], EDI diff --git a/src/Kernel/MultiProc.ZC b/src/Kernel/MultiProc.ZC index 2b4f2e44..9a7c7cf3 100755 --- a/src/Kernel/MultiProc.ZC +++ b/src/Kernel/MultiProc.ZC @@ -193,7 +193,6 @@ U0 MPAPICInit() RAXSet(Gs->tss->tr); LTR AX - if (Gs->num) { IntInit1; diff --git a/zealbooter/zealbooter.c b/zealbooter/zealbooter.c index 0a7ed164..0c1b4fce 100644 --- a/zealbooter/zealbooter.c +++ b/zealbooter/zealbooter.c @@ -215,6 +215,8 @@ void _start(void) { CKernel->sys_gdt_ptr.base = (void *)&CKernel->sys_gdt - (uintptr_t)kernel->address; CKernel->sys_gdt_ptr.base += final_address; + CKernel->sys_pci_buses = 256; + struct E801 E801 = get_E801(); CKernel->mem_E801[0] = E801.lowermem; CKernel->mem_E801[1] = E801.uppermem;