Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: get "struct device" out of pics



M.Drochner%fz-juelich.de@localhost said:
> The amd64 asm bits are missing

Here is the amd64 part (untested).
It is certainly possible to sqeeze out at least one
of the added instructions per macro by using another
register for the ioapic pointer (and even more by
moving common code up to the INTRSTUB definition),
but for now I didn't want to mess with register
usage too much, and kept it similar to i386 because
the latter is tested.

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
#
# old_revision [7d27a0c7499d816af7fb364f08ccdb4bfe8366a6]
#
# patch "sys/arch/amd64/amd64/genassym.cf"
#  from [a935094a0c66449a8c7941ffd43788f77d53838d]
#    to [ea1eb32568b467c8c3030ebadf6352fc55ccf1f4]
# 
# patch "sys/arch/amd64/include/i82093reg.h"
#  from [e14cd7778c443db22bd7a38c9ec5344dba861c7a]
#    to [0571bc58efafce432cebab8a75c01d95a17e4647]
#
============================================================
--- sys/arch/amd64/amd64/genassym.cf    a935094a0c66449a8c7941ffd43788f77d53838d
+++ sys/arch/amd64/amd64/genassym.cf    ea1eb32568b467c8c3030ebadf6352fc55ccf1f4
@@ -278,6 +278,7 @@ if NIOAPIC > 0
 define ACPI_SUSPEND_CR8        offsetof(struct cpu_info, ci_suspend_cr8)
 
 if NIOAPIC > 0
+define         PIC_IOAPIC              offsetof(struct pic, pic_ioapic)
 define         IOAPIC_SC_REG           offsetof(struct ioapic_softc, sc_reg)
 define         IOAPIC_SC_DATA          offsetof(struct ioapic_softc, sc_data)
 define         PIC_LOCK                offsetof(struct pic, pic_lock)
============================================================
--- sys/arch/amd64/include/i82093reg.h  e14cd7778c443db22bd7a38c9ec5344dba861c7a
+++ sys/arch/amd64/include/i82093reg.h  0571bc58efafce432cebab8a75c01d95a17e4647
@@ -44,12 +44,14 @@ 78:
        ioapic_asm_lock(num)                                    ;\
        movl    IS_PIN(%r14),%esi                               ;\
        leaq    0x10(%rsi,%rsi,1),%rsi                          ;\
+       movq    PIC_IOAPIC(%rdi),%rdi                           ;\
        movq    IOAPIC_SC_REG(%rdi),%r15                        ;\
        movl    %esi, (%r15)                                    ;\
        movq    IOAPIC_SC_DATA(%rdi),%r15                       ;\
        movl    (%r15),%esi                                     ;\
        orl     $IOAPIC_REDLO_MASK,%esi                         ;\
        movl    %esi,(%r15)                                     ;\
+       movq    IS_PIC(%r14),%rdi                               ;\
        ioapic_asm_unlock(num)
 
 #define ioapic_unmask(num) \
@@ -59,6 +61,7 @@ 78:
        ioapic_asm_lock(num)                                    ;\
        movl    IS_PIN(%r14),%esi                               ;\
        leaq    0x10(%rsi,%rsi,1),%rsi                          ;\
+       movq    PIC_IOAPIC(%rdi),%rdi                           ;\
        movq    IOAPIC_SC_REG(%rdi),%r15                        ;\
        movq    IOAPIC_SC_DATA(%rdi),%r13                       ;\
        movl    %esi, (%r15)                                    ;\
@@ -66,6 +69,7 @@ 78:
        andl    $~IOAPIC_REDLO_MASK,%r12d                       ;\
        movl    %esi,(%r15)                                     ;\
        movl    %r12d,(%r13)                                    ;\
+       movq    IS_PIC(%r14),%rdi                               ;\
        ioapic_asm_unlock(num)                                  ;\
 79:
 


Home | Main Index | Thread Index | Old Index