mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
parent
237f6a6a62
commit
a149131dc2
@ -1,5 +1,9 @@
|
|||||||
assert_spec x86
|
assert_spec x86
|
||||||
|
|
||||||
|
set ::env(MAKEFLAGS) s
|
||||||
|
set path_microcode "[exec [genode_dir]/tool/ports/current microcode_intel]/src/app/intel/intel-ucode"
|
||||||
|
set microcode_files [glob -nocomplain -dir $path_microcode *-*-*]
|
||||||
|
|
||||||
if { [get_cmd_switch --autopilot] } {
|
if { [get_cmd_switch --autopilot] } {
|
||||||
|
|
||||||
if {[have_include "power_on/qemu"]} {
|
if {[have_include "power_on/qemu"]} {
|
||||||
@ -9,8 +13,23 @@ if { [get_cmd_switch --autopilot] } {
|
|||||||
|
|
||||||
# platform_info data about CPUs on other kernels missing
|
# platform_info data about CPUs on other kernels missing
|
||||||
assert_spec nova
|
assert_spec nova
|
||||||
|
|
||||||
|
if { [have_spec x86_64] } {
|
||||||
|
file copy -force $path_microcode/06-3c-03 bin/micro.code
|
||||||
|
} else {
|
||||||
|
file copy -force $path_microcode/06-17-06 bin/micro.code
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {![file exists bin/micro.code]} {
|
||||||
|
puts "\nMissing bin/micro.code file for your target machine."
|
||||||
|
puts "Please select for your target CPU the microcode patch located in $path_microcode/xx-xx-xx."
|
||||||
|
puts "and copy it to bin/micro.code. xx-xx-xx stands for your target CPU, family-model-stepping\n"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
proc apply_microcode { } { return true }
|
||||||
|
|
||||||
build "core init test/microcode"
|
build "core init test/microcode"
|
||||||
|
|
||||||
create_boot_directory
|
create_boot_directory
|
||||||
@ -33,10 +52,6 @@ install_config {
|
|||||||
</config>
|
</config>
|
||||||
}
|
}
|
||||||
|
|
||||||
set ::env(MAKEFLAGS) s
|
|
||||||
set path_microcode [exec [genode_dir]/tool/ports/current microcode_intel]
|
|
||||||
set microcode_files [glob -dir $path_microcode/src/app/intel *-*-*]
|
|
||||||
|
|
||||||
file copy -force {*}$microcode_files bin/
|
file copy -force {*}$microcode_files bin/
|
||||||
|
|
||||||
|
|
||||||
@ -57,6 +72,7 @@ run_genode_until "microcode check done" 30
|
|||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
if { [get_cmd_switch --autopilot] } {
|
if { [get_cmd_switch --autopilot] } {
|
||||||
|
file delete -force bin/micro.code
|
||||||
foreach file $microcode_files {
|
foreach file $microcode_files {
|
||||||
file delete bin/$file
|
file delete bin/$file
|
||||||
}
|
}
|
||||||
|
@ -128,3 +128,4 @@ vmm
|
|||||||
weak_ptr
|
weak_ptr
|
||||||
xml_generator
|
xml_generator
|
||||||
xml_node
|
xml_node
|
||||||
|
microcode
|
||||||
|
@ -2,16 +2,19 @@ This directory contains boot-loader files needed to boot Genode and to create
|
|||||||
boot images. The tools are available in binary form. Pointers to the source
|
boot images. The tools are available in binary form. Pointers to the source
|
||||||
code respectively the download source of binaries are described below.
|
code respectively the download source of binaries are described below.
|
||||||
|
|
||||||
:'bender'
|
:'bender', 'microcode'
|
||||||
|
|
||||||
The 'bender' tool is part of the 'morbo' toolchain available under GPL.
|
The tools are part of the 'morbo' toolchain available under GPL.
|
||||||
The toolchain was obtained from https://github.com/TUD-OS/morbo.
|
The toolchain was obtained from https://github.com/TUD-OS/morbo.
|
||||||
For Genode the bender was modified so that binaries are only relocated up
|
For Genode bender was modified so that binaries are only relocated up
|
||||||
to 2G physical. Additional, relocation can be limited to 256M for sel4.
|
to 2G physical. Additional, relocation can be limited to 256M for sel4.
|
||||||
|
The microcode tools expect to find a module named micro.code which contains
|
||||||
|
a valid Intel microcode file for the target CPU.
|
||||||
|
|
||||||
The changes are available from
|
The changes are available from
|
||||||
https://github.com/alex-ab/morbo.git.
|
https://github.com/alex-ab/morbo.git.
|
||||||
|
|
||||||
branch genode_bender, git commit e4744198ed481886c48e3dee12c1fbd47411770f
|
git commit 003016e096fa132e2086b4db52d1fd965dbd7363
|
||||||
|
|
||||||
:'pulsar':
|
:'pulsar':
|
||||||
|
|
||||||
|
BIN
tool/boot/bender
BIN
tool/boot/bender
Binary file not shown.
BIN
tool/boot/microcode
Normal file
BIN
tool/boot/microcode
Normal file
Binary file not shown.
@ -9,6 +9,7 @@ proc run_boot_string { } {
|
|||||||
return "\nHypervisor reports "
|
return "\nHypervisor reports "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc apply_microcode { } { return false }
|
||||||
|
|
||||||
proc core_link_address { } { return "0x100000" }
|
proc core_link_address { } { return "0x100000" }
|
||||||
|
|
||||||
@ -66,6 +67,11 @@ proc run_boot_dir {binaries} {
|
|||||||
|
|
||||||
set serial_bender_opt ""
|
set serial_bender_opt ""
|
||||||
|
|
||||||
|
if {[apply_microcode]} {
|
||||||
|
exec cp bin/micro.code [run_dir]/boot/
|
||||||
|
exec cp [genode_dir]/tool/boot/microcode [run_dir]/boot/
|
||||||
|
}
|
||||||
|
|
||||||
if {[have_include "image/disk"]} {
|
if {[have_include "image/disk"]} {
|
||||||
exec mkdir -p [run_dir]/boot/grub
|
exec mkdir -p [run_dir]/boot/grub
|
||||||
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
|
||||||
@ -126,6 +132,10 @@ proc run_boot_dir {binaries} {
|
|||||||
puts $fh " insmod multiboot2"
|
puts $fh " insmod multiboot2"
|
||||||
puts $fh " insmod gzio"
|
puts $fh " insmod gzio"
|
||||||
puts $fh " multiboot2 /boot/bender $serial_bender_opt"
|
puts $fh " multiboot2 /boot/bender $serial_bender_opt"
|
||||||
|
if {[apply_microcode]} {
|
||||||
|
puts $fh " module2 /boot/microcode serial"
|
||||||
|
puts $fh " module2 /boot/micro.code micro.code"
|
||||||
|
}
|
||||||
puts $fh " module2 /boot/hypervisor hypervisor iommu novpid [kernel_output]"
|
puts $fh " module2 /boot/hypervisor hypervisor iommu novpid [kernel_output]"
|
||||||
puts $fh " module2 /boot/image.elf.gz image.elf"
|
puts $fh " module2 /boot/image.elf.gz image.elf"
|
||||||
puts $fh "}"
|
puts $fh "}"
|
||||||
@ -143,11 +153,20 @@ proc run_boot_dir {binaries} {
|
|||||||
#
|
#
|
||||||
install_pxe_bootloader_to_run_dir
|
install_pxe_bootloader_to_run_dir
|
||||||
|
|
||||||
|
if {[apply_microcode]} {
|
||||||
|
exec cp [genode_dir]/tool/boot/microcode [run_dir]/boot/
|
||||||
|
exec cp bin/micro.code [run_dir]/boot/
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generate pulsar config file
|
# Generate pulsar config file
|
||||||
#
|
#
|
||||||
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
|
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
|
||||||
puts $fh " exec /boot/bender"
|
puts $fh " exec /boot/bender"
|
||||||
|
if {[apply_microcode]} {
|
||||||
|
puts $fh " load /boot/microcode serial"
|
||||||
|
puts $fh " load /boot/micro.code micro.code"
|
||||||
|
}
|
||||||
puts $fh " load /boot/hypervisor iommu novpid [kernel_output]"
|
puts $fh " load /boot/hypervisor iommu novpid [kernel_output]"
|
||||||
puts $fh " load /boot/image.elf"
|
puts $fh " load /boot/image.elf"
|
||||||
close $fh
|
close $fh
|
||||||
|
Loading…
Reference in New Issue
Block a user