Bump compiler version

pull/126/head
Andre Richter 3 years ago
parent dbf34410c9
commit 909b05b23f
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -801,7 +801,7 @@ diff -uNr 09_privilege_level/src/_arch/aarch64/memory/mmu.rs 10_virtual_mem_part
+ // Populate translation tables.
+ KERNEL_TABLES
+ .populate_tt_entries()
+ .map_err(|e| MMUEnableError::Other(e))?;
+ .map_err(MMUEnableError::Other)?;
+
+ // Set the "Translation Table Base Register".
+ TTBR0_EL1.set_baddr(KERNEL_TABLES.phys_base_address());
@ -1042,19 +1042,17 @@ diff -uNr 09_privilege_level/src/bsp.rs 10_virtual_mem_part1_identity_mapping/sr
diff -uNr 09_privilege_level/src/main.rs 10_virtual_mem_part1_identity_mapping/src/main.rs
--- 09_privilege_level/src/main.rs
+++ 10_virtual_mem_part1_identity_mapping/src/main.rs
@@ -105,7 +105,11 @@
@@ -105,7 +105,9 @@
//! 2. Once finished with architectural setup, the arch code calls `kernel_init()`.
#![allow(clippy::upper_case_acronyms)]
+#![allow(incomplete_features)]
#![feature(const_fn_fn_ptr_basics)]
+#![feature(const_generics)]
+#![feature(const_panic)]
+#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(global_asm)]
#![feature(panic_info_message)]
@@ -118,6 +122,7 @@
@@ -118,6 +120,7 @@
mod cpu;
mod driver;
mod exception;
@ -1062,7 +1060,7 @@ diff -uNr 09_privilege_level/src/main.rs 10_virtual_mem_part1_identity_mapping/s
mod panic_wait;
mod print;
mod synchronization;
@@ -128,9 +133,17 @@
@@ -128,9 +131,17 @@
/// # Safety
///
/// - Only a single core must be active and running this function.
@ -1081,7 +1079,7 @@ diff -uNr 09_privilege_level/src/main.rs 10_virtual_mem_part1_identity_mapping/s
for i in bsp::driver::driver_manager().all_device_drivers().iter() {
if let Err(x) = i.init() {
@@ -159,6 +172,9 @@
@@ -159,6 +170,9 @@
);
info!("Booting on: {}", bsp::board_name());
@ -1091,7 +1089,7 @@ diff -uNr 09_privilege_level/src/main.rs 10_virtual_mem_part1_identity_mapping/s
let (_, privilege_level) = exception::current_privilege_level();
info!("Current privilege level: {}", privilege_level);
@@ -182,6 +198,13 @@
@@ -182,6 +196,13 @@
info!("Timer test, spinning for 1 second");
time::time_manager().spin_for(Duration::from_secs(1));

@ -137,7 +137,7 @@ impl memory::mmu::interface::MMU for MemoryManagementUnit {
// Populate translation tables.
KERNEL_TABLES
.populate_tt_entries()
.map_err(|e| MMUEnableError::Other(e))?;
.map_err(MMUEnableError::Other)?;
// Set the "Translation Table Base Register".
TTBR0_EL1.set_baddr(KERNEL_TABLES.phys_base_address());

@ -107,8 +107,6 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(incomplete_features)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(global_asm)]

@ -971,7 +971,7 @@ diff -uNr 10_virtual_mem_part1_identity_mapping/src/exception.rs 11_exceptions_p
diff -uNr 10_virtual_mem_part1_identity_mapping/src/main.rs 11_exceptions_part1_groundwork/src/main.rs
--- 10_virtual_mem_part1_identity_mapping/src/main.rs
+++ 11_exceptions_part1_groundwork/src/main.rs
@@ -141,6 +141,8 @@
@@ -139,6 +139,8 @@
use driver::interface::DriverManager;
use memory::mmu::interface::MMU;
@ -980,7 +980,7 @@ diff -uNr 10_virtual_mem_part1_identity_mapping/src/main.rs 11_exceptions_part1_
if let Err(string) = memory::mmu::mmu().enable_mmu_and_caching() {
panic!("MMU: {}", string);
}
@@ -198,13 +200,28 @@
@@ -196,13 +198,28 @@
info!("Timer test, spinning for 1 second");
time::time_manager().spin_for(Duration::from_secs(1));

@ -137,7 +137,7 @@ impl memory::mmu::interface::MMU for MemoryManagementUnit {
// Populate translation tables.
KERNEL_TABLES
.populate_tt_entries()
.map_err(|e| MMUEnableError::Other(e))?;
.map_err(MMUEnableError::Other)?;
// Set the "Translation Table Base Register".
TTBR0_EL1.set_baddr(KERNEL_TABLES.phys_base_address());

@ -107,8 +107,6 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(incomplete_features)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(global_asm)]

@ -1281,7 +1281,7 @@ diff -uNr 11_exceptions_part1_groundwork/src/exception.rs 12_integrated_testing/
diff -uNr 11_exceptions_part1_groundwork/src/lib.rs 12_integrated_testing/src/lib.rs
--- 11_exceptions_part1_groundwork/src/lib.rs
+++ 12_integrated_testing/src/lib.rs
@@ -0,0 +1,187 @@
@@ -0,0 +1,185 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2018-2021 Andre Richter <andre.o.richter@gmail.com>
@ -1393,8 +1393,6 @@ diff -uNr 11_exceptions_part1_groundwork/src/lib.rs 12_integrated_testing/src/li
+#![allow(clippy::upper_case_acronyms)]
+#![allow(incomplete_features)]
+#![feature(const_fn_fn_ptr_basics)]
+#![feature(const_generics)]
+#![feature(const_panic)]
+#![feature(core_intrinsics)]
+#![feature(format_args_nl)]
+#![feature(global_asm)]
@ -1473,7 +1471,7 @@ diff -uNr 11_exceptions_part1_groundwork/src/lib.rs 12_integrated_testing/src/li
diff -uNr 11_exceptions_part1_groundwork/src/main.rs 12_integrated_testing/src/main.rs
--- 11_exceptions_part1_groundwork/src/main.rs
+++ 12_integrated_testing/src/main.rs
@@ -6,127 +6,12 @@
@@ -6,125 +6,12 @@
#![doc(html_logo_url = "https://git.io/JeGIp")]
//! The `kernel` binary.
@ -1578,8 +1576,6 @@ diff -uNr 11_exceptions_part1_groundwork/src/main.rs 12_integrated_testing/src/m
-#![allow(clippy::upper_case_acronyms)]
-#![allow(incomplete_features)]
-#![feature(const_fn_fn_ptr_basics)]
-#![feature(const_generics)]
-#![feature(const_panic)]
-#![feature(core_intrinsics)]
+
#![feature(format_args_nl)]
@ -1603,7 +1599,7 @@ diff -uNr 11_exceptions_part1_groundwork/src/main.rs 12_integrated_testing/src/m
/// Early init code.
///
@@ -137,6 +22,7 @@
@@ -135,6 +22,7 @@
/// - MMU + Data caching must be activated at the earliest. Without it, any atomic operations,
/// e.g. the yet-to-be-introduced spinlocks in the device drivers (which currently employ
/// NullLocks instead of spinlocks), will fail to work (properly) on the RPi SoCs.
@ -1611,7 +1607,7 @@ diff -uNr 11_exceptions_part1_groundwork/src/main.rs 12_integrated_testing/src/m
unsafe fn kernel_init() -> ! {
use driver::interface::DriverManager;
use memory::mmu::interface::MMU;
@@ -163,15 +49,9 @@
@@ -161,15 +49,9 @@
fn kernel_main() -> ! {
use bsp::console::console;
use console::interface::All;
@ -1628,7 +1624,7 @@ diff -uNr 11_exceptions_part1_groundwork/src/main.rs 12_integrated_testing/src/m
info!("Booting on: {}", bsp::board_name());
info!("MMU online. Special regions:");
@@ -197,31 +77,6 @@
@@ -195,31 +77,6 @@
info!(" {}. {}", i + 1, driver.compatible());
}

@ -137,7 +137,7 @@ impl memory::mmu::interface::MMU for MemoryManagementUnit {
// Populate translation tables.
KERNEL_TABLES
.populate_tt_entries()
.map_err(|e| MMUEnableError::Other(e))?;
.map_err(MMUEnableError::Other)?;
// Set the "Translation Table Base Register".
TTBR0_EL1.set_baddr(KERNEL_TABLES.phys_base_address());

@ -109,8 +109,6 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(incomplete_features)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(global_asm)]

@ -2416,10 +2416,10 @@ diff -uNr 12_integrated_testing/src/lib.rs 13_exceptions_part2_peripheral_IRQs/s
+#![feature(asm)]
#![feature(const_fn_fn_ptr_basics)]
+#![feature(const_fn_trait_bound)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
@@ -134,6 +136,7 @@
#![feature(format_args_nl)]
#![feature(global_asm)]
@@ -132,6 +134,7 @@
pub mod exception;
pub mod memory;
pub mod print;

@ -137,7 +137,7 @@ impl memory::mmu::interface::MMU for MemoryManagementUnit {
// Populate translation tables.
KERNEL_TABLES
.populate_tt_entries()
.map_err(|e| MMUEnableError::Other(e))?;
.map_err(MMUEnableError::Other)?;
// Set the "Translation Table Base Register".
TTBR0_EL1.set_baddr(KERNEL_TABLES.phys_base_address());

@ -111,8 +111,6 @@
#![feature(asm)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_fn_trait_bound)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(global_asm)]

@ -798,7 +798,7 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/memory/mmu.rs 14
- // Populate translation tables.
- KERNEL_TABLES
- .populate_tt_entries()
- .map_err(|e| MMUEnableError::Other(e))?;
- .map_err(MMUEnableError::Other)?;
-
// Set the "Translation Table Base Register".
- TTBR0_EL1.set_baddr(KERNEL_TABLES.phys_base_address());
@ -2149,15 +2149,15 @@ diff -uNr 13_exceptions_part2_peripheral_IRQs/src/driver.rs 14_virtual_mem_part2
diff -uNr 13_exceptions_part2_peripheral_IRQs/src/lib.rs 14_virtual_mem_part2_mmio_remap/src/lib.rs
--- 13_exceptions_part2_peripheral_IRQs/src/lib.rs
+++ 14_virtual_mem_part2_mmio_remap/src/lib.rs
@@ -109,6 +109,7 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(incomplete_features)]
#![feature(asm)]
+#![feature(const_evaluatable_checked)]
#![feature(const_fn_fn_ptr_basics)]
@@ -113,6 +113,7 @@
#![feature(const_fn_trait_bound)]
#![feature(const_generics)]
@@ -130,6 +131,7 @@
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
+#![feature(generic_const_exprs)]
#![feature(global_asm)]
#![feature(linkage)]
#![feature(panic_info_message)]
@@ -128,6 +129,7 @@
mod synchronization;
pub mod bsp;

@ -109,13 +109,11 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(incomplete_features)]
#![feature(asm)]
#![feature(const_evaluatable_checked)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_fn_trait_bound)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(generic_const_exprs)]
#![feature(global_asm)]
#![feature(linkage)]
#![feature(panic_info_message)]

@ -1613,7 +1613,7 @@ diff -uNr 14_virtual_mem_part2_mmio_remap/translation_table_tool/arch.rb 15_virt
+
+ def self.attr_bitfield(name, offset, num_bits)
+ define_method("#{name}=") do |bits|
+ mask = 2**num_bits - 1
+ mask = (2**num_bits) - 1
+
+ raise "Input out of range: #{name} = 0x#{bits.to_s(16)}" if (bits & ~mask).positive?
+
@ -2167,7 +2167,7 @@ diff -uNr 14_virtual_mem_part2_mmio_remap/translation_table_tool/generic.rb 15_v
+
+ num_pages = size / granule_size
+ super(num_pages) do |i|
+ i * granule_size + start_addr
+ (i * granule_size) + start_addr
+ end
+ end
+end
@ -2232,8 +2232,8 @@ diff -uNr 14_virtual_mem_part2_mmio_remap/translation_table_tool/generic.rb 15_v
+ print ' Kernel table struct at physical '
+ puts BSP.phys_table_struct_start_addr.to_hex_underscore
+
+ IO.binwrite(kernel_binary, TRANSLATION_TABLES.to_binary,
+ BSP.table_struct_offset_in_kernel_elf)
+ File.binwrite(kernel_binary, TRANSLATION_TABLES.to_binary,
+ BSP.table_struct_offset_in_kernel_elf)
+end
+
+def kernel_patch_base_addr(kernel_binary)
@ -2243,8 +2243,8 @@ diff -uNr 14_virtual_mem_part2_mmio_remap/translation_table_tool/generic.rb 15_v
+ print ') at physical '
+ puts BSP.phys_tables_base_addr.to_hex_underscore
+
+ IO.binwrite(kernel_binary, TRANSLATION_TABLES.phys_tables_base_addr_binary,
+ BSP.phys_tables_base_addr_offset_in_kernel_elf)
+ File.binwrite(kernel_binary, TRANSLATION_TABLES.phys_tables_base_addr_binary,
+ BSP.phys_tables_base_addr_offset_in_kernel_elf)
+end
diff -uNr 14_virtual_mem_part2_mmio_remap/translation_table_tool/main.rb 15_virtual_mem_part3_precomputed_tables/translation_table_tool/main.rb

@ -109,13 +109,11 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(incomplete_features)]
#![feature(asm)]
#![feature(const_evaluatable_checked)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_fn_trait_bound)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(generic_const_exprs)]
#![feature(global_asm)]
#![feature(linkage)]
#![feature(panic_info_message)]

@ -12,7 +12,7 @@ class BitField
def self.attr_bitfield(name, offset, num_bits)
define_method("#{name}=") do |bits|
mask = 2**num_bits - 1
mask = (2**num_bits) - 1
raise "Input out of range: #{name} = 0x#{bits.to_s(16)}" if (bits & ~mask).positive?

@ -44,7 +44,7 @@ class PageArray < Array
num_pages = size / granule_size
super(num_pages) do |i|
i * granule_size + start_addr
(i * granule_size) + start_addr
end
end
end
@ -109,8 +109,8 @@ def kernel_patch_tables(kernel_binary)
print ' Kernel table struct at physical '
puts BSP.phys_table_struct_start_addr.to_hex_underscore
IO.binwrite(kernel_binary, TRANSLATION_TABLES.to_binary,
BSP.table_struct_offset_in_kernel_elf)
File.binwrite(kernel_binary, TRANSLATION_TABLES.to_binary,
BSP.table_struct_offset_in_kernel_elf)
end
def kernel_patch_base_addr(kernel_binary)
@ -120,6 +120,6 @@ def kernel_patch_base_addr(kernel_binary)
print ') at physical '
puts BSP.phys_tables_base_addr.to_hex_underscore
IO.binwrite(kernel_binary, TRANSLATION_TABLES.phys_tables_base_addr_binary,
BSP.phys_tables_base_addr_offset_in_kernel_elf)
File.binwrite(kernel_binary, TRANSLATION_TABLES.phys_tables_base_addr_binary,
BSP.phys_tables_base_addr_offset_in_kernel_elf)
end

@ -584,7 +584,7 @@ diff -uNr 15_virtual_mem_part3_precomputed_tables/src/bsp/raspberrypi/memory/mmu
diff -uNr 15_virtual_mem_part3_precomputed_tables/src/lib.rs 16_virtual_mem_part4_higher_half_kernel/src/lib.rs
--- 15_virtual_mem_part3_precomputed_tables/src/lib.rs
+++ 16_virtual_mem_part4_higher_half_kernel/src/lib.rs
@@ -154,11 +154,6 @@
@@ -152,11 +152,6 @@
)
}

@ -109,13 +109,11 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(incomplete_features)]
#![feature(asm)]
#![feature(const_evaluatable_checked)]
#![feature(const_fn_fn_ptr_basics)]
#![feature(const_fn_trait_bound)]
#![feature(const_generics)]
#![feature(const_panic)]
#![feature(core_intrinsics)]
#![feature(format_args_nl)]
#![feature(generic_const_exprs)]
#![feature(global_asm)]
#![feature(linkage)]
#![feature(panic_info_message)]

@ -12,7 +12,7 @@ class BitField
def self.attr_bitfield(name, offset, num_bits)
define_method("#{name}=") do |bits|
mask = 2**num_bits - 1
mask = (2**num_bits) - 1
raise "Input out of range: #{name} = 0x#{bits.to_s(16)}" if (bits & ~mask).positive?

@ -44,7 +44,7 @@ class PageArray < Array
num_pages = size / granule_size
super(num_pages) do |i|
i * granule_size + start_addr
(i * granule_size) + start_addr
end
end
end
@ -109,8 +109,8 @@ def kernel_patch_tables(kernel_binary)
print ' Kernel table struct at physical '
puts BSP.phys_table_struct_start_addr.to_hex_underscore
IO.binwrite(kernel_binary, TRANSLATION_TABLES.to_binary,
BSP.table_struct_offset_in_kernel_elf)
File.binwrite(kernel_binary, TRANSLATION_TABLES.to_binary,
BSP.table_struct_offset_in_kernel_elf)
end
def kernel_patch_base_addr(kernel_binary)
@ -120,6 +120,6 @@ def kernel_patch_base_addr(kernel_binary)
print ') at physical '
puts BSP.phys_tables_base_addr.to_hex_underscore
IO.binwrite(kernel_binary, TRANSLATION_TABLES.phys_tables_base_addr_binary,
BSP.phys_tables_base_addr_offset_in_kernel_elf)
File.binwrite(kernel_binary, TRANSLATION_TABLES.phys_tables_base_addr_binary,
BSP.phys_tables_base_addr_offset_in_kernel_elf)
end

Binary file not shown.

Binary file not shown.

@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2021-07-12"
channel = "nightly-2021-10-10"
components = ["llvm-tools-preview"]
targets = ["aarch64-unknown-none-softfloat"]

Loading…
Cancel
Save