Главная » Просмотр файлов » Volume 2 System Programming

Volume 2 System Programming (794096), страница 59

Файл №794096 Volume 2 System Programming (Intel and AMD manuals) 59 страницаVolume 2 System Programming (794096) страница 592019-04-28СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 59)

IORRBasen RegisterIORRMaskn Registers. The fields in these IORRs are:••Valid (V)—Bit 11. Indicates that the IORR pair is valid (enabled) when set to 1. When the valid bitis cleared to 0 the register pair is not used for memory-mapped I/O control (disabled).Range Physical-Mask (PhysMask)—Bits 51–12. The mask value used to specify the memoryrange. Like PhysBase, PhysMask is aligned on a 4-Kbyte physical-address boundary. Bits 11–0 ofPhysMask are assumed to be 0.The format of these registers is shown in Figure 7-13.198Memory System24593—Rev. 3.13—July 200763AMD64 Technology52 5132PhysMaskReserved, MBZ(This is an architectural limit.

A given implementation may support fewer bits.)3112 11 10PhysMaskBits63-5251-121110-0MnemonicReservedPhysMaskVReservedDescriptionReserved, Must be ZeroRange Physical MaskI/O Register Pair Enable (Valid)Reserved, Must be ZeroV0Reserved, MBZR/WR/WR/WFigure 7-13. IORRMaskn RegisterThe operation of the PhysMask and PhysBase fields is identical to that of the variable-range MTRRs.See page 186 for a description of this operation.7.9.3 IORR OverlappingThe use of overlapping IORRs is not recommended.

If overlapping IORRs are specified, the resultingbehavior is implementation-dependent.7.9.4 Top of MemoryThe top-of-memory registers, TOP_MEM and TOP_MEM2, allow system software to specify physicaladdresses ranges as memory-mapped I/O locations. Processor implementations can direct accesses tomemory-mapped I/O differently than system I/O, and the precise method depends on theimplementation. System software specifies memory-mapped I/O regions by writing an address intoeach of the top-of-memory registers. The memory regions specified by the TOP_MEM registers arealigned on 8-Mbyte boundaries as follows:••••Memory accesses from physical address 0 to one less than the value in TOP_MEM are directed tosystem memory.Memory accesses from the physical address specified in TOP_MEM to FFFF_FFFFh are directedto memory-mapped I/O.Memory accesses from physical address 1_0000_0000h to one less than the value in TOP_MEM2are directed to system memory.Memory accesses from the physical address specified in TOP_MEM2 to the maximum physicaladdress supported by the system are directed to memory-mapped I/O.Figure 7-14 on page 200 shows how the top-of-memory registers organize memory into separatesystem-memory and memory-mapped I/O regions.Memory System199AMD64 Technology24593—Rev.

3.13—July 2007The intersection of the top-of-memory range with the equivalent effective MTRR range follows thesame type encoding table (Table 7-11 on page 197) as the fixed-range MTRR, where theRdMem/WrMem and memory type are directly tied together.Physical MemoryMaximum System MemoryMemory-MappedI/OTOP_MEM2TOP_MEM2 - 1System MemoryMemory-MappedI/O4GB4GB - 1TOP_MEMTOP_MEM - 1System Memory0513-269.epsFigure 7-14. Memory Organization Using Top-of-Memory RegistersFigure 7-15 on page 200 shows the format of the TOP_MEM and TOP_MEM2 registers. Bits 51–23specify an 8-Mbyte aligned physical address. All remaining bits are reserved and ignored by theprocessor. System software should clear those bits to zero to maintain compatibility with possiblefuture extensions to the registers.

The TOP_MEM registers are model-specific registers. See“Memory-Typing MSRs” on page 458 for information on the MSR address and reset values for theseregisters.6352 51Top-of-Memory Physical Address(This is an architectural limit. A given implementation may support fewer bits.)Reserved, IGN3123 22Top-of-Memory Physical AddressFigure 7-15.200320Reserved, IGNTop-of-Memory Registers (TOP_MEM, TOP_MEM2)Memory System24593—Rev. 3.13—July 2007AMD64 TechnologyThe TOP_MEM register is enabled by setting the MtrrVarDramEn bit in the SYSCFG MSR (bit 20) to1.

The TOP_MEM2 register is enabled by setting the MtrrTom2En bit in the SYSCFG MSR (bit 21) to1. The registers are disabled when their respective enable bits are cleared to 0. When the top-ofmemory registers are disabled, memory accesses default to memory-mapped I/O space.Memory System201AMD64 Technology20224593—Rev. 3.13—July 2007Memory System24593—Rev. 3.13—July 20078AMD64 TechnologyExceptions and InterruptsExceptions and interrupts force control transfers from the currently-executing program to a systemsoftware service routine that handles the interrupting event. These routines are referred to as exceptionhandlers and interrupt handlers, or collectively as event handlers.

Typically, interrupt events can behandled by the service routine transparently to the interrupted program. During the control transfer tothe service routine, the processor stops executing the interrupted program and saves its return pointer.The system-software service routine that handles the exception or interrupt is responsible for savingthe state of the interrupted program. This allows the processor to restart the interrupted program aftersystem software has handled the event.When an exception or interrupt occurs, the processor uses the interrupt-vector number as an index intothe interrupt-descriptor table (IDT). An IDT is used in all processor operating modes, including realmode (also called real-address mode), protected mode, and long mode.Exceptions and interrupts come from three general sources:•••Exceptions occur as a result of software execution errors or other internal-processor errors.Exceptions also occur during non-error situations, such as program single stepping or addressbreakpoint detection.

Exceptions are considered synchronous events because they are a directresult of executing the interrupted instruction.Software interrupts occur as a result of executing interrupt instructions. Unlike exceptions andexternal interrupts, software interrupts allow intentional triggering of the interrupt-handlingmechanism. Like exceptions, software interrupts are synchronous events.External interrupts are generated by system logic in response to an error or some other eventoutside the processor. They are reported over the processor bus using external signalling. Externalinterrupts are asynchronous events that occur independently of the interrupted instruction.Throughout this section, the term masking can refer to either disabling or delaying an interrupt.

Forexample, masking external interrupts delays the interrupt, with the processor holding the interrupt aspending until it is unmasked. With floating-point exceptions (128-bit media and x87), maskingprevents an interrupt from occurring and causes the processor to perform a default operation on theexception condition.8.1General CharacteristicsExceptions and interrupts have several different characteristics that depend on how events are reportedand the implications for program restart.8.1.1 PrecisionPrecision describes how the exception is related to the interrupted program:•Precise exceptions are reported on a predictable instruction boundary. This boundary is generallythe first instruction that has not completed when the event occurs. All previous instructions (inExceptions and Interrupts203AMD64 Technology•24593—Rev.

3.13—July 2007program order) are allowed to complete before transferring control to the event handler. Thepointer to the instruction boundary is saved automatically by the processor. When the event handlercompletes execution, it returns to the interrupted program and restarts execution at the interruptedinstruction boundary.Imprecise exceptions are not guaranteed to be reported on a predictable instruction boundary. Theboundary can be any instruction that has not completed when the interrupt event occurs.

Impreciseevents can be considered asynchronous, because the source of the interrupt is not necessarilyrelated to the interrupted instruction. Imprecise exception and interrupt handlers typically collectmachine-state information related to the interrupting event for reporting through system-diagnosticsoftware. The interrupted program is not restartable.8.1.2 Instruction RestartAs mentioned above, precise exceptions are reported on an instruction boundary. The instructionboundary can be reported in one of two locations:••Most exceptions report the boundary before the instruction causing the exception. In this case, allprevious instructions (in program order) are allowed to complete, but the interrupted instruction isnot.

No program state is updated as a result of partially executing an interrupted instruction.Some exceptions report the boundary after the instruction causing the exception. In this case, allprevious instructions—including the one executing when the exception occurred—are allowed tocomplete.Program state can be updated when the reported boundary is after the instruction causing theexception. This is particularly true when the event occurs as a result of a task switch.

Характеристики

Тип файла
PDF-файл
Размер
3,37 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6510
Авторов
на СтудИзбе
302
Средний доход
с одного платного файла
Обучение Подробнее