Skip to content

Commit

Permalink
build: Remove const_in_array_repeat_expressions
Browse files Browse the repository at this point in the history
The `const_in_array_repeat_expressions` feature has been removed from
Rust [rust-lang/rust #80404](rust-lang/rust#80404).

Signed-off-by: Akira Moroo <retrage01@gmail.com>
  • Loading branch information
retrage committed Mar 5, 2021
1 parent 87aa332 commit 6d37572
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#![feature(alloc_error_handler)]
#![feature(global_asm, const_in_array_repeat_expressions)]
#![feature(global_asm)]
#![cfg_attr(not(test), no_std)]
#![cfg_attr(not(test), no_main)]
#![cfg_attr(test, allow(unused_imports, dead_code))]
Expand Down
3 changes: 2 additions & 1 deletion src/paging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ use x86_64::{

// Amount of memory we identity map in setup(), max 512 GiB.
const ADDRESS_SPACE_GIB: usize = 4;
const TABLE: PageTable = PageTable::new();

// Put the Page Tables in static muts to make linking easier
#[no_mangle]
static mut L4_TABLE: PageTable = PageTable::new();
#[no_mangle]
static mut L3_TABLE: PageTable = PageTable::new();
#[no_mangle]
static mut L2_TABLES: [PageTable; ADDRESS_SPACE_GIB] = [PageTable::new(); ADDRESS_SPACE_GIB];
static mut L2_TABLES: [PageTable; ADDRESS_SPACE_GIB] = [TABLE; ADDRESS_SPACE_GIB];

pub fn setup() {
// SAFETY: This function is idempontent and only writes to static memory and
Expand Down

0 comments on commit 6d37572

Please sign in to comment.