The reason of this question is that I will implement a forth-like system on the yeeloong using mips assembly. So I need to set macros with addresses from which will start the data stack, dictionnary entries, ...
2010/12/10, 项宇 <[email protected]>: > Fuxin Zhang 写道: >>> Hello, >>> >>> My goal is to compile a simple assembly program and boot it on top >>> of pmon2000 on a Yeeloong laptop. >>> But I am missing information such as the address range to write to >>> memory. >>> Where are mapped the 1GBytes of memory? >>> >> low 256MB is at physical address 0-0x10000000, can be accessed from >> 0x80000000-0x90000000 or 0xa0000000-0xb0000000 >> >> all mem is mapped at physical address start from 0x80000000(can differ >> with pmon versions), can be accessed only via 64bit address or tlb mapped >> addresses. >> >> >>> Does the pmon mt command provide a good answer? >>> >> probably it can access only the low part. >> >>> Does pmon load the program at the start of this space? >>> >> can't remember the details, but it should be no. Pmon itself is normally >> loaded at 0x80020000. the top part is used for stack and malloc etc. >> > Pmon first analysis target executable file's program headers , loads > neccessory program sections, > then jumps to target file's entrypiont(descript in elf headerd). > Pmon not assume anything, but entry point usually fix to 0x8020_0000 > (compressed kernel usually use 0x80Fx_xxxx) > In fact ,pmon can only use low 256MB(0x8000_0000 ~ 0x8fff_ffff) now. > Since low and high part memory are allocated by pmon,so I think all > addresses > between 0x8020_0000 and 0x8E00_0000 can be used as entrypoint, but not > guarantee. > > Example : > my-laptop$ readelf -l fl-vmlinux > Elf file type is EXEC (Executable file) > Entry point 0xffffffff802063e0 > There are 2 program headers, starting at offset 64 > > Program Headers: > Type Offset VirtAddr PhysAddr > FileSiz MemSiz Flags Align > LOAD 0x0000000000004000 0xffffffff80200000 0xffffffff80200000 > 0x0000000000480085 0x00000000004cfca0 RWE 4000 > NOTE 0x0000000000352c30 0xffffffff8054ec30 0xffffffff8054ec30 > 0x0000000000000024 0x0000000000000024 R 4 > > Pmon only load program sections with "LOAD" type, and copy the section > to VirtAddr (0x8020_0000) > then jump to Entry piont address(0x802063eo). > > >> Addresses like 0x82000000 should be unused. But why do you want to use raw >> addresses? >> >> BTW: the topic does not directly related to Loongson2F manual? The address >> mapping can be changed for different implementations. >> >>> Freely >>> Sebastien >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "loongson-dev" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/loongson-dev?hl=en. >>> >>> >>> >> >> >> > > > -- > Xiang Yu (Software Department) > > Tel: 0512-52308631 > Jiangsu Lemote Technology Co., Ltd > Menglan, Yushan, Changshu, Jiangsu, China > > -- > You received this message because you are subscribed to the Google Groups > "loongson-dev" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/loongson-dev?hl=en. > > -- You received this message because you are subscribed to the Google Groups "loongson-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/loongson-dev?hl=en.
