os-workbench-2022's People
Forkers
charlie-47 taoliq funmelon pallion0208 werifu keanusgithub jmu201621143028 toolmanp dorjake seanli-oi annnnnnnnnnie azipro hvance01 acow337 qizidog lee9352 zippermonkey hai-season lachesis10 qisun1995 laicize shenhuaxin shuiyuncode cockpunctual poxerial pan2013e luowanqian lihouwei ekerneljoy cv-programmer bryanthelol dzp red-night-aria fatorange plan454 kongfuman fengtongxue dzwduan switchzee itsmyowninvention cjqcjqhhh heheyas zzvsjs1 bjtuzss ximisama jaycelai huj13k4n9 clingfei shji47 mimo-x oasisjay subtlespark zarmars coder-2young zongwuwang picendove yang-shiqin dboooo marvelousp4 zhanglifeng m-cyclone wuhanfeng wsingb swordcs zhengxinliu 1nc4ndescence allybuli paprikaw yujinzheng dumplinghuman tommix626 z3rofork 916980name tianrenzhi ddd-ms cuteden-ecnu tzh476 gdwii mikucy bmi269 abruptrainlover siukityeung neuhoushuai budali11 liangtonglu boom567 wwaassded qiangxc xf3965 realzhouxin dargon0123 pre-w3b5h3ll grumpysloths jerry-terrasse yboi1 yvxinn krystal0121 ymriri vanjker onezee-codeos-workbench-2022's Issues
请问一下我在amgame下make的时候会报这个错误呢,是什么配置错误了吗,下面是报错信息
(base) [boyi@boyi amgame]$ make
Building amgame-image [x86_64-qemu]
Building am-archive [x86_64-qemu]
- CC src/x86/qemu/ioe.c
/home/boyi/Code/Systerm/os-workbench-2022/abstract-machine/am/src/x86/qemu/ioe.c: 在函数‘__am_lapic_bootap’中:
/home/boyi/Code/Systerm/os-workbench-2022/abstract-machine/am/src/x86/qemu/ioe.c:433:6: 错误:array subscript 0 is outside array bounds of ‘uint16_t[0]’ {或称 ‘short unsigned int[]’} [-Werror=array-bounds=]
433 | wrv[0] = 0;
| ~~~^~~
cc1: 附注:source object is likely at address zero
/home/boyi/Code/Systerm/os-workbench-2022/abstract-machine/am/src/x86/qemu/ioe.c:434:6: 错误:array subscript 0 is outside array bounds of ‘uint16_t[0]’ {或称 ‘short unsigned int[]’} [-Werror=array-bounds=]
434 | wrv[1] = (uintptr_t)addr >> 4;
boot/main.c: Miscompilation on GCC 12.1.0
Without -fno-strict-aliasing
, GCC 12.1.0 generates code to load elf32->e_machine
before copy_from_disk(elf32, 4096, 0)
, causing an x86_64 ELF header to be parsed with load_elf32()
:
7d13: b9 00 fc ff ff mov $0xfffffc00,%ecx
7d18: ba 00 04 00 00 mov $0x400,%edx
7d1d: b8 00 00 01 00 mov $0x10000,%eax
[*] 7d22: 66 8b 1d 12 80 00 00 mov 0x8012,%bx
7d29: e8 34 ff ff ff call 7c62 <copy_from_disk>
7d2e: 31 c9 xor %ecx,%ecx
7d30: ba 00 10 00 00 mov $0x1000,%edx
7d35: b8 00 80 00 00 mov $0x8000,%eax
7d3a: e8 23 ff ff ff call 7c62 <copy_from_disk>
[*] 7d3f: 66 83 fb 3e cmp $0x3e,%bx
With -fno-strict-aliasing
, the compiler gives the following code, and the system correctly boots.
7d13: b9 00 fc ff ff mov $0xfffffc00,%ecx
7d18: ba 00 04 00 00 mov $0x400,%edx
7d1d: b8 00 00 01 00 mov $0x10000,%eax
7d22: e8 3b ff ff ff call 7c62 <copy_from_disk>
7d27: 31 c9 xor %ecx,%ecx
7d29: ba 00 10 00 00 mov $0x1000,%edx
7d2e: b8 00 80 00 00 mov $0x8000,%eax
7d33: e8 2a ff ff ff call 7c62 <copy_from_disk>
[*] 7d38: 66 83 3d 12 80 00 00 cmpw $0x3e,0x8012
It seems the miscompilation is caused by read_disk
's treating its buffer as uint32_t *
, and changing that to uint8_t *
also solves the problem.
A small mistake in comment
os-workbench-2022/kernel/src/dev/dev_tty.c
Line 183 in 409e947
There's a mistake--it should be 7
for ╚ (200)
.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.