Skip to content

Commit

Permalink
[fix] simplify feature of uspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure-stars committed Feb 9, 2025
1 parent aa4c2a6 commit 1832ead
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api/arceos_posix_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ net = ["dep:axnet", "axfeat/net", "fd"]
pipe = ["fd"]
select = ["fd"]
epoll = ["fd"]
uspace = ["axns/thread-local", "axfs/thread-local", "smp", "irq", "fs", "multitask", "net", "pipe", "select", "epoll"]
uspace = ["axns/thread-local"]

[dependencies]
# ArceOS modules
Expand Down
1 change: 0 additions & 1 deletion modules/axfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ repository = "https://github.com/arceos-org/arceos/tree/main/modules/axfs"
documentation = "https://arceos-org.github.io/arceos/axfs/index.html"

[features]
thread-local = ["axns/thread-local"]
devfs = ["dep:axfs_devfs"]
ramfs = ["dep:axfs_ramfs"]
procfs = ["dep:axfs_ramfs"]
Expand Down
2 changes: 0 additions & 2 deletions modules/axhal/linker.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ SECTIONS
}

.init_array : ALIGN(4K) {
_sinit_array = .;
__init_array_start = .;
*(.init_array .init_array.*)
__init_array_end = .;
. = ALIGN(4K);
_einit_array = .;
}

.data : ALIGN(4K) {
Expand Down
9 changes: 5 additions & 4 deletions modules/axhal/src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ fn kernel_image_regions() -> impl Iterator<Item = MemRegion> {
name: ".rodata",
},
MemRegion {
paddr: virt_to_phys((_sinit_array as usize).into()),
size: _einit_array as usize - _sinit_array as usize,
paddr: virt_to_phys((__init_array_start as usize).into()).align_down_4k(),
size: VirtAddr::from_usize(__init_array_end as usize).align_up_4k()
- VirtAddr::from_usize(__init_array_start as usize).align_down_4k(),
flags: MemRegionFlags::RESERVED | MemRegionFlags::READ,
name: ".init_array",
},
Expand Down Expand Up @@ -157,8 +158,8 @@ unsafe extern "C" {
fn _etext();
fn _srodata();
fn _erodata();
fn _sinit_array();
fn _einit_array();
fn __init_array_start();
fn __init_array_end();
fn _sdata();
fn _edata();
fn _sbss();
Expand Down

0 comments on commit 1832ead

Please sign in to comment.