[temp] reenable custom uart mapping

This commit is contained in:
Berkus Decker 2019-01-21 17:46:19 +02:00
parent 12765de456
commit d04c844bbb
2 changed files with 11 additions and 11 deletions

View File

@ -147,16 +147,16 @@ pub unsafe fn init() {
// For educational purposes and fun, let the start of the second 2 MiB block // For educational purposes and fun, let the start of the second 2 MiB block
// point to the 2 MiB aperture which contains the UART's base address. // point to the 2 MiB aperture which contains the UART's base address.
// let uart_phys_base: u64 = (uart::UART_PHYS_BASE >> 21).into(); let uart_phys_base: u64 = (crate::platform::uart::UART1_BASE >> 21).into();
// LVL2_TABLE.entries[1] = (STAGE1_DESCRIPTOR::VALID::True LVL2_TABLE.entries[1] = (STAGE1_DESCRIPTOR::VALID::True
// + STAGE1_DESCRIPTOR::TYPE::Block + STAGE1_DESCRIPTOR::TYPE::Block
// + STAGE1_DESCRIPTOR::AttrIndx.val(mair::DEVICE) + STAGE1_DESCRIPTOR::AttrIndx.val(mair::DEVICE)
// + STAGE1_DESCRIPTOR::AP::RW_EL1 + STAGE1_DESCRIPTOR::AP::RW_EL1
// + STAGE1_DESCRIPTOR::SH::OuterShareable + STAGE1_DESCRIPTOR::SH::OuterShareable
// + STAGE1_DESCRIPTOR::AF::True + STAGE1_DESCRIPTOR::AF::True
// + STAGE1_DESCRIPTOR::LVL2_OUTPUT_ADDR_4KiB.val(uart_phys_base) + STAGE1_DESCRIPTOR::LVL2_OUTPUT_ADDR_4KiB.val(uart_phys_base)
// + STAGE1_DESCRIPTOR::XN::True) + STAGE1_DESCRIPTOR::XN::True)
// .value; .value;
// Fill the rest of the LVL2 (2MiB) entries as block // Fill the rest of the LVL2 (2MiB) entries as block
// descriptors. Differentiate between normal and device mem. // descriptors. Differentiate between normal and device mem.

View File

@ -27,7 +27,7 @@ const UART0_ITOP: u32 = UART0_BASE + 0x88;
const UART0_TDR: u32 = UART0_BASE + 0x8C; const UART0_TDR: u32 = UART0_BASE + 0x8C;
// Mini UART // Mini UART
const UART1_BASE: u32 = PERIPHERAL_BASE + 0x21_5000; pub const UART1_BASE: u32 = PERIPHERAL_BASE + 0x21_5000;
#[allow(non_snake_case)] #[allow(non_snake_case)]
#[repr(C)] #[repr(C)]