| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
rbx was used to compute the irq index in iunit and ivect arrays,
however it should be preserved by pushing it in to the stack. As a
solution, we use rax instead, which is caller-saved.
Signed-off-by: Luca Dariz <luca@orpolo.org>
Message-Id: <20220205175129.309469-4-luca@orpolo.org>
|
|
|
|
|
|
| |
We shouldn't be needing that since we won't use a.out for 64bit, but using
address override in the multiboot header could be useful at least for
testing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: compile for native x86_64 by default instead of xen
* x86_64/Makefrag.am: introduce KERNEL_MAP_BASE to reuse the constant
in both code and linker script
* x86_64/ldscript: use a .boot section for the very first operations,
until we reach long mode. This section is not really allocated, so
it doesn't need to be freed later. The vm system is later
initialized starting from .text and not including .boot
* link kernel at 0x4000000 as the xen version, higher values causes
linker errors
* we can't use full segmentation in long mode, so we need to create a
temporary mapping during early boot to be able to jump to high
addresses
* build direct map for first 4G in boothdr, it seems required by Linux
drivers
* add INTEL_PTE_PS bit definition to enable 2MB pages during bootstrap
* ensure write bit is set in PDP entry access rights. This only
applies to PAE-enabled kernels, mandatory for x86_64. On xen
platform it seems to be handled differently
Signed-off-by: Luca Dariz <luca@orpolo.org>
Message-Id: <20220205175129.309469-2-luca@orpolo.org>
|
|
|
|
|
| |
* Makefrag.am (EXTRA_DIST): Ship the x86_64/x86_64 and
x86_64/include/mach/x86_64 symlinks.
|
|
|
|
|
| |
Otherwise we cannot use _DIST there and have them all taken into account.
As a consequence, we can drop duplicate _DIST between i386 and x86_64.
|
|
|
|
|
|
|
| |
* x86_64/Makefrag.am (include_mach_i386dir): Rename to include_mach_x86_64dir, set to $(includedir)/mach/x86_64.
(include_mach_i386_HEADERS): Rename to include_mach_x86_64_HEADERS.
Reported-by: Andrea Monaco <andrea.monaco@autistici.org>
|
|
|
|
| |
Message-Id: <20210405115921.184572-2-damien@zamaudio.com>
|
|
|
|
| |
Message-Id: <20210405052916.174771-4-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
* i386/i386at/boothdr.S (_eintstack): Add missing common.
* i386/xen/xen_boothdr.S (_eintstack): Add missing common.
* x86_64/xen/xen_boothdr.S (_eintstack): Add missing common.
* i386/i386/mp_desc.c (intstack, eintstack): Add missing underscore.
|
|
|
|
|
|
|
| |
Use --enable-ncpus=x --enable-apic where x > 1 for SMP+APIC support.
Use neither for no SMP and old PIC support.
Message-Id: <20210404050812.145483-1-damien@zamaudio.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* i386/i386/fpu.h (xgetbv, get_xcr0, xsetbv, set_xcr0): New inline
functions.
(xsave, xrstor): New macros.
* i386/i386/locore.S (cpu_features): Extend to two words.
(cpu_features_edx, cpu_features_ecx): New labels.
(discover_x86_cpu_type): Also save ecx cpuid(1) report.
* x86_64/locore.S: Likewise.
* i386/i386/locore.h (cpu_features): Extend to two words.
(CPU_FEATURE_XSAVE): New macro.
* i386/i386/proc_reg.h (CR4_OSXSAVE): New macro.
|
|
|
|
|
|
|
|
| |
We do not support shared IRQs for these, so avoid boot issues when
running on a system with more than 2 com ports.
* i386/configfrag.ac (ncom) [at:i?86]: Set to 2.
* x86_64/configfrag.ac (ncom) [at:x86_64]: Set to 2.
|
|
|
|
|
|
|
| |
* device/ds_routines.c (ds_device_intr_register, ds_device_intr_ack)
[__x86_64__]: Disable.
* x86_64/Makefrag.am (libkernel_a_SOURCES): Add i386/i386/irq.c and
i386/i386/irq.h.
|
|
|
|
|
|
|
| |
The addition of the mach_trap_name field made the 64bit unused field
spurious.
* kern/syscall_sw.h (mach_trap_t): Remove `unused' field.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the x86_64 configfrag would overwrite i386's.
* i386/configfrag.ac: Remove ncom, nlpr, pae, NCOM, NLPR, PAE
definitions.
* i386/configfrag.ac: Remove ncom, nlpr, NCOM, NLPR, PAE
definitions. Enable PAE.
* configfrag-first.ac: New file, defines ncom, nlpr, pae.
* configure.ac: Include configfrag-first.ac
* configfrag.ac: Define NCOM, NLPR, PAE.
|
|
|
|
|
| |
* x86_64/locore.S (dr6, dr0, dr1, dr2, dr3): Remove functions.
(dr_msk, dr_addr): Remove variables.
|
|
|
|
|
|
|
| |
See VM_MIN_KERNEL_ADDRESS.
* x86_64/Makefrag.am (gnumach_LINKFLAGS): Set _START to
_START_MAP+0x40000000 instead of +0xC0000000.
|
|
|
|
| |
* x86_64/Makefrag.am: Add instructions to build
|
|
|
|
| |
* x86_64/spl.S: fix instruction length
|
|
|
|
|
|
|
|
|
|
| |
* x86_64/configfrag.ac (ncom, nplr) [!at:x86_64]: Set to 0.
(ncom) [at:x86_64]: Set to 4.
(nlpr) [at:x86_64]: Set to 1.
(ATX86_64): Define to 1.
(NCOM): Define.
(NLPR): Define.
* configure.ac [at:x86_64]: Accept combination.
|
|
|
|
|
| |
* x86_64/kdasm.S (count): Fix type to 32bit.
(kd_slmscu, kd_slmscd): Fix getting count as 32bit.
|
|
|
|
|
| |
* i386/i386/idt.c (idt_init_entry): Set entrypoint type to unsigned long.
* x86_64/idt_inittab.S (IDT_ENTRY): Fix entry format accordingly.
|
|
|
|
| |
* x86_64/interrupt.S: New file.
|
|
|
|
|
|
| |
* i386/i386at/kdasm.S (start, count, value, from, to): Use B_ARG*
instead of reimplementing them.
* x86_64/kdasm.S: New file.
|
|
|
|
|
|
|
|
|
| |
Only Xen platform for now.
* Makefrag.am [HOST_x86_64]: Include x86_64/Makefrag.am.
* configure.ac: Include x86_64/configfrag.ac.
[default:x86_64] (host_platform): Set platform to xen.
* x86_64/Makefrag.am, x86_64/configfrag.ac: New files.
|
|
|
|
|
|
| |
This makes inclusions easier.
* x86_64/include/mach/x86_64, x86_64/x86_64: New symlinks.
|
|
|
|
| |
* x86_64/xen_boothdr.S, x86_64/xen_locore.S: New files.
|
|
|
|
| |
* x86_64/spl.S: New file.
|
|
|
|
| |
* x86_64/locore.S: New file.
|
|
|
|
| |
* x86_64/ldscript: New file.
|
|
|
|
| |
* x86_64/idt_inittab.S: New file.
|
|
|
|
| |
* x86_64/debug_trace.S: New file.
|
|
|
|
| |
* x86_64/cswitch.S: New file.
|
|
* x86_64/_setjmp.S: New file
* i386/i386/setjmp.h (jmp_buf): Add 64bit variant.
|