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 Feb 22, 2021
1 parent 488b6c9 commit 7d249aa
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 @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![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 7d249aa

Please sign in to comment.