|
aria
高级用户
   
积分 924
发帖 243
注册 2003-7-9
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
想问一下:既然不能用ram那么ss段是怎么设的呢?不能用call了吗?
I want to ask: Since RAM cannot be used, how is the SS segment set? Can't use call anymore?
|
|
2004-10-3 00:00 |
|
|
yzz163
中级用户
  
积分 335
发帖 96
注册 2004-5-7
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
1。提供rom里面程序的相关资料和教程。------------------好象写BIOS的公司永远也不会提供的吧。2。一部分程序在ROM中运行,不能用ram---------------------------这样说,好象不妥吧?ROM是只读的,这句“一部分程序在ROM中运行”应改成“CPU将读取ROM中的代码”。
1. Provide relevant information and tutorials about the programs in the ROM. ------------------ It seems that the companies that write BIOS will never provide them, right? 2. Part of the program runs in the ROM and cannot use RAM --------------------------- This statement doesn't seem appropriate. ROM is read-only. The phrase "Part of the program runs in the ROM" should be changed to "The CPU will read the code from the ROM".
|

Freebsd网站架设\局域网维护管理\硬件维修\电路图纸
欢迎到 振兴电子
http://zxdz.8800.org |
|
2004-10-5 00:00 |
|
|
aria
高级用户
   
积分 924
发帖 243
注册 2003-7-9
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
1.我觉得不对.例如AMI就提供了一套sis芯片组的bios源码另外还有freebios,openbios等2.没有理解你的意思<img src="images/smilies/face-laugh.png" align="absmiddle" border="0">
1. I don't think it's right. For example, AMI provides a set of BIOS source codes for SIS chipset, and there are also FreeBIOS, OpenBIOS, etc.
2. Didn't understand your meaning :)
|
|
2004-10-5 00:00 |
|
|
yzz163
中级用户
  
积分 335
发帖 96
注册 2004-5-7
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
CPU马上就从地址FFFF0H处开始执行指令
关于此句我有些疑问,地址的概念似乎是针对RAM(内存)来说的,而BIOS代码指令在ROM(无论是否可擦写)中。而这个地址FFFF:0,据我所知,是ROM“映射”到RAM中的起始地址,而这个“映射”的过程肯定是在POST过程之后的,因为必须首先检测RAM的有效,才可能映射。也就是说,在POST之前地址FFFF:0应该是不存在的,那么CPU又怎么从此处开始执行呢?。
关于显卡的BIOS也存在类似的问题,而且C0000也似乎并非“显卡BIOS”,我只知道早期的PC机中曾把它用作彩色显示器的屏幕缓冲区(640*480*16),而现在的显卡已不再如此使用。
-----------------------
以INTEL586为例,在复位信号结束后,南/北(具体要看芯片组)桥将使CPU发出读指令(第一条开机指令的第一总线周期),即CPU在自己的地址引脚上放:FFFF0。然后通过南/北、I/O芯片在BIOS的地址引脚上产生FFFF:0信号,BIOS的地址引脚A0-A7为低电平,BIOS被选中。BIOS将在自己的数据线引脚上放代码5B3AH(Award BIOS),I/O芯片、南/北将该数据传到CPU地址线上,最后由CPU读取并执行。
(通过短路ISA槽的A10 IO CHRDY和B10 GND脚可使CPU始终处于上述的“第一条读指令”状态,——其实就是读主板BIOS ROM里存放的第一条指令。这时你可测一下ISA的地址线A0-A19应全为高电平:1,即十六进制的FFFF)
这是我对CPU上电后如何读取BIOS指令的理解,也是我维修“致命故障”主板的理论依据。希望大家共同探讨。
“地址的概念似乎是针对RAM(内存)来说的”这不对吧?不管ROM、RAM对CPU来说都是一样的,即:通过地址线、数据线来访问他们的每个存储单元的。同样CPU访问其他设备也是一样的吧。当然ROM的“映射”要在后面来实现。
另外POST里好象要检查前64K内存吧?
The CPU will immediately start executing instructions from address FFFF0H
I have some questions regarding this sentence. The concept of address seems to be related to RAM (memory), while BIOS code instructions are in ROM (whether erasable or not). And this address FFFF:0, as I know, is the starting address where ROM is "mapped" into RAM. And this "mapping" process must occur after the POST process, because the validity of RAM must be detected first before mapping can be possible. That is to say, before POST, the address FFFF:0 should not exist, so how can the CPU start executing from here?
There are similar issues regarding the BIOS of the graphics card, and C0000 also does not seem to be the "graphics card BIOS". I only know that in early PC machines, it was used as the screen buffer for color displays (640*480*16), but modern graphics cards no longer use it in this way.
-----------------------
Taking the INTEL 586 as an example, after the reset signal ends, the south/north (specifically depending on the chipset) bridge will make the CPU issue a read instruction (the first bus cycle of the first boot instruction), that is, the CPU places FFFF0 on its own address pins. Then, through the south/north, I/O chip, the FFFF:0 signal is generated on the address pins of the BIOS. The address pins A0-A7 of the BIOS are at low level, and the BIOS is selected. The BIOS will place the code 5B3AH (Award BIOS) on its data pins. The I/O chip and south/north transfer this data to the CPU address line, and finally the CPU reads and executes it.
(Shorting the A10 IO CHRDY and B10 GND pins of the ISA slot can make the CPU always in the above "first read instruction" state, - actually it is to read the first instruction stored in the mainboard BIOS ROM. At this time, you can measure that the address lines A0-A19 of the ISA should all be at high level: 1, that is, FFFF in hexadecimal)
This is my understanding of how the CPU reads BIOS instructions after power-on, and it is also the theoretical basis for me to repair "fatal failure" motherboards. I hope everyone can discuss together.
"The concept of address seems to be related to RAM (memory)" This is not correct? Whether it is ROM or RAM, for the CPU, it is the same, that is, each storage unit is accessed through address lines and data lines. Of course, the "mapping" of ROM will be implemented later.
Also, in POST, it seems that the first 64K of memory is checked?
|

Freebsd网站架设\局域网维护管理\硬件维修\电路图纸
欢迎到 振兴电子
http://zxdz.8800.org |
|
2004-10-6 00:00 |
|
|
yzz163
中级用户
  
积分 335
发帖 96
注册 2004-5-7
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
aria:
1、你的BIOS原码是那个型号的主板上的,是实用的吗?能E-MAIL我吗?
2、ROM会运行程序???!!! 那CPU干什么?
所有的程序代码都是由CPU来执行的,RAM、ROM、只是放程序代码或数据的“容器”。
aria:
1. Which model of motherboard is your BIOS source code from, and is it usable? Can you E-MAIL it to me?
2. ROM runs programs???!!! Then what does the CPU do?
All program code is executed by the CPU. RAM, ROM, are just "containers" for storing program code or data.
|

Freebsd网站架设\局域网维护管理\硬件维修\电路图纸
欢迎到 振兴电子
http://zxdz.8800.org |
|
2004-10-6 00:00 |
|
|
aria
高级用户
   
积分 924
发帖 243
注册 2003-7-9
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
呵呵又学到了很多谢谢关于源码:那个是一本叫<<BIOS研发技术剖析>>里面的压缩后有6M多
Hehe learned a lot again. Thanks. Regarding the source code: that is from a book called "BIOS R & D Technology Analysis". After compression, it is more than 6M.
|
|
2004-10-6 00:00 |
|
|
cdl
中级用户
   bbpc
积分 340
发帖 107
注册 2004-4-11
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
以下是引用aria在2004-10-3 16:16:20的发言:
想问一下:既然不能用ram
那么ss段是怎么设的呢?
不能用call了吗?
在对ram进行有效测试之前,不可以用ram。堆栈段是哪里并不重要因为不会用到,当然call是不能用的。可以使用所有的寄存器,寄存器默认是好的。
The following is the statement made by aria on 2004-10-3 16:16:20:
I want to ask: Since RAM cannot be used, then how is the SS segment set? Can't use call anymore?
Before effectively testing RAM, RAM cannot be used. It doesn't matter where the stack segment is because it won't be used, and of course, call cannot be used. All registers can be used, and the registers are defaulted to be good.
|

x86!dos!
爱你就象老鼠爱大米
http://www.baby-pc.com/ |
|
2004-10-7 00:00 |
|
|
cdl
中级用户
   bbpc
积分 340
发帖 107
注册 2004-4-11
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
关键点:bios空间不在1M空间之内,光用20根地址线是无法访问的。正常情况下在实模式中是读不到bios的,就算你用ffff段也好。其实问题并不难,自己做个试验,把bios读出来看看不就知道了。如果能正确读出bios,fffffff0处一定是编码为EAH的转移指令。
Key point: The BIOS space is not within the 1M space, and it cannot be accessed with only 20 address lines. Normally, the BIOS cannot be read in real mode, even if you use the FFFF segment. In fact, the problem is not difficult. Just do a test yourself, read out the BIOS and you will know. If the BIOS can be read correctly, there must be a jump instruction encoded as EAH at ffffffff0.
|

x86!dos!
爱你就象老鼠爱大米
http://www.baby-pc.com/ |
|
2004-10-7 00:00 |
|
|
yzz163
中级用户
  
积分 335
发帖 96
注册 2004-5-7
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
关键点:bios空间不在1M空间之内,光用20根地址线是无法访问的。正常情况下在实模式中是读不到bios的,就算你用ffff段也好。其实问题并不难,自己做个试验,把bios读出来看看不就知道了。如果能正确读出bios,fffffff0处一定是编码为EAH的转移指令。--------------------------"自己做个试验,把bios读出来看看不就知道了。" 你是在计算机正常启动后用程序读的?还是在CPU通电复位后用"专用硬件"(这时计算机还没完成自检)对BIOS进行单步跟踪的?
Key point: The BIOS space is not within the 1M space, and it cannot be accessed with only 20 address lines. Normally, the BIOS cannot be read in real mode, even if you use the FFFF segment. In fact, the problem is not difficult. Just do an experiment yourself, read out the BIOS and you will know. If the BIOS can be read correctly, there must be a jump instruction encoded as EAH at FFFFFFF0. --------------------------"Just do an experiment yourself, read out the BIOS and you will know." Did you read it with a program after the computer normally boots? Or did you use "dedicated hardware" (at this time the computer has not completed the power-on self-test) to single-step track the BIOS after the CPU is powered on and reset?
|

Freebsd网站架设\局域网维护管理\硬件维修\电路图纸
欢迎到 振兴电子
http://zxdz.8800.org |
|
2004-10-7 00:00 |
|
|
cdl
中级用户
   bbpc
积分 340
发帖 107
注册 2004-4-11
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
以下是引用yzz163在2004-10-7 15:42:55的发言:
关键点:bios空间不在1M空间之内,光用20根地址线是无法访问的。正常情况下在实模式中是读不到bios的,就算你用ffff段也好。其实问题并不难,自己做个试验,把bios读出来看看不就知道了。如果能正确读出bios,fffffff0处一定是编码为EAH的转移指令。
--------------------------
"自己做个试验,把bios读出来看看不就知道了。" 你是在计算机正常启动后用程序读的?还是在CPU通电复位后用"专用硬件"(这时计算机还没完成自检)对BIOS进行单步跟踪的?
我是编程把整个flash全读出来了。“专用硬件”我没用过。
The following is the speech of yzz163 on October 7, 2004 at 15:42:55:
Key point: The BIOS space is not within the 1M space. It cannot be accessed with only 20 address lines. Normally, the BIOS cannot be read in real mode, even if you use the FFFF segment. In fact, the problem is not difficult. Just do an experiment yourself, read out the BIOS and you will know. If the BIOS can be read correctly, there must be a jump instruction encoded as EAH at ffffffff0.
--------------------------
"Just do an experiment yourself, read out the BIOS and you will know." Did you read it with a program after the computer normally boots? Or did you use "dedicated hardware" (at this time the computer has not completed the self-test) to single-step track the BIOS after the CPU is powered on and reset?
I read out the entire flash by programming. I haven't used "dedicated hardware".
|

x86!dos!
爱你就象老鼠爱大米
http://www.baby-pc.com/ |
|
2004-10-7 00:00 |
|
|
cdl
中级用户
   bbpc
积分 340
发帖 107
注册 2004-4-11
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
关于bios映射到ram:bios映射到ram不是必须的,只是在rom中运行速度太慢。为了让执行速度更快而映射的,如果应用程序不是经常调用bios的话,没必要映射到ram空间,这样可以节省ram资源。特别是用windows操作系统的用户根本就没必要映射,因为bios的基本功能都是实模式代码,保护模式无法使用,windows下的硬件驱动都是重新加载的,不会使用bios的功能。
Regarding BIOS mapping to RAM: BIOS mapping to RAM is not necessary; it's just that running in ROM is too slow. It's mapped to make the execution speed faster. If the application doesn't frequently call BIOS, there's no need to map to RAM space, which can save RAM resources. Especially for users using the Windows operating system, there's absolutely no need to map because the basic functions of BIOS are real - mode code, which can't be used in protected mode. The hardware drivers under Windows are all re - loaded and won't use BIOS functions.
|

x86!dos!
爱你就象老鼠爱大米
http://www.baby-pc.com/ |
|
2004-10-7 00:00 |
|
|
yzz163
中级用户
  
积分 335
发帖 96
注册 2004-5-7
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
我是编程把整个flash全读出来了。------------------你是在计算机启动后在用程序读BIOS的吧?这时BIOS应该是被映射到内存里了把,不同的操作系统可能被映射的地址不同吧?但现在我们讨论的是在CPU复位后的第一条指令:即如何读取BIOS的.
I have programmed to read the entire flash. ------------------ Are you reading the BIOS with a program after the computer starts? At this time, the BIOS should be mapped into memory. Different operating systems may have different mapped addresses. But now we are discussing the first instruction after the CPU resets: that is, how to read the BIOS.
|

Freebsd网站架设\局域网维护管理\硬件维修\电路图纸
欢迎到 振兴电子
http://zxdz.8800.org |
|
2004-10-12 00:00 |
|
|
yzz163
中级用户
  
积分 335
发帖 96
注册 2004-5-7
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
bios空间不在1M空间之内,光用20根地址线是无法访问的。-----------------------------对于X86系列的CPU,在复位后,就工作在X086模式即"实模式",这时它只能用20根地址线.当然对于其他类型的CPU可能不同.
The BIOS space is not within the 1M space, and it cannot be accessed using only 20 address lines. ----------------------------- For X86 series CPUs, after reset, they work in X086 mode, namely "real mode", and at this time they can only use 20 address lines. Of course, it may be different for other types of CPUs.
|

Freebsd网站架设\局域网维护管理\硬件维修\电路图纸
欢迎到 振兴电子
http://zxdz.8800.org |
|
2004-10-12 00:00 |
|
|
cdl
中级用户
   bbpc
积分 340
发帖 107
注册 2004-4-11
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
在286之前地址空间是20位的,只需要16位的段寄存器和16位的IP就够了,而286的地址空间是24位的,386的地址空间是32位的,地址产生方式与286之前的CPU有很大的区别。在386以后的计算机中,BIOS是放在最高地址空间的64K处,第一条指令是在FFFFFFF0处,CPU复位后第一条指令并不是由CS左移4位+IP计算地址的,虽然复位之后cs=FFFFH,但是CPU产生的第一条指令的地址和它毫无关系。基址是由另外一个寄存器(该寄存器无法直接访问)产生,CPU复位后该寄存器的值是确定的并保证由该基址和EIP=0000FFF0H,寻址到FFFFFFF0H处,第一条指令是长跳转指令,执行第一条指令后cs重新装入,同时基址寄存器也重新装入。
Before the 286, the address space was 20 bits, and only 16-bit segment registers and 16-bit IP were sufficient. But the address space of the 286 is 24 bits, and that of the 386 is 32 bits. The address generation method is quite different from that of CPUs before the 286. In computers after the 386, the BIOS is placed in the 64K at the highest address space, with the first instruction at FFFFFFF0H. After the CPU resets, the first instruction is not calculated by CS shifted left by 4 bits plus IP. Although after reset cs = FFFFH, the address of the first instruction generated by the CPU has nothing to do with it. The base address is generated by another register (this register cannot be directly accessed). After the CPU resets, the value of this register is determined and ensures that with this base address and EIP = 0000FFF0H, it addresses to FFFFFFF0H. The first instruction is a far jump instruction. After executing the first instruction, cs is reloaded, and the base address register is also reloaded.
|

x86!dos!
爱你就象老鼠爱大米
http://www.baby-pc.com/ |
|
2004-10-12 00:00 |
|
|
beiyuly
初级用户
 
积分 95
发帖 40
注册 2006-10-8
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
Originally posted by willsort at 2004-10-2 00:00:
Re All:
关于此句我有些疑问,地址的概念似乎是针对RAM(内存)来说的,而BIOS代码指令在ROM(无论是否可擦写)中。而这个地址FFFF:0,据我栮..
bios在进行ram shadow之前,cpu的指令是从bios om中拿到的,那个时候没有ram,也就是说机器还不知道有ram,只有在进行ram shadow之后,才会在ram中放入印象,这才从ram中的指令执行.
bios在进行 RAM shadow 之前,CPU 的指令是从 BIOS ROM 中获取的,那个时候还没有 RAM,也就是说机器还不知道有 RAM,只有在进行 RAM shadow 之后,才会在 RAM 中存入内容,这才从 RAM 中的指令执行。
Originally posted by willsort at 2004-10-2 00:00:
Re All:
关于此句我有些疑问,地址的概念似乎是针对RAM(内存)来说的,而BIOS代码指令在ROM(无论是否可擦写)中。而这个地址FFFF:0,据我栮..
Before the BIOS performs RAM shadowing, the CPU's instructions are fetched from the BIOS ROM. At that time, there is no RAM yet, meaning the machine doesn't know about RAM. Only after performing RAM shadowing is content stored in RAM, and then execution proceeds from the instructions in RAM.
|

http://beiyu.bokee.com |
|
2006-10-13 20:59 |
|