Final pre-release
This commit is contained in:
58
diagrams/apic_enable_seq.puml
Normal file
58
diagrams/apic_enable_seq.puml
Normal file
@ -0,0 +1,58 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
title Apic::enable()
|
||||
|
||||
participant Apic
|
||||
participant Acpi
|
||||
participant LocalApic
|
||||
participant IoApic
|
||||
participant ApicErrorHandler
|
||||
participant ApicTimer
|
||||
|
||||
==Prepare Initialization==
|
||||
|
||||
group Create Devices
|
||||
Apic -[hidden]> ApicTimer
|
||||
Apic -> Acpi: Request system information
|
||||
Apic <- Acpi: Provide MADT structures
|
||||
Apic -> LocalApic ++: Instantiate LocalApic
|
||||
Apic -> IoApic ++: Instantiate IoApic
|
||||
end
|
||||
|
||||
group Initialize Local APIC
|
||||
Apic -[hidden]> ApicTimer
|
||||
Apic -> LocalApic: Enable xApic mode
|
||||
LocalApic -> LocalApic: Set IMCR
|
||||
LocalApic -> LocalApic: MMIO allocation
|
||||
==Actual Component Initialization==
|
||||
Apic -> LocalApic: Initialize current local APIC
|
||||
LocalApic -> LocalApic: Set LVT and NMI
|
||||
LocalApic -> LocalApic: Set spurious vector
|
||||
LocalApic -> LocalApic: Synchronize APR
|
||||
LocalApic -> LocalApic: Allow all priorities
|
||||
end
|
||||
|
||||
group Initialize I/O APIC
|
||||
Apic -[hidden]> ApicTimer
|
||||
Apic -> IoApic: Initialize I/O APIC
|
||||
IoApic -> IoApic: MMIO allocation
|
||||
IoApic -> IoApic: Set REDTBL, NMI
|
||||
end
|
||||
|
||||
group Initialize APIC error handler
|
||||
Apic -[hidden]> ApicTimer
|
||||
Apic -> ApicErrorHandler ++: Instantiate handler
|
||||
Apic -> ApicErrorHandler: Register the interrupt handler
|
||||
Apic -> LocalApic: Allow current error interrupt
|
||||
Apic -> LocalApic: Arm error interrupt
|
||||
end
|
||||
|
||||
group Initialize APIC timer
|
||||
Apic -[hidden]> ApicTimer
|
||||
Apic -> ApicTimer: Calibrate the timer
|
||||
Apic -> ApicTimer ++: Instantiate current timer
|
||||
Apic -> ApicTimer: Register current interrupt handler
|
||||
LocalApic <- ApicTimer: Allow current timer interrupt
|
||||
end
|
||||
@enduml
|
||||
1
diagrams/apic_enable_seq.svg
Normal file
1
diagrams/apic_enable_seq.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 20 KiB |
44
diagrams/apic_smp_enable_seq.puml
Normal file
44
diagrams/apic_smp_enable_seq.puml
Normal file
@ -0,0 +1,44 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
title Apic::startupSmp() for a single AP
|
||||
footer The Application Processor lifetime symbolizes the AP's expected online state for the xApic architecture.
|
||||
|
||||
participant Apic
|
||||
participant GDT as "AP GDT"
|
||||
participant Stack as "AP Stack"
|
||||
participant 0x8000 as "AP Boot Routine"
|
||||
participant LocalApic
|
||||
participant smp_entry as "Application Processor"
|
||||
|
||||
Apic -> GDT ++: Prepare AP GDT
|
||||
Apic -> Stack ++: Allocate AP stack
|
||||
|
||||
group Prepare AP Boot Routine
|
||||
Apic -[hidden]> smp_entry
|
||||
Apic -> 0x8000 ++: Allocate physical memory at 0x8000
|
||||
Apic -> Apic: Initialize smp_boot variables
|
||||
Apic -> 0x8000: Copy smp_boot to 0x8000
|
||||
end
|
||||
|
||||
Apic -> Apic: Prepare warm reset
|
||||
|
||||
group Universal Startup Algorithm
|
||||
Apic -> LocalApic: Send INIT IPI
|
||||
LocalApic -> smp_entry: INIT
|
||||
...10 ms...
|
||||
Apic -> LocalApic: Send SIPI
|
||||
LocalApic -> smp_entry ++: STARTUP
|
||||
...200 us...
|
||||
Apic -> LocalApic: Send SIPI
|
||||
LocalApic -> smp_entry: STARTUP
|
||||
...200 us...
|
||||
end
|
||||
|
||||
Apic <- smp_entry: Initialize AP's local APIC
|
||||
Apic <- smp_entry: Initialize AP's APIC timer
|
||||
Apic <- smp_entry: Initialize AP's APIC error handler
|
||||
Apic <- smp_entry: Signal boot completion
|
||||
Apic -> 0x8000 !!: Free physical memory at 0x8000
|
||||
|
||||
@enduml
|
||||
1
diagrams/apic_smp_enable_seq.svg
Normal file
1
diagrams/apic_smp_enable_seq.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 28 KiB |
19
diagrams/interrupt_seq.puml
Normal file
19
diagrams/interrupt_seq.puml
Normal file
@ -0,0 +1,19 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
title Interrupt Handler Execution
|
||||
footer The lifetimes symbolize the current code execution by the CPU.
|
||||
|
||||
participant main as "Main Thread"
|
||||
participant handler as "Interrupt Handler"
|
||||
|
||||
==Interrupt Request==
|
||||
activate main
|
||||
main -> handler --: Switch context to interrupt handler
|
||||
activate handler
|
||||
handler -> handler: Handle the interrupt
|
||||
main <- handler --: Switch back to previous context
|
||||
activate main
|
||||
==Interrupt Handled==
|
||||
|
||||
@enduml
|
||||
1
diagrams/interrupt_seq.svg
Normal file
1
diagrams/interrupt_seq.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.4 KiB |
Reference in New Issue
Block a user